3 @@ -68,34 +68,37 @@ RANLIB = @RANLIB@
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
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
54 LIBNETDISSECT_SRC=print-isakmp.c
55 LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o)
56 LIBNETDISSECT=libnetdissect.a
63 @@ -279,10 +282,12 @@ $(PROG): $(OBJ) @V_PCAPDEP@
65 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
68 $(LIBNETDISSECT): $(LIBNETDISSECT_OBJ)
70 $(AR) cr $@ $(LIBNETDISSECT_OBJ)
74 datalinks.o: $(srcdir)/missing/datalinks.c
75 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c
78 @@ -518,9 +518,11 @@ linkaddr_string(const u_char *ep, const
79 return etheraddr_string(ep);
83 if (type == LINKADDR_FRELAY) {
84 return q922_string(ep);
88 tp = lookup_bytestring(ep, len);
90 @@ -1121,6 +1123,7 @@ init_addrtoname(u_int32_t localnet, u_in
96 dnaddr_string(u_short dnaddr)
98 @@ -1140,6 +1143,7 @@ dnaddr_string(u_short dnaddr)
104 /* Return a zero'ed hnamemem struct and cuts down on calloc() overhead */
108 @@ -195,7 +195,7 @@ llc_print(const u_char *p, u_int length,
109 control = EXTRACT_LE_16BITS(p + 2);
113 +#ifndef TCPDUMP_MINI
114 if (ssap_field == LLCSAP_GLOBAL && dsap_field == LLCSAP_GLOBAL) {
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);
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,
129 +#ifndef TCPDUMP_MINI
130 if (ssap == LLCSAP_IPX && dsap == LLCSAP_IPX &&
133 @@ -265,6 +267,7 @@ llc_print(const u_char *p, u_int length,
134 ipx_print(p+3, length-3);
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,
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);
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
159 +#ifndef TCPDUMP_MINI
161 cdp_print(p, length, caplen);
163 @@ -456,6 +462,7 @@ snap_print(const u_char *p, u_int length
165 vtp_print(p, length);
169 stp_print(p, length);
171 @@ -486,6 +493,7 @@ snap_print(const u_char *p, u_int length
172 ether_print(p, length, caplen);
175 +#ifndef TCPDUMP_MINI
176 case PID_RFC2684_802_5_FCS:
177 case PID_RFC2684_802_5_NOFCS:
179 @@ -527,6 +535,7 @@ snap_print(const u_char *p, u_int length
181 fddi_print(p, length, caplen);
185 case PID_RFC2684_BPDU:
186 stp_print(p, length);
189 @@ -128,7 +128,7 @@ null_if_print(const struct pcap_pkthdr *
190 ip6_print(p, length);
194 +#ifndef TCPDUMP_MINI
196 isoclns_print(p, length, caplen);
198 @@ -140,7 +140,7 @@ null_if_print(const struct pcap_pkthdr *
200 ipx_print(p, length);
205 /* unknown AF_ value */
209 @@ -138,11 +138,14 @@ struct printer {
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 },
219 { ether_if_print, DLT_EN10MB },
220 +#ifndef TCPDUMP_MINI
221 { token_if_print, DLT_IEEE802 },
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 },
229 { ppp_if_print, DLT_PPP },
230 #ifdef DLT_PPP_WITHDIRECTION
231 { ppp_if_print, DLT_PPP_WITHDIRECTION },
233 +#ifndef TCPDUMP_MINI
235 { ppp_bsdos_if_print, DLT_PPP_BSDOS },
237 { fddi_if_print, DLT_FDDI },
239 { null_if_print, DLT_NULL },
241 { null_if_print, DLT_LOOP },
243 { raw_if_print, DLT_RAW },
244 +#ifndef TCPDUMP_MINI
245 { atm_if_print, DLT_ATM_RFC1483 },
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 },
254 { pppoe_if_print, DLT_PPP_ETHER },
256 +#ifndef TCPDUMP_MINI
258 { sll_if_print, DLT_LINUX_SLL },
261 #ifdef DLT_IEEE802_11
262 { ieee802_11_if_print, DLT_IEEE802_11},
264 +#ifndef TCPDUMP_MINI
266 { ltalk_if_print, DLT_LTALK },
268 @@ -207,12 +218,14 @@ static struct printer printers[] = {
269 #ifdef DLT_IP_OVER_FC
270 { ipfc_if_print, DLT_IP_OVER_FC },
273 #ifdef DLT_PRISM_HEADER
274 { prism_if_print, DLT_PRISM_HEADER },
276 #ifdef DLT_IEEE802_11_RADIO
277 { ieee802_11_radio_if_print, DLT_IEEE802_11_RADIO },
279 +#ifndef TCPDUMP_MINI
281 { enc_if_print, DLT_ENC },
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 },
288 #ifdef DLT_IEEE802_11_RADIO_AVS
289 { ieee802_11_radio_avs_if_print, DLT_IEEE802_11_RADIO_AVS },
291 +#ifndef TCPDUMP_MINI
292 #ifdef DLT_JUNIPER_ATM1
293 { juniper_atm1_print, DLT_JUNIPER_ATM1 },
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},
305 @@ -205,6 +205,7 @@ ether_encap_print(u_short ether_type, co
306 arp_print(gndo, p, length, caplen);
309 +#ifndef TCPDUMP_MINI
311 decnet_print(p, length, caplen);
313 @@ -223,7 +224,7 @@ ether_encap_print(u_short ether_type, co
314 printf("(NOV-ETHII) ");
315 ipx_print(p, length);
319 case ETHERTYPE_8021Q:
321 printf("vlan %u, p %u%s, ",
322 @@ -283,10 +284,11 @@ ether_encap_print(u_short ether_type, co
326 +#ifndef TCPDUMP_MINI
328 isoclns_print(p+1, length-1, length-1);
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);
339 +#ifndef TCPDUMP_MINI
341 rrcp_print(gndo, p - 14 , length + 14);
348 @@ -307,6 +310,7 @@ ether_encap_print(u_short ether_type, co
352 +#ifndef TCPDUMP_MINI
354 mpcp_print(p, length);
356 @@ -319,7 +323,7 @@ ether_encap_print(u_short ether_type, co
357 case ETHERTYPE_CFM_OLD:
358 cfm_print(p, length);
363 lldp_print(p, length);
365 @@ -327,11 +331,12 @@ ether_encap_print(u_short ether_type, co
366 case ETHERTYPE_LOOPBACK:
369 +#ifndef TCPDUMP_MINI
371 case ETHERTYPE_MPLS_MULTI:
372 mpls_print(p, length);
378 case ETHERTYPE_MOPRC:
381 @@ -213,6 +213,7 @@ gre_print_0(const u_char *bp, u_int leng
385 +#ifndef TCPDUMP_MINI
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);
395 printf("gre-proto-0x%x", prot);
399 @@ -303,6 +303,7 @@ igmp_print(register const u_char *bp, re
401 (void)printf("igmp leave %s", ipaddr_string(&bp[4]));
403 +#ifndef TCPDUMP_MINI
405 (void)printf("igmp dvmrp");
407 @@ -314,6 +315,7 @@ igmp_print(register const u_char *bp, re
408 (void)printf("igmp pimv1");
409 pimv1_print(bp, len);
413 print_mresp(bp, len);
417 @@ -380,6 +380,7 @@ ip_print_demux(netdissect_options *ndo,
421 +#ifndef TCPDUMP_MINI
423 ipds->nh = *ipds->cp;
424 ipds->advance = ah_print(ipds->cp);
425 @@ -414,14 +415,16 @@ again:
426 ipds->nh = enh & 0xff;
432 sctp_print(ipds->cp, (const u_char *)ipds->ip, ipds->len);
435 +#ifndef TCPDUMP_MINI
437 dccp_print(ipds->cp, (const u_char *)ipds->ip, ipds->len);
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));
447 +#ifndef TCPDUMP_MINI
450 * XXX - the current IANA protocol number assignments
451 @@ -461,15 +465,16 @@ again:
453 eigrp_print(ipds->cp, ipds->len);
458 ND_PRINT((ndo, " nd %d", ipds->len));
461 +#ifndef TCPDUMP_MINI
463 egp_print(ipds->cp, ipds->len);
468 ospf_print(ipds->cp, ipds->len, (const u_char *)ipds->ip);
470 @@ -503,10 +508,10 @@ again:
471 gre_print(ipds->cp, ipds->len);
474 +#ifndef TCPDUMP_MINI
476 mobile_print(ipds->cp, ipds->len);
480 pim_print(ipds->cp, ipds->len);
482 @@ -518,7 +523,7 @@ again:
484 pgm_print(ipds->cp, ipds->len, (const u_char *)ipds->ip);
489 if ((proto = getprotobynumber(ipds->nh)) != NULL)
490 ND_PRINT((ndo, " %s", proto->p_name));
493 @@ -1262,7 +1262,7 @@ trunc:
498 +#ifndef TCPDUMP_MINI
500 ppp_hdlc(const u_char *p, int length)
502 @@ -1327,17 +1327,19 @@ cleanup:
511 handle_ppp(u_int proto, const u_char *p, int length)
513 +#ifndef TCPDUMP_MINI
514 if ((proto & 0xff00) == 0x7e00) {/* is this an escape code ? */
515 ppp_hdlc(p-1, length);
521 case PPP_LCP: /* fall through */
523 @@ -1371,6 +1373,7 @@ handle_ppp(u_int proto, const u_char *p,
524 ip6_print(p, length);
527 +#ifndef TCPDUMP_MINI
528 case ETHERTYPE_IPX: /*XXX*/
530 ipx_print(p, length);
531 @@ -1382,6 +1385,7 @@ handle_ppp(u_int proto, const u_char *p,
533 mpls_print(p, length);
537 printf("compressed PPP data");
539 @@ -1520,6 +1524,7 @@ ppp_if_print(const struct pcap_pkthdr *h
543 +#ifndef TCPDUMP_MINI
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__ */
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);
562 +#ifndef TCPDUMP_MINI
563 else if (sport == BEEP_PORT || dport == BEEP_PORT)
564 beep_print(bp, length);
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
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);
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);
586 @@ -478,11 +478,12 @@ udp_print(register const u_char *bp, u_i
587 vat_print((void *)(up + 1), up);
590 +#ifndef TCPDUMP_MINI
592 udpipaddr_print(ip, sport, dport);
593 wb_print((void *)(up + 1), length);
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);
604 +#ifndef TCPDUMP_MINI
606 udpipaddr_print(ip, sport, dport);
607 cnfp_print(cp, (const u_char *)ip);
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
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);
628 udpipaddr_print(ip, sport, dport);
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));
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);
646 else if (ISPORT(AODV_PORT))
647 aodv_print((const u_char *)(up + 1), length,
649 @@ -615,6 +623,7 @@ udp_print(register const u_char *bp, u_i
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);
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));
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
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);
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,
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
691 * Kludge in test for whiteboard packets.
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);
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);
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);
723 else if (ISPORT(SIP_PORT))
724 sip_print((const u_char *)(up + 1), length);
725 else if (ISPORT(SYSLOG_PORT))