X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/ed85e20e4d6a27d5405f37366dd34b64c10a9211..d729eb478e7cd3fc772cad0afde207b0a5ffa6e8:/print-sflow.c diff --git a/print-sflow.c b/print-sflow.c index da72848d..708f7605 100644 --- a/print-sflow.c +++ b/print-sflow.c @@ -19,7 +19,6 @@ * Expansion and refactoring by Rick Jones */ -#define NETDISSECT_REWORKED #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -297,8 +296,8 @@ struct sflow_vlan_counter_t { static int print_sflow_counter_generic(netdissect_options *ndo, - const u_char *pointer, u_int len) { - + const u_char *pointer, u_int len) +{ const struct sflow_generic_counter_t *sflow_gen_counter; if (len < sizeof(struct sflow_generic_counter_t)) @@ -343,8 +342,8 @@ print_sflow_counter_generic(netdissect_options *ndo, static int print_sflow_counter_ethernet(netdissect_options *ndo, - const u_char *pointer, u_int len){ - + const u_char *pointer, u_int len) +{ const struct sflow_ethernet_counter_t *sflow_eth_counter; if (len < sizeof(struct sflow_ethernet_counter_t)) @@ -373,15 +372,15 @@ print_sflow_counter_ethernet(netdissect_options *ndo, static int print_sflow_counter_token_ring(netdissect_options *ndo _U_, - const u_char *pointer _U_, u_int len _U_) { - + const u_char *pointer _U_, u_int len _U_) +{ return 0; } static int print_sflow_counter_basevg(netdissect_options *ndo, - const u_char *pointer, u_int len) { - + const u_char *pointer, u_int len) +{ const struct sflow_100basevg_counter_t *sflow_100basevg_counter; if (len < sizeof(struct sflow_100basevg_counter_t)) @@ -416,8 +415,8 @@ print_sflow_counter_basevg(netdissect_options *ndo, static int print_sflow_counter_vlan(netdissect_options *ndo, - const u_char *pointer, u_int len) { - + const u_char *pointer, u_int len) +{ const struct sflow_vlan_counter_t *sflow_vlan_counter; if (len < sizeof(struct sflow_vlan_counter_t)) @@ -446,8 +445,8 @@ struct sflow_processor_counter_t { static int print_sflow_counter_processor(netdissect_options *ndo, - const u_char *pointer, u_int len) { - + const u_char *pointer, u_int len) +{ const struct sflow_processor_counter_t *sflow_processor_counter; if (len < sizeof(struct sflow_processor_counter_t)) @@ -467,8 +466,8 @@ print_sflow_counter_processor(netdissect_options *ndo, static int sflow_print_counter_records(netdissect_options *ndo, - const u_char *pointer, u_int len, u_int records) { - + const u_char *pointer, u_int len, u_int records) +{ u_int nrecords; const u_char *tptr; u_int tlen; @@ -543,11 +542,10 @@ sflow_print_counter_records(netdissect_options *ndo, return 0; } - static int sflow_print_counter_sample(netdissect_options *ndo, - const u_char *pointer, u_int len) { - + const u_char *pointer, u_int len) +{ const struct sflow_counter_sample_t *sflow_counter_sample; u_int nrecords; u_int typesource; @@ -579,8 +577,8 @@ sflow_print_counter_sample(netdissect_options *ndo, static int sflow_print_expanded_counter_sample(netdissect_options *ndo, - const u_char *pointer, u_int len) { - + const u_char *pointer, u_int len) +{ const struct sflow_expanded_counter_sample_t *sflow_expanded_counter_sample; u_int nrecords; @@ -606,8 +604,8 @@ sflow_print_expanded_counter_sample(netdissect_options *ndo, static int print_sflow_raw_packet(netdissect_options *ndo, - const u_char *pointer, u_int len) { - + const u_char *pointer, u_int len) +{ const struct sflow_expanded_flow_raw_t *sflow_flow_raw; if (len < sizeof(struct sflow_expanded_flow_raw_t)) @@ -629,8 +627,8 @@ print_sflow_raw_packet(netdissect_options *ndo, static int print_sflow_ethernet_frame(netdissect_options *ndo, - const u_char *pointer, u_int len) { - + const u_char *pointer, u_int len) +{ const struct sflow_ethernet_frame_t *sflow_ethernet_frame; if (len < sizeof(struct sflow_ethernet_frame_t)) @@ -647,8 +645,8 @@ print_sflow_ethernet_frame(netdissect_options *ndo, static int print_sflow_extended_switch_data(netdissect_options *ndo, - const u_char *pointer, u_int len) { - + const u_char *pointer, u_int len) +{ const struct sflow_extended_switch_data_t *sflow_extended_sw_data; if (len < sizeof(struct sflow_extended_switch_data_t)) @@ -666,8 +664,8 @@ print_sflow_extended_switch_data(netdissect_options *ndo, static int sflow_print_flow_records(netdissect_options *ndo, - const u_char *pointer, u_int len, u_int records) { - + const u_char *pointer, u_int len, u_int records) +{ u_int nrecords; const u_char *tptr; u_int tlen; @@ -752,8 +750,8 @@ sflow_print_flow_records(netdissect_options *ndo, static int sflow_print_flow_sample(netdissect_options *ndo, - const u_char *pointer, u_int len) { - + const u_char *pointer, u_int len) +{ const struct sflow_flow_sample_t *sflow_flow_sample; u_int nrecords; u_int typesource; @@ -789,8 +787,8 @@ sflow_print_flow_sample(netdissect_options *ndo, static int sflow_print_expanded_flow_sample(netdissect_options *ndo, - const u_char *pointer, u_int len) { - + const u_char *pointer, u_int len) +{ const struct sflow_expanded_flow_sample_t *sflow_expanded_flow_sample; u_int nrecords; @@ -818,8 +816,8 @@ sflow_print_expanded_flow_sample(netdissect_options *ndo, void sflow_print(netdissect_options *ndo, - const u_char *pptr, u_int len) { - + const u_char *pptr, u_int len) +{ const struct sflow_datagram_t *sflow_datagram; const struct sflow_sample_header *sflow_sample;