Lines Matching +full:control +full:- +full:field

29 #include "netdissect-stdinc.h"
152 uint16_t control;
156 ndo->ndo_protocol = "llc";
173 * of the control field depends on that - I frames
174 * have a two-byte control field, and U frames have
175 * a one-byte control field.
177 control = GET_U_1(p + 2);
178 if ((control & LLC_U_FMT) == LLC_U_FMT) {
183 hdrlen = 3; /* DSAP, SSAP, 1-byte control field */
186 * The control field in I and S frames is
201 * ...and is little-endian.
203 control = GET_LE_U_2(p + 2);
205 hdrlen = 4; /* DSAP, SSAP, 2-byte control field */
212 * type/length field is <= MAX_ETHERNET_LENGTH_VAL,
213 * i.e. it's a length field, not a type field), but
214 * has no 802.2 header - the IPX packet starts right
224 if (ndo->ndo_eflag)
234 if (ndo->ndo_eflag) {
244 ND_PRINT(", ctrl 0x%02x: ", control);
246 ND_PRINT(", ctrl 0x%04x: ", control);
254 length -= hdrlen;
255 caplen -= hdrlen;
258 && control == LLC_UI) {
260 * XXX - what *is* the right bridge pad value here?
270 return (-(hdrlen + 5)); /* include LLC and SNAP header */
276 control == LLC_UI) {
282 control == LLC_UI) {
284 * This is an RFC 948-style IP packet, with
294 control == LLC_UI) {
300 if (ndo->ndo_eflag)
309 && (!(control & LLC_S_FMT) || control == LLC_U_FMT)) {
312 * smb parser can handle many smb-in-netbeui packets, which
316 * (which are frames that don't have the low-order bit,
317 * LLC_S_FMT, set in the first byte of the control field)
318 * and UI frames (whose control field is just 3, LLC_U_FMT).
320 netbeui_print(ndo, control, p, length);
325 && control == LLC_UI) {
330 if (!ndo->ndo_eflag) {
336 (src->addr_string)(ndo, src->addr),
337 (dst->addr_string)(ndo, dst->addr),
346 (src->addr_string)(ndo, src->addr),
348 (dst->addr_string)(ndo, dst->addr),
355 tok2str(llc_cmd_values, "%02x", LLC_U_CMD(control)),
356 tok2str(llc_flag_values,"?",(ssap_field & LLC_GSAP) | (control & LLC_U_POLL)),
359 if ((control & ~LLC_U_POLL) == LLC_XID) {
387 if ((control & LLC_S_FMT) == LLC_S_FMT) {
389 tok2str(llc_supervisory_values,"?",LLC_S_CMD(control)),
390 LLC_IS_NR(control),
391 tok2str(llc_flag_values,"?",(ssap_field & LLC_GSAP) | (control & LLC_IS_POLL)),
396 LLC_I_NS(control),
397 LLC_IS_NR(control),
398 tok2str(llc_flag_values,"?",(ssap_field & LLC_GSAP) | (control & LLC_IS_POLL)),
402 return (-hdrlen);
411 for (otp = &oui_to_tok[0]; otp->tok != NULL; otp++) {
412 if (otp->oui == orgcode) {
413 tok = otp->tok;
429 ndo->ndo_protocol = "snap";
436 if (ndo->ndo_eflag) {
447 et, length - 5);
450 length -= 5;
451 caplen -= 5;
512 * XXX - remove the last two bytes for
519 caplen -= bridge_pad;
520 length -= bridge_pad;
532 * XXX - remove the last two bytes for
537 * Control field.
540 caplen -= bridge_pad;
541 length -= bridge_pad;
554 * XXX - remove the last two bytes for
561 caplen -= bridge_pad + 1;
562 length -= bridge_pad + 1;
576 if (!ndo->ndo_eflag) {
578 * Nobody printed the link-layer addresses, so print them, if
583 (src->addr_string)(ndo, src->addr),
584 (dst->addr_string)(ndo, dst->addr));