@@ -91,29 +91,29 @@ ether_hdr_print(netdissect_options *ndo,
91
91
const u_char * bp , u_int length )
92
92
{
93
93
register const struct ether_header * ep ;
94
- uint16_t ether_type ;
94
+ uint16_t length_type ;
95
95
96
96
ep = (const struct ether_header * )bp ;
97
97
98
98
ND_PRINT ((ndo , "%s > %s" ,
99
99
etheraddr_string (ndo , ESRC (ep )),
100
100
etheraddr_string (ndo , EDST (ep ))));
101
101
102
- ether_type = EXTRACT_16BITS (& ep -> ether_type );
102
+ length_type = EXTRACT_16BITS (& ep -> ether_length_type );
103
103
if (!ndo -> ndo_qflag ) {
104
- if (ether_type <= ETHERMTU ) {
104
+ if (length_type <= ETHERMTU ) {
105
105
ND_PRINT ((ndo , ", 802.3" ));
106
- length = ether_type ;
106
+ length = length_type ;
107
107
} else
108
108
ND_PRINT ((ndo , ", ethertype %s (0x%04x)" ,
109
- tok2str (ethertype_values ,"Unknown" , ether_type ),
110
- ether_type ));
109
+ tok2str (ethertype_values ,"Unknown" , length_type ),
110
+ length_type ));
111
111
} else {
112
- if (ether_type <= ETHERMTU ) {
112
+ if (length_type <= ETHERMTU ) {
113
113
ND_PRINT ((ndo , ", 802.3" ));
114
- length = ether_type ;
114
+ length = length_type ;
115
115
} else
116
- ND_PRINT ((ndo , ", %s" , tok2str (ethertype_values ,"Unknown Ethertype (0x%04x)" , ether_type )));
116
+ ND_PRINT ((ndo , ", %s" , tok2str (ethertype_values ,"Unknown Ethertype (0x%04x)" , length_type )));
117
117
}
118
118
119
119
ND_PRINT ((ndo , ", length %u: " , length ));
@@ -132,7 +132,7 @@ ether_print(netdissect_options *ndo,
132
132
{
133
133
const struct ether_header * ep ;
134
134
u_int orig_length ;
135
- u_short ether_type ;
135
+ u_short length_type ;
136
136
u_int hdrlen ;
137
137
int llc_hdrlen ;
138
138
@@ -158,13 +158,13 @@ ether_print(netdissect_options *ndo,
158
158
p += ETHER_HDRLEN ;
159
159
hdrlen = ETHER_HDRLEN ;
160
160
161
- ether_type = EXTRACT_16BITS (& ep -> ether_type );
161
+ length_type = EXTRACT_16BITS (& ep -> ether_length_type );
162
162
163
163
recurse :
164
164
/*
165
165
* Is it (gag) an 802.3 encapsulation?
166
166
*/
167
- if (ether_type <= ETHERMTU ) {
167
+ if (length_type <= ETHERMTU ) {
168
168
/* Try to print the LLC-layer header & higher layers */
169
169
llc_hdrlen = llc_print (ndo , p , length , caplen , ESRC (ep ), EDST (ep ));
170
170
if (llc_hdrlen < 0 ) {
@@ -174,10 +174,10 @@ ether_print(netdissect_options *ndo,
174
174
llc_hdrlen = - llc_hdrlen ;
175
175
}
176
176
hdrlen += llc_hdrlen ;
177
- } else if (ether_type == ETHERTYPE_8021Q ||
178
- ether_type == ETHERTYPE_8021Q9100 ||
179
- ether_type == ETHERTYPE_8021Q9200 ||
180
- ether_type == ETHERTYPE_8021QinQ ) {
177
+ } else if (length_type == ETHERTYPE_8021Q ||
178
+ length_type == ETHERTYPE_8021Q9100 ||
179
+ length_type == ETHERTYPE_8021Q9200 ||
180
+ length_type == ETHERTYPE_8021QinQ ) {
181
181
/*
182
182
* Print VLAN information, and then go back and process
183
183
* the enclosed type field.
@@ -196,15 +196,15 @@ ether_print(netdissect_options *ndo,
196
196
ND_PRINT ((ndo , "%s, " , ieee8021q_tci_string (tag )));
197
197
}
198
198
199
- ether_type = EXTRACT_16BITS (p + 2 );
200
- if (ndo -> ndo_eflag && ether_type > ETHERMTU )
201
- ND_PRINT ((ndo , "ethertype %s, " , tok2str (ethertype_values ,"0x%04x" , ether_type )));
199
+ length_type = EXTRACT_16BITS (p + 2 );
200
+ if (ndo -> ndo_eflag && length_type > ETHERMTU )
201
+ ND_PRINT ((ndo , "ethertype %s, " , tok2str (ethertype_values ,"0x%04x" , length_type )));
202
202
p += 4 ;
203
203
length -= 4 ;
204
204
caplen -= 4 ;
205
205
hdrlen += 4 ;
206
206
goto recurse ;
207
- } else if (ether_type == ETHERTYPE_JUMBO ) {
207
+ } else if (length_type == ETHERTYPE_JUMBO ) {
208
208
/*
209
209
* Alteon jumbo frames.
210
210
* See
@@ -224,8 +224,8 @@ ether_print(netdissect_options *ndo,
224
224
}
225
225
hdrlen += llc_hdrlen ;
226
226
} else {
227
- if (ethertype_print (ndo , ether_type , p , length , caplen ) == 0 ) {
228
- /* ether_type not known, print raw packet */
227
+ if (ethertype_print (ndo , length_type , p , length , caplen ) == 0 ) {
228
+ /* type not known, print raw packet */
229
229
if (!ndo -> ndo_eflag ) {
230
230
if (print_encap_header != NULL )
231
231
(* print_encap_header )(ndo , encap_header_arg );
0 commit comments