add a backport of tcpdump-mini from /packages to 8.09
[openwrt/svn-archive/archive.git] / net / tcpdump-mini / patches / 100-tcpdump_mini.patch
1 --- a/Makefile.in
2 +++ b/Makefile.in
3 @@ -68,34 +68,37 @@ RANLIB = @RANLIB@
4
5 CSRC = addrtoname.c af.c checksum.c cpack.c gmpls.c oui.c gmt2local.c ipproto.c \
6 nlpid.c l2vpn.c machdep.c parsenfsfh.c \
7 - print-802_11.c print-ap1394.c print-ah.c print-arcnet.c \
8 - print-aodv.c print-arp.c print-ascii.c print-atalk.c print-atm.c \
9 - print-beep.c print-bfd.c print-bgp.c print-bootp.c print-bt.c \
10 - print-cdp.c print-cfm.c print-chdlc.c print-cip.c print-cnfp.c \
11 - print-dccp.c print-decnet.c \
12 - print-domain.c print-dtp.c print-dvmrp.c print-enc.c print-egp.c \
13 - print-eap.c print-eigrp.c\
14 - print-esp.c print-ether.c print-fddi.c print-fr.c \
15 - print-gre.c print-hsrp.c print-icmp.c print-igmp.c \
16 - print-igrp.c print-ip.c print-ipcomp.c print-ipfc.c \
17 - print-ipx.c print-isoclns.c print-juniper.c print-krb.c \
18 - print-l2tp.c print-lane.c print-ldp.c print-lldp.c print-llc.c \
19 - print-lmp.c print-lspping.c print-lwapp.c \
20 - print-lwres.c print-mobile.c print-mpcp.c print-mpls.c print-msdp.c \
21 + print-802_11.c print-aodv.c print-arp.c print-ascii.c \
22 + print-bgp.c print-bootp.c print-domain.c print-eap.c print-ether.c \
23 + print-gre.c print-icmp.c print-igmp.c print-ip.c \
24 + print-l2tp.c print-lldp.c print-llc.c \
25 print-nfs.c print-ntp.c print-null.c print-olsr.c print-ospf.c \
26 - print-pgm.c print-pim.c print-ppp.c print-pppoe.c print-pptp.c \
27 - print-radius.c print-raw.c print-rip.c print-rrcp.c print-rsvp.c \
28 - print-rx.c print-sctp.c print-sflow.c print-sip.c print-sl.c print-sll.c \
29 - print-slow.c print-snmp.c print-stp.c print-sunatm.c print-sunrpc.c \
30 - print-symantec.c print-syslog.c print-tcp.c print-telnet.c print-tftp.c \
31 - print-timed.c print-token.c print-udld.c print-udp.c \
32 - print-vjc.c print-vqp.c print-vrrp.c print-vtp.c \
33 - print-wb.c print-zephyr.c setsignal.c tcpdump.c util.c
34 + print-ppp.c print-pppoe.c print-pptp.c print-radius.c print-raw.c print-rsvp.c \
35 + print-sctp.c print-sip.c print-snmp.c print-stp.c print-sunrpc.c \
36 + print-syslog.c print-tcp.c print-telnet.c print-tftp.c print-udp.c \
37 + setsignal.c tcpdump.c util.c
38 +
39 +ifndef TCPDUMP_MINI
40 +
41 +CSRC += \
42 + print-ah.c print-ap1394.c print-arcnet.c print-atalk.c print-atm.c \
43 + print-beep.c print-bfd.c print-bt.c print-cfm.c print-chdlc.c print-cdp.c \
44 + print-cip.c print-cnfp.c print-dccp.c print-decnet.c print-dtp.c \
45 + print-dvmrp.c print-eigrp.c print-enc.c print-esp.c print-fddi.c print-fr.c print-hsrp.c \
46 + print-igrp.c print-ipfc.c print-ipx.c print-ipcomp.c print-isoclns.c print-juniper.c print-lane.c \
47 + print-ldp.c print-lmp.c print-lspping.c print-lwapp.c print-egp.c print-krb.c \
48 + print-lwres.c print-mobile.c print-mpcp.c print-mpls.c print-msdp.c \
49 + print-pim.c print-pgm.c print-rip.c print-rrcp.c print-rx.c print-sflow.c print-slow.c print-sl.c \
50 + print-sll.c print-sunatm.c print-symantec.c print-timed.c print-token.c print-udld.c \
51 + print-vjc.c print-vqp.c print-wb.c print-zephyr.c print-vrrp.c print-vtp.c
52 +
53
54 LIBNETDISSECT_SRC=print-isakmp.c
55 LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o)
56 LIBNETDISSECT=libnetdissect.a
57
58 +endif
59 +
60 LOCALSRC = @LOCALSRC@
61 GENSRC = version.c
62 LIBOBJS = @LIBOBJS@
63 @@ -279,10 +282,12 @@ $(PROG): $(OBJ) @V_PCAPDEP@
64 @rm -f $@
65 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
66
67 +ifndef TCPDUMP_MINI
68 $(LIBNETDISSECT): $(LIBNETDISSECT_OBJ)
69 @rm -f $@
70 $(AR) cr $@ $(LIBNETDISSECT_OBJ)
71 $(RANLIB) $@
72 +endif
73
74 datalinks.o: $(srcdir)/missing/datalinks.c
75 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c
76 --- a/addrtoname.c
77 +++ b/addrtoname.c
78 @@ -518,9 +518,11 @@ linkaddr_string(const u_char *ep, const
79 return etheraddr_string(ep);
80 }
81
82 +#ifndef TCPDUMP_MINI
83 if (type == LINKADDR_FRELAY) {
84 return q922_string(ep);
85 }
86 +#endif
87
88 tp = lookup_bytestring(ep, len);
89 if (tp->e_name)
90 @@ -1121,6 +1123,7 @@ init_addrtoname(u_int32_t localnet, u_in
91 init_ipxsaparray();
92 }
93
94 +#ifndef TCPDUMP_MINI
95 const char *
96 dnaddr_string(u_short dnaddr)
97 {
98 @@ -1140,6 +1143,7 @@ dnaddr_string(u_short dnaddr)
99
100 return(tp->name);
101 }
102 +#endif
103
104 /* Return a zero'ed hnamemem struct and cuts down on calloc() overhead */
105 struct hnamemem *
106 --- a/print-llc.c
107 +++ b/print-llc.c
108 @@ -195,7 +195,7 @@ llc_print(const u_char *p, u_int length,
109 control = EXTRACT_LE_16BITS(p + 2);
110 is_u = 0;
111 }
112 -
113 +#ifndef TCPDUMP_MINI
114 if (ssap_field == LLCSAP_GLOBAL && dsap_field == LLCSAP_GLOBAL) {
115 /*
116 * This is an Ethernet_802.3 IPX frame; it has an
117 @@ -218,6 +218,7 @@ llc_print(const u_char *p, u_int length,
118 ipx_print(p, length);
119 return (1);
120 }
121 +#endif
122
123 dsap = dsap_field & ~LLC_IG;
124 ssap = ssap_field & ~LLC_GSAP;
125 @@ -250,6 +251,7 @@ llc_print(const u_char *p, u_int length,
126 return (1);
127 }
128
129 +#ifndef TCPDUMP_MINI
130 if (ssap == LLCSAP_IPX && dsap == LLCSAP_IPX &&
131 control == LLC_UI) {
132 /*
133 @@ -265,6 +267,7 @@ llc_print(const u_char *p, u_int length,
134 ipx_print(p+3, length-3);
135 return (1);
136 }
137 +#endif
138
139 #ifdef TCPDUMP_DO_SMB
140 if (ssap == LLCSAP_NETBEUI && dsap == LLCSAP_NETBEUI
141 @@ -296,11 +299,13 @@ llc_print(const u_char *p, u_int length,
142 return (1);
143 }
144 #endif
145 +#ifndef TCPDUMP_MINI
146 if (ssap == LLCSAP_ISONS && dsap == LLCSAP_ISONS
147 && control == LLC_UI) {
148 isoclns_print(p + 3, length - 3, caplen - 3);
149 return (1);
150 }
151 +#endif
152
153 if (ssap == LLCSAP_SNAP && dsap == LLCSAP_SNAP
154 && control == LLC_UI) {
155 @@ -444,6 +449,7 @@ snap_print(const u_char *p, u_int length
156
157 case OUI_CISCO:
158 switch (et) {
159 +#ifndef TCPDUMP_MINI
160 case PID_CISCO_CDP:
161 cdp_print(p, length, caplen);
162 return (1);
163 @@ -456,6 +462,7 @@ snap_print(const u_char *p, u_int length
164 case PID_CISCO_VTP:
165 vtp_print(p, length);
166 return (1);
167 +#endif
168 case PID_CISCO_PVST:
169 stp_print(p, length);
170 return (1);
171 @@ -486,6 +493,7 @@ snap_print(const u_char *p, u_int length
172 ether_print(p, length, caplen);
173 return (1);
174
175 +#ifndef TCPDUMP_MINI
176 case PID_RFC2684_802_5_FCS:
177 case PID_RFC2684_802_5_NOFCS:
178 /*
179 @@ -527,6 +535,7 @@ snap_print(const u_char *p, u_int length
180 */
181 fddi_print(p, length, caplen);
182 return (1);
183 +#endif
184
185 case PID_RFC2684_BPDU:
186 stp_print(p, length);
187 --- a/print-null.c
188 +++ b/print-null.c
189 @@ -128,7 +128,7 @@ null_if_print(const struct pcap_pkthdr *
190 ip6_print(p, length);
191 break;
192 #endif
193 -
194 +#ifndef TCPDUMP_MINI
195 case BSD_AFNUM_ISO:
196 isoclns_print(p, length, caplen);
197 break;
198 @@ -140,7 +140,7 @@ null_if_print(const struct pcap_pkthdr *
199 case BSD_AFNUM_IPX:
200 ipx_print(p, length);
201 break;
202 -
203 +#endif
204 default:
205 /* unknown AF_ value */
206 if (!eflag)
207 --- a/tcpdump.c
208 +++ b/tcpdump.c
209 @@ -138,11 +138,14 @@ struct printer {
210 };
211
212 static struct printer printers[] = {
213 +#ifndef TCPDUMP_MINI
214 { arcnet_if_print, DLT_ARCNET },
215 #ifdef DLT_ARCNET_LINUX
216 { arcnet_linux_if_print, DLT_ARCNET_LINUX },
217 #endif
218 +#endif
219 { ether_if_print, DLT_EN10MB },
220 +#ifndef TCPDUMP_MINI
221 { token_if_print, DLT_IEEE802 },
222 #ifdef DLT_LANE8023
223 { lane_if_print, DLT_LANE8023 },
224 @@ -157,19 +160,23 @@ static struct printer printers[] = {
225 #ifdef DLT_SLIP_BSDOS
226 { sl_bsdos_if_print, DLT_SLIP_BSDOS },
227 #endif
228 +#endif
229 { ppp_if_print, DLT_PPP },
230 #ifdef DLT_PPP_WITHDIRECTION
231 { ppp_if_print, DLT_PPP_WITHDIRECTION },
232 #endif
233 +#ifndef TCPDUMP_MINI
234 #ifdef DLT_PPP_BSDOS
235 { ppp_bsdos_if_print, DLT_PPP_BSDOS },
236 #endif
237 { fddi_if_print, DLT_FDDI },
238 +#endif
239 { null_if_print, DLT_NULL },
240 #ifdef DLT_LOOP
241 { null_if_print, DLT_LOOP },
242 #endif
243 { raw_if_print, DLT_RAW },
244 +#ifndef TCPDUMP_MINI
245 { atm_if_print, DLT_ATM_RFC1483 },
246 #ifdef DLT_C_HDLC
247 { chdlc_if_print, DLT_C_HDLC },
248 @@ -180,15 +187,19 @@ static struct printer printers[] = {
249 #ifdef DLT_PPP_SERIAL
250 { ppp_hdlc_if_print, DLT_PPP_SERIAL },
251 #endif
252 +#endif
253 #ifdef DLT_PPP_ETHER
254 { pppoe_if_print, DLT_PPP_ETHER },
255 #endif
256 +#ifndef TCPDUMP_MINI
257 #ifdef DLT_LINUX_SLL
258 { sll_if_print, DLT_LINUX_SLL },
259 #endif
260 +#endif
261 #ifdef DLT_IEEE802_11
262 { ieee802_11_if_print, DLT_IEEE802_11},
263 #endif
264 +#ifndef TCPDUMP_MINI
265 #ifdef DLT_LTALK
266 { ltalk_if_print, DLT_LTALK },
267 #endif
268 @@ -207,12 +218,14 @@ static struct printer printers[] = {
269 #ifdef DLT_IP_OVER_FC
270 { ipfc_if_print, DLT_IP_OVER_FC },
271 #endif
272 +#endif
273 #ifdef DLT_PRISM_HEADER
274 { prism_if_print, DLT_PRISM_HEADER },
275 #endif
276 #ifdef DLT_IEEE802_11_RADIO
277 { ieee802_11_radio_if_print, DLT_IEEE802_11_RADIO },
278 #endif
279 +#ifndef TCPDUMP_MINI
280 #ifdef DLT_ENC
281 { enc_if_print, DLT_ENC },
282 #endif
283 @@ -222,9 +235,11 @@ static struct printer printers[] = {
284 #ifdef DLT_APPLE_IP_OVER_IEEE1394
285 { ap1394_if_print, DLT_APPLE_IP_OVER_IEEE1394 },
286 #endif
287 +#endif
288 #ifdef DLT_IEEE802_11_RADIO_AVS
289 { ieee802_11_radio_avs_if_print, DLT_IEEE802_11_RADIO_AVS },
290 #endif
291 +#ifndef TCPDUMP_MINI
292 #ifdef DLT_JUNIPER_ATM1
293 { juniper_atm1_print, DLT_JUNIPER_ATM1 },
294 #endif
295 @@ -276,6 +291,7 @@ static struct printer printers[] = {
296 #if defined(DLT_BLUETOOTH_HCI_H4_WITH_PHDR) && defined(HAVE_PCAP_BLUETOOTH_H)
297 { bt_if_print, DLT_BLUETOOTH_HCI_H4_WITH_PHDR},
298 #endif
299 +#endif
300 { NULL, 0 },
301 };
302
303 --- a/print-ether.c
304 +++ b/print-ether.c
305 @@ -205,6 +205,7 @@ ether_encap_print(u_short ether_type, co
306 arp_print(gndo, p, length, caplen);
307 return (1);
308
309 +#ifndef TCPDUMP_MINI
310 case ETHERTYPE_DN:
311 decnet_print(p, length, caplen);
312 return (1);
313 @@ -223,7 +224,7 @@ ether_encap_print(u_short ether_type, co
314 printf("(NOV-ETHII) ");
315 ipx_print(p, length);
316 return (1);
317 -
318 +#endif
319 case ETHERTYPE_8021Q:
320 if (eflag)
321 printf("vlan %u, p %u%s, ",
322 @@ -283,10 +284,11 @@ ether_encap_print(u_short ether_type, co
323
324 return (1);
325
326 +#ifndef TCPDUMP_MINI
327 case ETHERTYPE_ISO:
328 isoclns_print(p+1, length-1, length-1);
329 return(1);
330 -
331 +#endif
332 case ETHERTYPE_PPPOED:
333 case ETHERTYPE_PPPOES:
334 pppoe_print(p, length);
335 @@ -296,10 +298,11 @@ ether_encap_print(u_short ether_type, co
336 eap_print(gndo, p, length);
337 return (1);
338
339 +#ifndef TCPDUMP_MINI
340 case ETHERTYPE_RRCP:
341 rrcp_print(gndo, p - 14 , length + 14);
342 return (1);
343 -
344 +#endif
345 case ETHERTYPE_PPP:
346 if (length) {
347 printf(": ");
348 @@ -307,6 +310,7 @@ ether_encap_print(u_short ether_type, co
349 }
350 return (1);
351
352 +#ifndef TCPDUMP_MINI
353 case ETHERTYPE_MPCP:
354 mpcp_print(p, length);
355 return (1);
356 @@ -319,7 +323,7 @@ ether_encap_print(u_short ether_type, co
357 case ETHERTYPE_CFM_OLD:
358 cfm_print(p, length);
359 return (1);
360 -
361 +#endif
362 case ETHERTYPE_LLDP:
363 lldp_print(p, length);
364 return (1);
365 @@ -327,11 +331,12 @@ ether_encap_print(u_short ether_type, co
366 case ETHERTYPE_LOOPBACK:
367 return (1);
368
369 +#ifndef TCPDUMP_MINI
370 case ETHERTYPE_MPLS:
371 case ETHERTYPE_MPLS_MULTI:
372 mpls_print(p, length);
373 return (1);
374 -
375 +#endif
376 case ETHERTYPE_LAT:
377 case ETHERTYPE_SCA:
378 case ETHERTYPE_MOPRC:
379 --- a/print-gre.c
380 +++ b/print-gre.c
381 @@ -213,6 +213,7 @@ gre_print_0(const u_char *bp, u_int leng
382 ip6_print(bp, len);
383 break;
384 #endif
385 +#ifndef TCPDUMP_MINI
386 case ETHERTYPE_MPLS:
387 mpls_print(bp, len);
388 break;
389 @@ -225,6 +226,7 @@ gre_print_0(const u_char *bp, u_int leng
390 case ETHERTYPE_GRE_ISO:
391 isoclns_print(bp, len, len);
392 break;
393 +#endif
394 default:
395 printf("gre-proto-0x%x", prot);
396 }
397 --- a/print-igmp.c
398 +++ b/print-igmp.c
399 @@ -303,6 +303,7 @@ igmp_print(register const u_char *bp, re
400 TCHECK2(bp[4], 4);
401 (void)printf("igmp leave %s", ipaddr_string(&bp[4]));
402 break;
403 +#ifndef TCPDUMP_MINI
404 case 0x13:
405 (void)printf("igmp dvmrp");
406 if (len < 8)
407 @@ -314,6 +315,7 @@ igmp_print(register const u_char *bp, re
408 (void)printf("igmp pimv1");
409 pimv1_print(bp, len);
410 break;
411 +#endif
412 case 0x1e:
413 print_mresp(bp, len);
414 break;
415 --- a/print-ip.c
416 +++ b/print-ip.c
417 @@ -380,6 +380,7 @@ ip_print_demux(netdissect_options *ndo,
418 again:
419 switch (ipds->nh) {
420
421 +#ifndef TCPDUMP_MINI
422 case IPPROTO_AH:
423 ipds->nh = *ipds->cp;
424 ipds->advance = ah_print(ipds->cp);
425 @@ -414,14 +415,16 @@ again:
426 ipds->nh = enh & 0xff;
427 goto again;
428 }
429 -
430 +#endif
431 case IPPROTO_SCTP:
432 sctp_print(ipds->cp, (const u_char *)ipds->ip, ipds->len);
433 break;
434
435 +#ifndef TCPDUMP_MINI
436 case IPPROTO_DCCP:
437 dccp_print(ipds->cp, (const u_char *)ipds->ip, ipds->len);
438 break;
439 +#endif
440
441 case IPPROTO_TCP:
442 /* pass on the MF bit plus the offset to detect fragments */
443 @@ -441,6 +444,7 @@ again:
444 ipds->off & (IP_MF|IP_OFFMASK));
445 break;
446
447 +#ifndef TCPDUMP_MINI
448 case IPPROTO_PIGP:
449 /*
450 * XXX - the current IANA protocol number assignments
451 @@ -461,15 +465,16 @@ again:
452 case IPPROTO_EIGRP:
453 eigrp_print(ipds->cp, ipds->len);
454 break;
455 -
456 +#endif
457 case IPPROTO_ND:
458 ND_PRINT((ndo, " nd %d", ipds->len));
459 break;
460
461 +#ifndef TCPDUMP_MINI
462 case IPPROTO_EGP:
463 egp_print(ipds->cp, ipds->len);
464 break;
465 -
466 +#endif
467 case IPPROTO_OSPF:
468 ospf_print(ipds->cp, ipds->len, (const u_char *)ipds->ip);
469 break;
470 @@ -503,10 +508,10 @@ again:
471 gre_print(ipds->cp, ipds->len);
472 break;
473
474 +#ifndef TCPDUMP_MINI
475 case IPPROTO_MOBILE:
476 mobile_print(ipds->cp, ipds->len);
477 break;
478 -
479 case IPPROTO_PIM:
480 pim_print(ipds->cp, ipds->len);
481 break;
482 @@ -518,7 +523,7 @@ again:
483 case IPPROTO_PGM:
484 pgm_print(ipds->cp, ipds->len, (const u_char *)ipds->ip);
485 break;
486 -
487 +#endif
488 default:
489 if ((proto = getprotobynumber(ipds->nh)) != NULL)
490 ND_PRINT((ndo, " %s", proto->p_name));
491 --- a/print-ppp.c
492 +++ b/print-ppp.c
493 @@ -1262,7 +1262,7 @@ trunc:
494 return 0;
495 }
496
497 -
498 +#ifndef TCPDUMP_MINI
499 static void
500 ppp_hdlc(const u_char *p, int length)
501 {
502 @@ -1327,17 +1327,19 @@ cleanup:
503 free(b);
504 return;
505 }
506 +#endif
507
508
509 /* PPP */
510 static void
511 handle_ppp(u_int proto, const u_char *p, int length)
512 {
513 +#ifndef TCPDUMP_MINI
514 if ((proto & 0xff00) == 0x7e00) {/* is this an escape code ? */
515 ppp_hdlc(p-1, length);
516 return;
517 }
518 -
519 +#endif
520 switch (proto) {
521 case PPP_LCP: /* fall through */
522 case PPP_IPCP:
523 @@ -1371,6 +1373,7 @@ handle_ppp(u_int proto, const u_char *p,
524 ip6_print(p, length);
525 break;
526 #endif
527 +#ifndef TCPDUMP_MINI
528 case ETHERTYPE_IPX: /*XXX*/
529 case PPP_IPX:
530 ipx_print(p, length);
531 @@ -1382,6 +1385,7 @@ handle_ppp(u_int proto, const u_char *p,
532 case PPP_MPLS_MCAST:
533 mpls_print(p, length);
534 break;
535 +#endif
536 case PPP_COMP:
537 printf("compressed PPP data");
538 break;
539 @@ -1520,6 +1524,7 @@ ppp_if_print(const struct pcap_pkthdr *h
540 return (0);
541 }
542
543 +#ifndef TCPDUMP_MINI
544 /*
545 * PPP I/F printer to use if we know that RFC 1662-style PPP in HDLC-like
546 * framing, or Cisco PPP with HDLC framing as per section 4.3.1 of RFC 1547,
547 @@ -1747,7 +1752,7 @@ printx:
548 #endif /* __bsdi__ */
549 return (hdrlength);
550 }
551 -
552 +#endif
553
554 /*
555 * Local Variables:
556 --- a/print-tcp.c
557 +++ b/print-tcp.c
558 @@ -669,8 +669,10 @@ tcp_print(register const u_char *bp, reg
559 else if (sport == SMB_PORT || dport == SMB_PORT)
560 smb_tcp_print(bp, length);
561 #endif
562 +#ifndef TCPDUMP_MINI
563 else if (sport == BEEP_PORT || dport == BEEP_PORT)
564 beep_print(bp, length);
565 +#endif
566 else if (length > 2 &&
567 (sport == NAMESERVER_PORT || dport == NAMESERVER_PORT ||
568 sport == MULTICASTDNS_PORT || dport == MULTICASTDNS_PORT)) {
569 @@ -679,11 +681,12 @@ tcp_print(register const u_char *bp, reg
570 * XXX packet could be unaligned, it can go strange
571 */
572 ns_print(bp + 2, length - 2, 0);
573 +#ifndef TCPDUMP_MINI
574 } else if (sport == MSDP_PORT || dport == MSDP_PORT) {
575 msdp_print(bp, length);
576 - }
577 - else if (length > 0 && (sport == LDP_PORT || dport == LDP_PORT)) {
578 + } else if (length > 0 && (sport == LDP_PORT || dport == LDP_PORT)) {
579 ldp_print(bp, length);
580 +#endif
581 }
582
583 return;
584 --- a/print-udp.c
585 +++ b/print-udp.c
586 @@ -478,11 +478,12 @@ udp_print(register const u_char *bp, u_i
587 vat_print((void *)(up + 1), up);
588 break;
589
590 +#ifndef TCPDUMP_MINI
591 case PT_WB:
592 udpipaddr_print(ip, sport, dport);
593 wb_print((void *)(up + 1), length);
594 break;
595 -
596 +#endif
597 case PT_RPC:
598 rp = (struct sunrpc_msg *)(up + 1);
599 direction = (enum sunrpc_msg_type)EXTRACT_32BITS(&rp->rm_direction);
600 @@ -510,11 +511,12 @@ udp_print(register const u_char *bp, u_i
601 snmp_print((const u_char *)(up + 1), length);
602 break;
603
604 +#ifndef TCPDUMP_MINI
605 case PT_CNFP:
606 udpipaddr_print(ip, sport, dport);
607 cnfp_print(cp, (const u_char *)ip);
608 break;
609 -
610 +#endif
611 case PT_TFTP:
612 udpipaddr_print(ip, sport, dport);
613 tftp_print(cp, length);
614 @@ -557,6 +559,7 @@ udp_print(register const u_char *bp, u_i
615 }
616 #endif
617 }
618 +#ifndef TCPDUMP_MINI
619 if (TTEST(((struct LAP *)cp)->type) &&
620 ((struct LAP *)cp)->type == lapDDP &&
621 (atalk_port(sport) || atalk_port(dport))) {
622 @@ -565,6 +568,7 @@ udp_print(register const u_char *bp, u_i
623 llap_print(cp, length);
624 return;
625 }
626 +#endif
627 }
628 udpipaddr_print(ip, sport, dport);
629
630 @@ -600,14 +604,18 @@ udp_print(register const u_char *bp, u_i
631 ns_print((const u_char *)(up + 1), length, 0);
632 else if (ISPORT(MULTICASTDNS_PORT))
633 ns_print((const u_char *)(up + 1), length, 1);
634 +#ifndef TCPDUMP_MINI
635 else if (ISPORT(TIMED_PORT))
636 timed_print((const u_char *)(up + 1));
637 +#endif
638 else if (ISPORT(TFTP_PORT))
639 tftp_print((const u_char *)(up + 1), length);
640 else if (ISPORT(IPPORT_BOOTPC) || ISPORT(IPPORT_BOOTPS))
641 bootp_print((const u_char *)(up + 1), length);
642 +#ifndef TCPDUMP_MINI
643 else if (ISPORT(RIP_PORT))
644 rip_print((const u_char *)(up + 1), length);
645 +#endif
646 else if (ISPORT(AODV_PORT))
647 aodv_print((const u_char *)(up + 1), length,
648 #ifdef INET6
649 @@ -615,6 +623,7 @@ udp_print(register const u_char *bp, u_i
650 #else
651 0);
652 #endif
653 +#ifndef TCPDUMP_MINI
654 else if (ISPORT(ISAKMP_PORT))
655 isakmp_print(gndo, (const u_char *)(up + 1), length, bp2);
656 else if (ISPORT(ISAKMP_PORT_NATT))
657 @@ -623,12 +632,15 @@ udp_print(register const u_char *bp, u_i
658 else if (ISPORT(ISAKMP_PORT_USER1) || ISPORT(ISAKMP_PORT_USER2))
659 isakmp_print(gndo, (const u_char *)(up + 1), length, bp2);
660 #endif
661 +#endif
662 else if (ISPORT(SNMP_PORT) || ISPORT(SNMPTRAP_PORT))
663 snmp_print((const u_char *)(up + 1), length);
664 else if (ISPORT(NTP_PORT))
665 ntp_print((const u_char *)(up + 1), length);
666 +#ifndef TCPDUMP_MINI
667 else if (ISPORT(KERBEROS_PORT) || ISPORT(KERBEROS_SEC_PORT))
668 krb_print((const void *)(up + 1));
669 +#endif
670 else if (ISPORT(L2TP_PORT))
671 l2tp_print((const u_char *)(up + 1), length);
672 #ifdef TCPDUMP_DO_SMB
673 @@ -639,6 +651,7 @@ udp_print(register const u_char *bp, u_i
674 #endif
675 else if (dport == 3456)
676 vat_print((const void *)(up + 1), up);
677 +#ifndef TCPDUMP_MINI
678 else if (ISPORT(ZEPHYR_SRV_PORT) || ISPORT(ZEPHYR_CLT_PORT))
679 zephyr_print((const void *)(up + 1), length);
680 /*
681 @@ -649,6 +662,7 @@ udp_print(register const u_char *bp, u_i
682 (dport >= RX_PORT_LOW && dport <= RX_PORT_HIGH))
683 rx_print((const void *)(up + 1), length, sport, dport,
684 (u_char *) ip);
685 +#endif
686 #ifdef INET6
687 else if (ISPORT(RIPNG_PORT))
688 ripng_print((const u_char *)(up + 1), length);
689 @@ -659,23 +673,28 @@ udp_print(register const u_char *bp, u_i
690 /*
691 * Kludge in test for whiteboard packets.
692 */
693 +#ifndef TCPDUMP_MINI
694 else if (dport == 4567)
695 wb_print((const void *)(up + 1), length);
696 else if (ISPORT(CISCO_AUTORP_PORT))
697 cisco_autorp_print((const void *)(up + 1), length);
698 +#endif
699 else if (ISPORT(RADIUS_PORT) ||
700 ISPORT(RADIUS_NEW_PORT) ||
701 ISPORT(RADIUS_ACCOUNTING_PORT) ||
702 ISPORT(RADIUS_NEW_ACCOUNTING_PORT) )
703 radius_print((const u_char *)(up+1), length);
704 +#ifndef TCPDUMP_MINI
705 else if (dport == HSRP_PORT)
706 hsrp_print((const u_char *)(up + 1), length);
707 else if (ISPORT(LWRES_PORT))
708 lwres_print((const u_char *)(up + 1), length);
709 else if (ISPORT(LDP_PORT))
710 ldp_print((const u_char *)(up + 1), length);
711 +#endif
712 else if (ISPORT(OLSR_PORT))
713 olsr_print((const u_char *)(up + 1), length);
714 +#ifndef TCPDUMP_MINI
715 else if (ISPORT(MPLS_LSP_PING_PORT))
716 lspping_print((const u_char *)(up + 1), length);
717 else if (dport == BFD_CONTROL_PORT ||
718 @@ -693,6 +712,7 @@ udp_print(register const u_char *bp, u_i
719 lwapp_control_print((const u_char *)(up + 1), length, 0);
720 else if (ISPORT(LWAPP_DATA_PORT))
721 lwapp_data_print((const u_char *)(up + 1), length);
722 +#endif
723 else if (ISPORT(SIP_PORT))
724 sip_print((const u_char *)(up + 1), length);
725 else if (ISPORT(SYSLOG_PORT))