File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -472,7 +472,7 @@ extern u_int chdlc_if_print IF_PRINTER_ARGS;
472
472
extern u_int cip_if_print IF_PRINTER_ARGS ;
473
473
extern u_int dsa_if_print IF_PRINTER_ARGS ;
474
474
extern u_int edsa_if_print IF_PRINTER_ARGS ;
475
- extern u_int enc_if_print IF_PRINTER_ARGS ;
475
+ extern void enc_if_print IF_PRINTER_ARGS ;
476
476
extern u_int ether_if_print IF_PRINTER_ARGS ;
477
477
extern u_int fddi_if_print IF_PRINTER_ARGS ;
478
478
extern u_int fr_if_print IF_PRINTER_ARGS ;
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ struct enchdr {
94
94
#define SWAPLONG (y ) \
95
95
((((y)&0xff)<<24) | (((y)&0xff00)<<8) | (((y)&0xff0000)>>8) | (((y)>>24)&0xff))
96
96
97
- u_int
97
+ void
98
98
enc_if_print (netdissect_options * ndo ,
99
99
const struct pcap_pkthdr * h , const u_char * p )
100
100
{
@@ -103,11 +103,13 @@ enc_if_print(netdissect_options *ndo,
103
103
u_int af , flags ;
104
104
const struct enchdr * hdr ;
105
105
106
- ndo -> ndo_protocol = "enc_if " ;
106
+ ndo -> ndo_protocol = "enc " ;
107
107
if (caplen < ENC_HDRLEN ) {
108
+ ndo -> ndo_ll_header_length += caplen ;
108
109
nd_print_trunc (ndo );
109
- goto out ;
110
+ return ;
110
111
}
112
+ ndo -> ndo_ll_header_length += ENC_HDRLEN ;
111
113
112
114
hdr = (const struct enchdr * )p ;
113
115
/*
@@ -159,6 +161,5 @@ enc_if_print(netdissect_options *ndo,
159
161
break ;
160
162
}
161
163
162
- out :
163
- return (ENC_HDRLEN );
164
+ return ;
164
165
}
Original file line number Diff line number Diff line change @@ -127,9 +127,6 @@ static const struct uint_printer uint_printers[] = {
127
127
{ mfr_if_print , DLT_MFR },
128
128
#endif
129
129
{ atm_if_print , DLT_ATM_RFC1483 },
130
- #ifdef DLT_ENC
131
- { enc_if_print , DLT_ENC },
132
- #endif
133
130
{ sl_if_print , DLT_SLIP },
134
131
#ifdef DLT_SLIP_BSDOS
135
132
{ sl_bsdos_if_print , DLT_SLIP_BSDOS },
@@ -231,6 +228,9 @@ static const struct void_printer void_printers[] = {
231
228
#endif
232
229
#ifdef DLT_BLUETOOTH_HCI_H4_WITH_PHDR
233
230
{ bt_if_print , DLT_BLUETOOTH_HCI_H4_WITH_PHDR },
231
+ #endif
232
+ #ifdef DLT_ENC
233
+ { enc_if_print , DLT_ENC },
234
234
#endif
235
235
{ null_if_print , DLT_NULL },
236
236
#ifdef DLT_LOOP
You can’t perform that action at this time.
0 commit comments