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