tcpdump mailing list archives
[PATCH] ifSpeed in sFlow is 64 bits not 32
From: Rick Jones <rick.jones2 () hp com>
Date: Fri, 27 May 2011 17:59:39 -0700
The ifSpeed field of a generic interface counter in sFlow is 64 bits.
The "overlay" definition in print-sflow.c is correct, but the actual
extract for printing is using EXTRACT_32BITS rather than EXTRACT_64BITS,
which leads to an incorrect report for speed.
Signed-off-by: Rick Jones <rick.jones2 () hp com>
diff --git a/print-sflow.c b/print-sflow.c
index f27370a..c7e5bc0 100644
--- a/print-sflow.c
+++ b/print-sflow.c
@@ -316,7 +316,7 @@ print_sflow_counter_generic(const u_char *pointer,
u_int len
printf("\n\t ifindex %u, iftype %u, ifspeed %u, ifdirection %u
(%s)",
EXTRACT_32BITS(sflow_gen_counter->ifindex),
EXTRACT_32BITS(sflow_gen_counter->iftype),
- EXTRACT_32BITS(sflow_gen_counter->ifspeed),
+ EXTRACT_64BITS(sflow_gen_counter->ifspeed),
EXTRACT_32BITS(sflow_gen_counter->ifdirection),
tok2str(sflow_iface_direction_values, "Unknown",
EXTRACT_32BITS(sflow_gen_counter->ifdirection)));
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- [PATCH] ifSpeed in sFlow is 64 bits not 32 Rick Jones (May 27)
- Re: [PATCH] ifSpeed in sFlow is 64 bits not 32 Guy Harris (Jun 02)
- Re: [PATCH] ifSpeed in sFlow is 64 bits not 32 Rick Jones (Jun 02)
- Re: [PATCH] ifSpeed in sFlow is 64 bits not 32 Guy Harris (Jun 02)
- Re: [PATCH] ifSpeed in sFlow is 64 bits not 32 Rick Jones (Jun 02)
- Re: [PATCH] ifSpeed in sFlow is 64 bits not 32 Guy Harris (Jun 02)
