Bugzilla – Attachment 1979 Details for
Bug 1848
TOS not reported ?
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to support tos reporting in v1 and v5.
softflowd_tos.patch (text/plain), 2.81 KB, created by
Thierry MARTIN
on 2011-01-06 20:22:53 AEDT
(
hide
)
Description:
Patch to support tos reporting in v1 and v5.
Filename:
MIME Type:
Creator:
Thierry MARTIN
Created:
2011-01-06 20:22:53 AEDT
Size:
2.81 KB
patch
obsolete
>diff -crB softflowd-0.9.8.old/netflow1.c softflowd-0.9.8.new/netflow1.c >*** softflowd-0.9.8.old/netflow1.c 2005-05-05 05:31:42.000000000 +0200 >--- softflowd-0.9.8.new/netflow1.c 2011-01-06 08:49:34.000000000 +0100 >*************** >*** 123,128 **** >--- 123,129 ---- > system_boot_time)); > flw->protocol = flows[i]->protocol; > flw->tcp_flags = flows[i]->tcp_flags[0]; >+ flw->tos = flows[i]->tos[0]; > offset += sizeof(*flw); > j++; > hdr->flows++; >*************** >*** 144,149 **** >--- 145,151 ---- > system_boot_time)); > flw->protocol = flows[i]->protocol; > flw->tcp_flags = flows[i]->tcp_flags[1]; >+ flw->tos = flows[i]->tos[1]; > offset += sizeof(*flw); > j++; > hdr->flows++; >diff -crB softflowd-0.9.8.old/netflow5.c softflowd-0.9.8.new/netflow5.c >*** softflowd-0.9.8.old/netflow5.c 2005-05-05 05:31:42.000000000 +0200 >--- softflowd-0.9.8.new/netflow5.c 2011-01-06 08:49:34.000000000 +0100 >*************** >*** 122,127 **** >--- 122,128 ---- > htonl(timeval_sub_ms(&flows[i]->flow_last, > system_boot_time)); > flw->tcp_flags = flows[i]->tcp_flags[0]; >+ flw->tos = flows[i]->tos[0]; > flw->protocol = flows[i]->protocol; > offset += sizeof(*flw); > j++; >*************** >*** 143,148 **** >--- 144,150 ---- > htonl(timeval_sub_ms(&flows[i]->flow_last, > system_boot_time)); > flw->tcp_flags = flows[i]->tcp_flags[1]; >+ flw->tos = flows[i]->tos[1]; > flw->protocol = flows[i]->protocol; > offset += sizeof(*flw); > j++; >diff -crB softflowd-0.9.8.old/softflowd.c softflowd-0.9.8.new/softflowd.c >*** softflowd-0.9.8.old/softflowd.c 2006-11-02 07:23:29.000000000 +0100 >--- softflowd-0.9.8.new/softflowd.c 2011-01-06 08:49:34.000000000 +0100 >*************** >*** 343,348 **** >--- 344,351 ---- > flow->addr[ndx].v4 = ip->ip_src; > flow->addr[ndx ^ 1].v4 = ip->ip_dst; > flow->protocol = ip->ip_p; >+ flow->tos[ndx]=ip->ip_tos; >+ flow->tos[ndx ^ 1]=0; > flow->octets[ndx] = len; > flow->packets[ndx] = 1; > >*************** >*** 598,603 **** >--- 604,611 ---- > flow->packets[1] += tmp.packets[1]; > flow->octets[1] += tmp.octets[1]; > flow->tcp_flags[1] |= tmp.tcp_flags[1]; >+ if (flow->tos[0] < tmp.tos[0]) flow->tos[0] = tmp.tos[0]; >+ if (flow->tos[1] < tmp.tos[1]) flow->tos[1] = tmp.tos[1]; > } > > memcpy(&flow->flow_last, received_time, sizeof(flow->flow_last)); >diff -crB softflowd-0.9.8.old/softflowd.h softflowd-0.9.8.new/softflowd.h >*** softflowd-0.9.8.old/softflowd.h 2006-03-16 09:23:13.000000000 +0100 >--- softflowd-0.9.8.new/softflowd.h 2011-01-06 08:49:34.000000000 +0100 >*************** >*** 163,168 **** >--- 163,171 ---- > /* Per-endpoint statistics (all in _host_ byte order) */ > u_int32_t octets[2]; /* Octets so far */ > u_int32_t packets[2]; /* Packets so far */ >+ >+ u_int8_t tos[2]; /* tos */ >+ u_int16_t padding; > }; > > /*
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1848
: 1979