mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-06 03:45:26 +00:00
Add comments
This commit is contained in:
parent
7e9063dde8
commit
bc610bb3ee
2 changed files with 9 additions and 2 deletions
|
|
@ -4872,13 +4872,20 @@ void Flow::housekeep(time_t t) {
|
|||
|
||||
/* *************************************** */
|
||||
|
||||
/**
|
||||
* Returns partial traffic stats by computing a delta between current flow stats ("stats")
|
||||
* and the previous snapshot ("dst").
|
||||
* Note:
|
||||
* - Delta is returned in "fts"
|
||||
* - "dst" is updated taking the "stats" value
|
||||
*/
|
||||
bool Flow::get_partial_traffic_stats(PartializableFlowTrafficStats **dst,
|
||||
PartializableFlowTrafficStats *fts,
|
||||
bool *first_partial) const {
|
||||
if(!fts || !dst) return (false);
|
||||
|
||||
if(!*dst) {
|
||||
if(!(*dst = new (std::nothrow) PartializableFlowTrafficStats()))
|
||||
if((*dst = new (std::nothrow) PartializableFlowTrafficStats()) == NULL)
|
||||
return (false);
|
||||
*first_partial = true;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ void PartializableFlowTrafficStats::incDNSResp(u_int16_t resp_code) {
|
|||
|
||||
void PartializableFlowTrafficStats::get_partial(PartializableFlowTrafficStats *dst,
|
||||
PartializableFlowTrafficStats *fts) const {
|
||||
/* Set temp to the current value */
|
||||
/* Set tmp to the current value */
|
||||
PartializableFlowTrafficStats tmp(*this);
|
||||
|
||||
/* Compute the differences between the snapshot tmp and the values found in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue