Lines Matching +full:vcc +full:- +full:p
26 #include "netdissect-stdinc.h"
72 #define VCI_PPC 0x05 /* Point-to-point signal msg */
75 #define VCI_OAMF4EC 0x04 /* End-to-end OAM F4 flow cell */
130 #define OAM_FUNCTION_SPECIFIC_LEN 45 /* this excludes crc10 and cell-type/function-type */
144 { 0x4, "VCC OAM F5 flow segment" },
145 { 0x5, "VCC OAM F5 flow end-to-end" },
205 * Print an RFC 1483 LLC-encapsulated ATM frame.
209 const u_char *p, int length, int caplen) in atm_llc_print() argument
213 llc_hdrlen = llc_print(ndo, p, length, caplen, NULL, NULL); in atm_llc_print()
216 if (!ndo->ndo_suppress_default_print) in atm_llc_print()
217 ND_DEFAULTPRINT(p, caplen); in atm_llc_print()
218 llc_hdrlen = -llc_hdrlen; in atm_llc_print()
230 * This is the top level routine of the printer. 'p' points
231 * to the LLC/SNAP header of the packet, 'h->ts' is the timestamp,
232 * 'h->len' is the length of the packet off the wire, and 'h->caplen'
237 const struct pcap_pkthdr *h, const u_char *p) in atm_if_print() argument
239 u_int caplen = h->caplen; in atm_if_print()
240 u_int length = h->len; in atm_if_print()
244 ndo->ndo_protocol = "atm"; in atm_if_print()
247 if (GET_U_1(p) == LLC_UI) { in atm_if_print()
248 if (ndo->ndo_eflag) in atm_if_print()
250 ndo->ndo_ll_hdr_len += 1; in atm_if_print()
251 isoclns_print(ndo, p + 1, length - 1); in atm_if_print()
264 * packet nor an RFC 2684 routed NLPID-formatted PDU nor in atm_if_print()
265 * an 802.2-but-no-SNAP IP packet. in atm_if_print()
267 llchdr = GET_BE_U_3(p); in atm_if_print()
272 * XXX - assume 802.6 MAC header from Fore driver. in atm_if_print()
277 * and doesn't check for non-UI frames. It also in atm_if_print()
287 if (ndo->ndo_eflag) in atm_if_print()
289 GET_BE_U_4(p), in atm_if_print()
290 GET_BE_U_4(p + 4), in atm_if_print()
291 GET_BE_U_4(p + 8), in atm_if_print()
292 GET_BE_U_4(p + 12)); in atm_if_print()
294 ND_TCHECK_LEN(p, 20); in atm_if_print()
295 p += 20; in atm_if_print()
296 length -= 20; in atm_if_print()
297 caplen -= 20; in atm_if_print()
300 ndo->ndo_ll_hdr_len += hdrlen; in atm_if_print()
301 ndo->ndo_ll_hdr_len += atm_llc_print(ndo, p, length, caplen); in atm_if_print()
328 const u_char *p) in sig_print() argument
332 if (GET_U_1(p + PROTO_POS) == Q2931) { in sig_print()
339 tok2str(msgtype2str, "msgtype#%u", GET_U_1(p + MSG_TYPE_POS))); in sig_print()
347 call_ref = GET_BE_U_3(p + CALL_REF_POS); in sig_print()
351 ND_PRINT("SSCOP, proto %u ", GET_U_1(p + PROTO_POS)); in sig_print()
360 u_int vpi, u_int vci, u_int traftype, const u_char *p, u_int length, in atm_print() argument
363 ndo->ndo_protocol = "atm"; in atm_print()
364 if (ndo->ndo_eflag) in atm_print()
371 sig_print(ndo, p); in atm_print()
380 oam_print(ndo, p, length, ATM_OAM_HEC); in atm_print()
389 snmp_print(ndo, p, length); in atm_print()
401 atm_llc_print(ndo, p, length, caplen); in atm_print()
405 lane_print(ndo, p, length, caplen); in atm_print()
426 const u_char *p, u_int length, u_int hec) in oam_print() argument
438 ndo->ndo_protocol = "oam"; in oam_print()
439 cell_header = GET_BE_U_4(p + hec); in oam_print()
440 cell_type = (GET_U_1((p + ATM_HDR_LEN_NOHEC + hec)) >> 4) & 0x0f; in oam_print()
441 func_type = GET_U_1((p + ATM_HDR_LEN_NOHEC + hec)) & 0x0f; in oam_print()
454 if (!ndo->ndo_vflag) { in oam_print()
458 ND_PRINT("\n\tcell-type %s (%u)", in oam_print()
464 ND_PRINT(", func-type unknown (%u)", func_type); in oam_print()
466 ND_PRINT(", func-type %s (%u)", in oam_print()
470 p += ATM_HDR_LEN_NOHEC + hec; in oam_print()
474 oam_ptr.oam_fm_loopback = (const struct oam_fm_loopback_t *)(p + OAM_CELLTYPE_FUNCTYPE_LEN); in oam_print()
476 ND_PRINT("\n\tLoopback-Indicator %s, Correlation-Tag 0x%08x", in oam_print()
479 … GET_U_1(oam_ptr.oam_fm_loopback->loopback_indicator) & OAM_FM_LOOPBACK_INDICATOR_MASK), in oam_print()
480 GET_BE_U_4(oam_ptr.oam_fm_loopback->correlation_tag)); in oam_print()
481 ND_PRINT("\n\tLocation-ID "); in oam_print()
482 for (idx = 0; idx < sizeof(oam_ptr.oam_fm_loopback->loopback_id); idx++) { in oam_print()
485 GET_BE_U_2(&oam_ptr.oam_fm_loopback->loopback_id[idx])); in oam_print()
488 ND_PRINT("\n\tSource-ID "); in oam_print()
489 for (idx = 0; idx < sizeof(oam_ptr.oam_fm_loopback->source_id); idx++) { in oam_print()
492 GET_BE_U_2(&oam_ptr.oam_fm_loopback->source_id[idx])); in oam_print()
499 oam_ptr.oam_fm_ais_rdi = (const struct oam_fm_ais_rdi_t *)(p + OAM_CELLTYPE_FUNCTYPE_LEN); in oam_print()
501 ND_PRINT("\n\tFailure-type 0x%02x", in oam_print()
502 GET_U_1(oam_ptr.oam_fm_ais_rdi->failure_type)); in oam_print()
503 ND_PRINT("\n\tLocation-ID "); in oam_print()
504 for (idx = 0; idx < sizeof(oam_ptr.oam_fm_ais_rdi->failure_location); idx++) { in oam_print()
507 GET_BE_U_2(&oam_ptr.oam_fm_ais_rdi->failure_location[idx])); in oam_print()
521 cksum = GET_BE_U_2(p + OAM_CELLTYPE_FUNCTYPE_LEN + OAM_FUNCTION_SPECIFIC_LEN) in oam_print()
523 cksum_shouldbe = verify_crc10_cksum(0, p, OAM_PAYLOAD_LEN); in oam_print()