• Home
  • Raw
  • Download

Lines Matching refs:trp

73 #define IS_SOURCE_ROUTED(trp)	((trp)->token_shost[0] & 0x80)  argument
74 #define FRAME_TYPE(trp) (((trp)->token_fc & 0xC0) >> 6) argument
77 #define BROADCAST(trp) ((EXTRACT_16BITS(&(trp)->token_rcf) & 0xE000) >> 13) argument
78 #define RIF_LENGTH(trp) ((EXTRACT_16BITS(&(trp)->token_rcf) & 0x1f00) >> 8) argument
79 #define DIRECTION(trp) ((EXTRACT_16BITS(&(trp)->token_rcf) & 0x0080) >> 7) argument
80 #define LARGEST_FRAME(trp) ((EXTRACT_16BITS(&(trp)->token_rcf) & 0x0070) >> 4) argument
81 #define RING_NUMBER(trp, x) ((EXTRACT_16BITS(&(trp)->token_rseg[x]) & 0xfff0) >> 4) argument
82 #define BRIDGE_NUMBER(trp, x) ((EXTRACT_16BITS(&(trp)->token_rseg[x]) & 0x000f)) argument
83 #define SEGMENT_COUNT(trp) ((int)((RIF_LENGTH(trp) - 2) / 2)) argument
98 extract_token_addrs(const struct token_header *trp, char *fsrc, char *fdst) in extract_token_addrs() argument
100 memcpy(fdst, (const char *)trp->token_dhost, 6); in extract_token_addrs()
101 memcpy(fsrc, (const char *)trp->token_shost, 6); in extract_token_addrs()
109 register const struct token_header *trp, register u_int length, in token_hdr_print() argument
119 trp->token_ac, in token_hdr_print()
120 trp->token_fc)); in token_hdr_print()
151 const struct token_header *trp; in token_print() local
158 trp = (const struct token_header *)p; in token_print()
168 extract_token_addrs(trp, (char*)ESRC(&ehdr), (char*)EDST(&ehdr)); in token_print()
171 if (IS_SOURCE_ROUTED(trp)) { in token_print()
176 token_hdr_print(ndo, trp, length, ESRC(&ehdr), EDST(&ehdr)); in token_print()
182 route_len = RIF_LENGTH(trp); in token_print()
189 ND_PRINT((ndo, "%s ", broadcast_indicator[BROADCAST(trp)])); in token_print()
190 ND_PRINT((ndo, "%s", direction[DIRECTION(trp)])); in token_print()
192 for (seg = 0; seg < SEGMENT_COUNT(trp); seg++) in token_print()
193 ND_PRINT((ndo, " [%d:%d]", RING_NUMBER(trp, seg), in token_print()
194 BRIDGE_NUMBER(trp, seg))); in token_print()
196 ND_PRINT((ndo, "rt = %x", EXTRACT_16BITS(&trp->token_rcf))); in token_print()
198 for (seg = 0; seg < SEGMENT_COUNT(trp); seg++) in token_print()
199 ND_PRINT((ndo, ":%x", EXTRACT_16BITS(&trp->token_rseg[seg]))); in token_print()
201 ND_PRINT((ndo, " (%s) ", largest_frame[LARGEST_FRAME(trp)])); in token_print()
204 token_hdr_print(ndo, trp, length, ESRC(&ehdr), EDST(&ehdr)); in token_print()
218 if (FRAME_TYPE(trp) == TOKEN_FC_LLC) { in token_print()
232 token_hdr_print(ndo, trp, length + TOKEN_HDRLEN + route_len, in token_print()