Home | History | Annotate | Download | only in tcpdump

Lines Matching defs:ap

80 #define ar_sha(ap)	(((const u_char *)((ap)+1))+0)
81 #define ar_spa(ap) (((const u_char *)((ap)+1))+ (ap)->ar_hln)
82 #define ar_tha(ap) (((const u_char *)((ap)+1))+ (ap)->ar_hln+(ap)->ar_pln)
83 #define ar_tpa(ap) (((const u_char *)((ap)+1))+2*(ap)->ar_hln+(ap)->ar_pln)
88 #define HRD(ap) EXTRACT_16BITS(&(ap)->ar_hrd)
89 #define HRD_LEN(ap) ((ap)->ar_hln)
90 #define PROTO_LEN(ap) ((ap)->ar_pln)
91 #define OP(ap) EXTRACT_16BITS(&(ap)->ar_op)
92 #define PRO(ap) EXTRACT_16BITS(&(ap)->ar_pro)
93 #define SHA(ap) (ar_sha(ap))
94 #define SPA(ap) (ar_spa(ap))
95 #define THA(ap) (ar_tha(ap))
96 #define TPA(ap) (ar_tpa(ap))
155 #define ATMHRD(ap) EXTRACT_16BITS(&(ap)->aar_hrd)
156 #define ATMSHRD_LEN(ap) ((ap)->aar_shtl & ATMARP_LEN_MASK)
157 #define ATMSSLN(ap) ((ap)->aar_sstl & ATMARP_LEN_MASK)
158 #define ATMSPROTO_LEN(ap) ((ap)->aar_spln)
159 #define ATMOP(ap) EXTRACT_16BITS(&(ap)->aar_op)
160 #define ATMPRO(ap) EXTRACT_16BITS(&(ap)->aar_pro)
161 #define ATMTHRD_LEN(ap) ((ap)->aar_thtl & ATMARP_LEN_MASK)
162 #define ATMTSLN(ap) ((ap)->aar_tstl & ATMARP_LEN_MASK)
163 #define ATMTPROTO_LEN(ap) ((ap)->aar_tpln)
164 #define aar_sha(ap) ((const u_char *)((ap)+1))
165 #define aar_ssa(ap) (aar_sha(ap) + ATMSHRD_LEN(ap))
166 #define aar_spa(ap) (aar_ssa(ap) + ATMSSLN(ap))
167 #define aar_tha(ap) (aar_spa(ap) + ATMSPROTO_LEN(ap))
168 #define aar_tsa(ap) (aar_tha(ap) + ATMTHRD_LEN(ap))
169 #define aar_tpa(ap) (aar_tsa(ap) + ATMTSLN(ap))
172 #define ATMSHA(ap) (aar_sha(ap))
173 #define ATMSSA(ap) (aar_ssa(ap))
174 #define ATMSPA(ap) (aar_spa(ap))
175 #define ATMTHA(ap) (aar_tha(ap))
176 #define ATMTSA(ap) (aar_tsa(ap))
177 #define ATMTPA(ap) (aar_tpa(ap))
200 const struct atmarp_pkthdr *ap;
203 ap = (const struct atmarp_pkthdr *)bp;
204 ND_TCHECK(*ap);
206 hrd = ATMHRD(ap);
207 pro = ATMPRO(ap);
208 op = ATMOP(ap);
210 if (!ND_TTEST2(*aar_tpa(ap), ATMTPROTO_LEN(ap))) {
212 ND_DEFAULTPRINT((const u_char *)ap, length);
221 ATMSPROTO_LEN(ap) != 4 ||
222 ATMTPROTO_LEN(ap) != 4 ||
227 ATMSPROTO_LEN(ap),
228 ATMTPROTO_LEN(ap)));
244 ND_PRINT((ndo, "who-has %s", ipaddr_string(ndo, ATMTPA(ap))));
245 if (ATMTHRD_LEN(ap) != 0) {
247 atmarp_addr_print(ndo, ATMTHA(ap), ATMTHRD_LEN(ap),
248 ATMTSA(ap), ATMTSLN(ap));
251 ND_PRINT((ndo, "tell %s", ipaddr_string(ndo, ATMSPA(ap))));
255 ND_PRINT((ndo, "%s is-at ", ipaddr_string(ndo, ATMSPA(ap))));
256 atmarp_addr_print(ndo, ATMSHA(ap), ATMSHRD_LEN(ap), ATMSSA(ap),
257 ATMSSLN(ap));
262 atmarp_addr_print(ndo, ATMTHA(ap), ATMTHRD_LEN(ap), ATMTSA(ap),
263 ATMTSLN(ap));
265 atmarp_addr_print(ndo, ATMSHA(ap), ATMSHRD_LEN(ap), ATMSSA(ap),
266 ATMSSLN(ap));
270 atmarp_addr_print(ndo, ATMSHA(ap), ATMSHRD_LEN(ap), ATMSSA(ap),
271 ATMSSLN(ap));
272 ND_PRINT((ndo, "at %s", ipaddr_string(ndo, ATMSPA(ap))));
276 ND_PRINT((ndo, "for %s", ipaddr_string(ndo, ATMSPA(ap))));
280 ND_DEFAULTPRINT((const u_char *)ap, caplen);
296 const struct arp_pkthdr *ap;
299 ap = (const struct arp_pkthdr *)bp;
300 ND_TCHECK(*ap);
302 hrd = HRD(ap);
303 pro = PRO(ap);
304 op = OP(ap);
324 if (!ND_TTEST2(*ar_tpa(ap), PROTO_LEN(ap))) {
326 ND_DEFAULTPRINT((const u_char *)ap, length);
336 PROTO_LEN(ap) != 4 ||
337 HRD_LEN(ap) == 0 ||
341 HRD_LEN(ap),
343 PROTO_LEN(ap)));
359 ND_PRINT((ndo, "who-has %s", ipaddr_string(ndo, TPA(ap))));
360 if (memcmp((const char *)ezero, (const char *)THA(ap), HRD_LEN(ap)) != 0)
362 linkaddr_string(ndo, THA(ap), linkaddr, HRD_LEN(ap))));
363 ND_PRINT((ndo, " tell %s", ipaddr_string(ndo, SPA(ap))));
368 ipaddr_string(ndo, SPA(ap)),
369 linkaddr_string(ndo, SHA(ap), linkaddr, HRD_LEN(ap))));
374 linkaddr_string(ndo, THA(ap), linkaddr, HRD_LEN(ap)),
375 linkaddr_string(ndo, SHA(ap), linkaddr, HRD_LEN(ap))));
380 linkaddr_string(ndo, THA(ap), linkaddr, HRD_LEN(ap)),
381 ipaddr_string(ndo, TPA(ap))));
386 linkaddr_string(ndo, THA(ap), linkaddr, HRD_LEN(ap)),
387 linkaddr_string(ndo, SHA(ap), linkaddr, HRD_LEN(ap))));
392 linkaddr_string(ndo, SHA(ap), linkaddr, HRD_LEN(ap)),
393 ipaddr_string(ndo, SPA(ap))));
397 ND_DEFAULTPRINT((const u_char *)ap, caplen);