| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861 |
- --- a/Makefile.in
- +++ b/Makefile.in
- @@ -73,6 +73,86 @@ DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@
-
- CSRC = fptype.c tcpdump.c
-
- +ifdef TCPDUMP_MINI
- +
- +LIBNETDISSECT_SRC=\
- + netdissect.c \
- + netdissect-alloc.c \
- + addrtoname.c \
- + addrtostr.c \
- + af.c \
- + ascii_strcasecmp.c \
- + checksum.c \
- + cpack.c \
- + gmpls.c \
- + in_cksum.c \
- + ipproto.c \
- + l2vpn.c \
- + machdep.c \
- + ntp.c \
- + nlpid.c \
- + oui.c \
- + parsenfsfh.c \
- + print.c \
- + print-802_11.c \
- + print-aodv.c \
- + print-arista.c \
- + print-arp.c \
- + print-ascii.c \
- + print-bootp.c \
- + print-dhcp6.c \
- + print-domain.c \
- + print-eap.c \
- + print-ether.c \
- + print-ftp.c \
- + print-gre.c \
- + print-http.c \
- + print-icmp.c \
- + print-icmp6.c \
- + print-igmp.c \
- + print-ip-demux.c \
- + print-ip.c \
- + print-ip6.c \
- + print-ip6opts.c \
- + print-ipnet.c \
- + print-l2tp.c \
- + print-llc.c \
- + print-lldp.c \
- + print-loopback.c \
- + print-macsec.c \
- + print-nfs.c \
- + print-ntp.c \
- + print-null.c \
- + print-olsr.c \
- + print-ospf.c \
- + print-ospf6.c \
- + print-ppp.c \
- + print-pppoe.c \
- + print-pptp.c \
- + print-radius.c \
- + print-raw.c \
- + print-rsvp.c \
- + print-rt6.c \
- + print-rtsp.c \
- + print-sip.c \
- + print-sll.c \
- + print-smtp.c \
- + print-snmp.c \
- + print-stp.c \
- + print-sunrpc.c \
- + print-syslog.c \
- + print-tcp.c \
- + print-telnet.c \
- + print-tftp.c \
- + print-udp.c \
- + print-unsupported.c \
- + print-whois.c \
- + signature.c \
- + strtoaddr.c \
- + util-print.c
- +
- +else
- +
- LIBNETDISSECT_SRC=\
- addrtoname.c \
- addrtostr.c \
- @@ -254,6 +334,8 @@ LIBNETDISSECT_SRC=\
- strtoaddr.c \
- util-print.c
-
- +endif
- +
- LOCALSRC = @LOCALSRC@
- LIBOBJS = @LIBOBJS@
-
- --- a/addrtoname.c
- +++ b/addrtoname.c
- @@ -677,8 +677,10 @@ linkaddr_string(netdissect_options *ndo,
- if (type == LINKADDR_ETHER && len == MAC_ADDR_LEN)
- return (etheraddr_string(ndo, ep));
-
- +#ifndef TCPDUMP_MINI
- if (type == LINKADDR_FRELAY)
- return (q922_string(ndo, ep, len));
- +#endif
-
- tp = lookup_bytestring(ndo, ep, len);
- if (tp->bs_name)
- @@ -1257,6 +1259,7 @@ init_addrtoname(netdissect_options *ndo,
- init_ipxsaparray(ndo);
- }
-
- +#ifndef TCPDUMP_MINI
- const char *
- dnaddr_string(netdissect_options *ndo, u_short dnaddr)
- {
- @@ -1273,6 +1276,7 @@ dnaddr_string(netdissect_options *ndo, u
-
- return(tp->name);
- }
- +#endif
-
- /* Return a zero'ed hnamemem struct and cuts down on calloc() overhead */
- struct hnamemem *
- --- a/print-ether.c
- +++ b/print-ether.c
- @@ -543,6 +543,7 @@ ethertype_print(netdissect_options *ndo,
- arp_print(ndo, p, length, caplen);
- return (1);
-
- +#ifndef TCPDUMP_MINI
- case ETHERTYPE_DN:
- decnet_print(ndo, p, length, caplen);
- return (1);
- @@ -573,6 +574,7 @@ ethertype_print(netdissect_options *ndo,
- ND_TCHECK_LEN(p, 1);
- isoclns_print(ndo, p + 1, length - 1);
- return(1);
- +#endif
-
- case ETHERTYPE_PPPOED:
- case ETHERTYPE_PPPOES:
- @@ -585,9 +587,11 @@ ethertype_print(netdissect_options *ndo,
- eapol_print(ndo, p);
- return (1);
-
- +#ifndef TCPDUMP_MINI
- case ETHERTYPE_REALTEK:
- rtl_print(ndo, p, length, src, dst);
- return (1);
- +#endif
-
- case ETHERTYPE_PPP:
- if (length) {
- @@ -596,6 +600,7 @@ ethertype_print(netdissect_options *ndo,
- }
- return (1);
-
- +#ifndef TCPDUMP_MINI
- case ETHERTYPE_MPCP:
- mpcp_print(ndo, p, length);
- return (1);
- @@ -608,19 +613,23 @@ ethertype_print(netdissect_options *ndo,
- case ETHERTYPE_CFM_OLD:
- cfm_print(ndo, p, length);
- return (1);
- +#endif
-
- case ETHERTYPE_LLDP:
- lldp_print(ndo, p, length);
- return (1);
-
- +#ifndef TCPDUMP_MINI
- case ETHERTYPE_NSH:
- nsh_print(ndo, p, length);
- return (1);
- +#endif
-
- case ETHERTYPE_LOOPBACK:
- loopback_print(ndo, p, length);
- return (1);
-
- +#ifndef TCPDUMP_MINI
- case ETHERTYPE_MPLS:
- case ETHERTYPE_MPLS_MULTI:
- mpls_print(ndo, p, length);
- @@ -650,6 +659,7 @@ ethertype_print(netdissect_options *ndo,
- case ETHERTYPE_PTP:
- ptp_print(ndo, p, length);
- return (1);
- +#endif
-
- case ETHERTYPE_LAT:
- case ETHERTYPE_SCA:
- --- a/print-gre.c
- +++ b/print-gre.c
- @@ -205,6 +205,7 @@ gre_print_0(netdissect_options *ndo, con
- case ETHERTYPE_IPV6:
- ip6_print(ndo, bp, len);
- break;
- +#ifndef TCPDUMP_MINI
- case ETHERTYPE_MPLS:
- mpls_print(ndo, bp, len);
- break;
- @@ -217,6 +218,7 @@ gre_print_0(netdissect_options *ndo, con
- case ETHERTYPE_GRE_ISO:
- isoclns_print(ndo, bp, len);
- break;
- +#endif
- case ETHERTYPE_TEB:
- ether_print(ndo, bp, len, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL);
- break;
- --- a/print-icmp6.c
- +++ b/print-icmp6.c
- @@ -1369,7 +1369,7 @@ get_upperlayer(netdissect_options *ndo,
- nh = GET_U_1(fragh->ip6f_nxt);
- hlen = sizeof(struct ip6_frag);
- break;
- -
- +#ifndef TCPDUMP_MINI
- case IPPROTO_AH:
- ah = (const struct ah *)bp;
- if (!ND_TTEST_1(ah->ah_len))
- @@ -1377,7 +1377,7 @@ get_upperlayer(netdissect_options *ndo,
- nh = GET_U_1(ah->ah_nxt);
- hlen = (GET_U_1(ah->ah_len) + 2) << 2;
- break;
- -
- +#endif
- default: /* unknown or undecodable header */
- *prot = nh; /* meaningless, but set here anyway */
- return(NULL);
- --- a/print-igmp.c
- +++ b/print-igmp.c
- @@ -267,6 +267,7 @@ igmp_print(netdissect_options *ndo,
- case 0x17:
- ND_PRINT("igmp leave %s", GET_IPADDR_STRING(bp + 4));
- break;
- +#ifndef TCPDUMP_MINI
- case 0x13:
- ND_PRINT("igmp dvmrp");
- if (len < 8)
- @@ -278,6 +279,7 @@ igmp_print(netdissect_options *ndo,
- ND_PRINT("igmp pimv1");
- pimv1_print(ndo, bp, len);
- break;
- +#endif
- case 0x1e:
- print_mtrace(ndo, "mresp", bp, len);
- break;
- --- a/print-ip-demux.c
- +++ b/print-ip-demux.c
- @@ -46,6 +46,7 @@ ip_demux_print(netdissect_options *ndo,
- again:
- switch (nh) {
-
- +#ifndef TCPDUMP_MINI
- case IPPROTO_AH:
- if (!ND_TTEST_1(bp)) {
- ndo->ndo_protocol = "ah";
- @@ -83,7 +84,9 @@ again:
- */
- break;
- }
- +#endif
-
- +#ifndef TCPDUMP_MINI
- case IPPROTO_SCTP:
- sctp_print(ndo, bp, iph, length);
- break;
- @@ -91,7 +94,7 @@ again:
- case IPPROTO_DCCP:
- dccp_print(ndo, bp, iph, length);
- break;
- -
- +#endif
- case IPPROTO_TCP:
- tcp_print(ndo, bp, length, iph, fragmented);
- break;
- @@ -120,6 +123,7 @@ again:
- }
- break;
-
- +#ifndef TCPDUMP_MINI
- case IPPROTO_PIGP:
- /*
- * XXX - the current IANA protocol number assignments
- @@ -140,14 +144,17 @@ again:
- case IPPROTO_EIGRP:
- eigrp_print(ndo, bp, length);
- break;
- +#endif
-
- case IPPROTO_ND:
- ND_PRINT(" nd %u", length);
- break;
-
- +#ifndef TCPDUMP_MINI
- case IPPROTO_EGP:
- egp_print(ndo, bp, length);
- break;
- +#endif
-
- case IPPROTO_OSPF:
- if (ver == 6)
- @@ -184,6 +191,7 @@ again:
- gre_print(ndo, bp, length);
- break;
-
- +#ifndef TCPDUMP_MINI
- case IPPROTO_MOBILE:
- mobile_print(ndo, bp, length);
- break;
- @@ -203,6 +211,7 @@ again:
- case IPPROTO_PGM:
- pgm_print(ndo, bp, length, iph);
- break;
- +#endif
-
- case IPPROTO_ETHERNET:
- if (ver == 6)
- --- a/print-ip6.c
- +++ b/print-ip6.c
- @@ -133,10 +133,11 @@ ip6_finddst(netdissect_options *ndo, nd_
- * Only one routing header to a customer.
- */
- goto done;
- -
- +#ifndef TCPDUMP_MINI
- case IPPROTO_AH:
- case IPPROTO_ESP:
- case IPPROTO_IPCOMP:
- +#endif
- default:
- /*
- * AH and ESP are, in the RFCs that describe them,
- @@ -371,6 +372,7 @@ ip6_print(netdissect_options *ndo, const
- nh = GET_U_1(cp);
- break;
-
- +#ifndef TCPDUMP_MINI
- case IPPROTO_FRAGMENT:
- advance = frag6_print(ndo, cp, (const u_char *)ip6);
- if (advance < 0 || ndo->ndo_snapend <= cp + advance) {
- @@ -401,7 +403,7 @@ ip6_print(netdissect_options *ndo, const
- nh = GET_U_1(cp);
- nd_pop_packet_info(ndo);
- return;
- -
- +#endif
- case IPPROTO_ROUTING:
- ND_TCHECK_1(cp);
- advance = rt6_print(ndo, cp, (const u_char *)ip6);
- --- a/print-llc.c
- +++ b/print-llc.c
- @@ -205,6 +205,7 @@ llc_print(netdissect_options *ndo, const
- hdrlen = 4; /* DSAP, SSAP, 2-byte control field */
- }
-
- +#ifndef TCPDUMP_MINI
- if (ssap_field == LLCSAP_GLOBAL && dsap_field == LLCSAP_GLOBAL) {
- /*
- * This is an Ethernet_802.3 IPX frame; it has an
- @@ -227,6 +228,7 @@ llc_print(netdissect_options *ndo, const
- ipx_print(ndo, p, length);
- return (0); /* no LLC header */
- }
- +#endif
-
- dsap = dsap_field & ~LLC_IG;
- ssap = ssap_field & ~LLC_GSAP;
- @@ -290,6 +292,7 @@ llc_print(netdissect_options *ndo, const
- return (hdrlen);
- }
-
- +#ifndef TCPDUMP_MINI
- if (ssap == LLCSAP_IPX && dsap == LLCSAP_IPX &&
- control == LLC_UI) {
- /*
- @@ -303,6 +306,7 @@ llc_print(netdissect_options *ndo, const
- ipx_print(ndo, p, length);
- return (hdrlen);
- }
- +#endif
-
- #ifdef ENABLE_SMB
- if (ssap == LLCSAP_NETBEUI && dsap == LLCSAP_NETBEUI
- @@ -321,12 +325,13 @@ llc_print(netdissect_options *ndo, const
- return (hdrlen);
- }
- #endif
- +#ifndef TCPDUMP_MINI
- if (ssap == LLCSAP_ISONS && dsap == LLCSAP_ISONS
- && control == LLC_UI) {
- isoclns_print(ndo, p, length);
- return (hdrlen);
- }
- -
- +#endif
- if (!ndo->ndo_eflag) {
- if (ssap == dsap) {
- if (src == NULL || dst == NULL)
- @@ -482,6 +487,7 @@ snap_print(netdissect_options *ndo, cons
-
- case OUI_CISCO:
- switch (et) {
- +#ifndef TCPDUMP_MINI
- case PID_CISCO_CDP:
- cdp_print(ndo, p, length);
- return (1);
- @@ -494,6 +500,7 @@ snap_print(netdissect_options *ndo, cons
- case PID_CISCO_VTP:
- vtp_print(ndo, p, length);
- return (1);
- +#endif
- case PID_CISCO_PVST:
- case PID_CISCO_VLANBRIDGE:
- stp_print(ndo, p, length);
- @@ -506,6 +513,7 @@ snap_print(netdissect_options *ndo, cons
- case OUI_RFC2684:
- switch (et) {
-
- +#ifndef TCPDUMP_MINI
- case PID_RFC2684_ETH_FCS:
- case PID_RFC2684_ETH_NOFCS:
- /*
- @@ -567,6 +575,7 @@ snap_print(netdissect_options *ndo, cons
- */
- fddi_print(ndo, p, length, caplen);
- return (1);
- +#endif
-
- case PID_RFC2684_BPDU:
- stp_print(ndo, p, length);
- --- a/print-null.c
- +++ b/print-null.c
- @@ -114,6 +114,7 @@ null_if_print(netdissect_options *ndo, c
- ip6_print(ndo, p, length);
- break;
-
- +#ifndef TCPDUMP_MINI
- case BSD_AFNUM_ISO:
- isoclns_print(ndo, p, length);
- break;
- @@ -125,6 +126,7 @@ null_if_print(netdissect_options *ndo, c
- case BSD_AFNUM_IPX:
- ipx_print(ndo, p, length);
- break;
- +#endif
-
- default:
- /* unknown AF_ value */
- --- a/print-ppp.c
- +++ b/print-ppp.c
- @@ -1354,6 +1354,7 @@ trunc:
- * The length argument is the on-the-wire length, not the captured
- * length; we can only un-escape the captured part.
- */
- +#ifndef TCPDUMP_MINI
- static void
- ppp_hdlc(netdissect_options *ndo,
- const u_char *p, u_int length)
- @@ -1451,17 +1452,19 @@ trunc:
- nd_pop_packet_info(ndo);
- nd_print_trunc(ndo);
- }
- -
- +#endif
-
- /* PPP */
- static void
- handle_ppp(netdissect_options *ndo,
- u_int proto, const u_char *p, u_int length)
- {
- +#ifndef TCPDUMP_MINI
- if ((proto & 0xff00) == 0x7e00) { /* is this an escape code ? */
- ppp_hdlc(ndo, p - 1, length);
- return;
- }
- +#endif
-
- switch (proto) {
- case PPP_LCP: /* fall through */
- @@ -1494,6 +1497,7 @@ handle_ppp(netdissect_options *ndo,
- case PPP_IPV6:
- ip6_print(ndo, p, length);
- break;
- +#ifndef TCPDUMP_MINI
- case ETHERTYPE_IPX: /*XXX*/
- case PPP_IPX:
- ipx_print(ndo, p, length);
- @@ -1505,6 +1509,7 @@ handle_ppp(netdissect_options *ndo,
- case PPP_MPLS_MCAST:
- mpls_print(ndo, p, length);
- break;
- +#endif
- case PPP_COMP:
- ND_PRINT("compressed PPP data");
- break;
- @@ -1652,6 +1657,7 @@ ppp_if_print(netdissect_options *ndo,
- ppp_print(ndo, p, length);
- }
-
- +#ifndef TCPDUMP_MINI
- /*
- * PPP I/F printer to use if we know that RFC 1662-style PPP in HDLC-like
- * framing, or Cisco PPP with HDLC framing as per section 4.3.1 of RFC 1547,
- @@ -1895,3 +1901,4 @@ printx:
- #endif /* __bsdi__ */
- ndo->ndo_ll_hdr_len += hdrlength;
- }
- +#endif
- --- a/print-sll.c
- +++ b/print-sll.c
- @@ -463,12 +463,14 @@ recurse:
- */
- switch (ether_type) {
-
- +#ifndef TCPDUMP_MINI
- case LINUX_SLL_P_802_3:
- /*
- * Ethernet_802.3 IPX frame.
- */
- ipx_print(ndo, p, length);
- break;
- +#endif
-
- case LINUX_SLL_P_802_2:
- /*
- --- a/print-tcp.c
- +++ b/print-tcp.c
- @@ -612,6 +612,7 @@ tcp_print(netdissect_options *ndo,
- ND_PRINT(" %u", utoval);
- break;
-
- +#ifndef TCPDUMP_MINI
- case TCPOPT_MPTCP:
- {
- const u_char *snapend_save;
- @@ -635,7 +636,7 @@ tcp_print(netdissect_options *ndo,
- goto bad;
- break;
- }
- -
- +#endif
- case TCPOPT_FASTOPEN:
- datalen = len - 2;
- LENCHECK(datalen);
- @@ -720,6 +721,7 @@ tcp_print(netdissect_options *ndo,
- return;
- }
-
- +#ifndef TCPDUMP_MINI
- if (ndo->ndo_packettype) {
- switch (ndo->ndo_packettype) {
- case PT_ZMTP1:
- @@ -735,12 +737,15 @@ tcp_print(netdissect_options *ndo,
- }
- return;
- }
- +#endif
-
- if (IS_SRC_OR_DST_PORT(FTP_PORT)) {
- ND_PRINT(": ");
- ftp_print(ndo, bp, length);
- +#ifndef TCPDUMP_MINI
- } else if (IS_SRC_OR_DST_PORT(SSH_PORT)) {
- ssh_print(ndo, bp, length);
- +#endif
- } else if (IS_SRC_OR_DST_PORT(TELNET_PORT)) {
- telnet_print(ndo, bp, length);
- } else if (IS_SRC_OR_DST_PORT(SMTP_PORT)) {
- @@ -759,10 +764,12 @@ tcp_print(netdissect_options *ndo,
- } else if (IS_SRC_OR_DST_PORT(NETBIOS_SSN_PORT)) {
- nbt_tcp_print(ndo, bp, length);
- #endif
- +#ifndef TCPDUMP_MINI
- } else if (IS_SRC_OR_DST_PORT(BGP_PORT)) {
- - bgp_print(ndo, bp, length);
- + bgp_print(ndo, bp, length);
- } else if (IS_SRC_OR_DST_PORT(RPKI_RTR_PORT)) {
- rpki_rtr_print(ndo, bp, length);
- +#endif
- #ifdef ENABLE_SMB
- } else if (IS_SRC_OR_DST_PORT(SMB_PORT)) {
- smb_tcp_print(ndo, bp, length);
- @@ -770,18 +777,22 @@ tcp_print(netdissect_options *ndo,
- } else if (IS_SRC_OR_DST_PORT(RTSP_PORT)) {
- ND_PRINT(": ");
- rtsp_print(ndo, bp, length);
- +#ifndef TCPDUMP_MINI
- } else if (IS_SRC_OR_DST_PORT(MSDP_PORT)) {
- msdp_print(ndo, bp, length);
- } else if (IS_SRC_OR_DST_PORT(LDP_PORT)) {
- ldp_print(ndo, bp, length);
- - } else if (IS_SRC_OR_DST_PORT(PPTP_PORT))
- +#endif
- + } else if (IS_SRC_OR_DST_PORT(PPTP_PORT)) {
- pptp_print(ndo, bp);
- - else if (IS_SRC_OR_DST_PORT(REDIS_PORT))
- +#ifndef TCPDUMP_MINI
- + } else if (IS_SRC_OR_DST_PORT(REDIS_PORT))
- resp_print(ndo, bp, length);
- else if (IS_SRC_OR_DST_PORT(BEEP_PORT))
- beep_print(ndo, bp, length);
- else if (IS_SRC_OR_DST_PORT(OPENFLOW_PORT_OLD) || IS_SRC_OR_DST_PORT(OPENFLOW_PORT_IANA)) {
- openflow_print(ndo, bp, length);
- +#endif
- } else if (IS_SRC_OR_DST_PORT(HTTP_PORT_ALT)) {
- ND_PRINT(": ");
- http_print(ndo, bp, length);
- --- a/print-udp.c
- +++ b/print-udp.c
- @@ -433,10 +433,12 @@ udp_print(netdissect_options *ndo, const
- vat_print(ndo, cp, length);
- break;
-
- +#ifndef TCPDUMP_MINI
- case PT_WB:
- udpipaddr_print(ndo, ip, sport, dport);
- wb_print(ndo, cp, length);
- break;
- +#endif
-
- case PT_RPC:
- rp = (const struct sunrpc_msg *)cp;
- @@ -465,10 +467,12 @@ udp_print(netdissect_options *ndo, const
- snmp_print(ndo, cp, length);
- break;
-
- +#ifndef TCPDUMP_MINI
- case PT_CNFP:
- udpipaddr_print(ndo, ip, sport, dport);
- cnfp_print(ndo, cp);
- break;
- +#endif
-
- case PT_TFTP:
- udpipaddr_print(ndo, ip, sport, dport);
- @@ -485,6 +489,7 @@ udp_print(netdissect_options *ndo, const
- radius_print(ndo, cp, length);
- break;
-
- +#ifndef TCPDUMP_MINI
- case PT_VXLAN:
- udpipaddr_print(ndo, ip, sport, dport);
- vxlan_print(ndo, cp, length);
- @@ -507,6 +512,7 @@ udp_print(netdissect_options *ndo, const
- udpipaddr_print(ndo, ip, sport, dport);
- someip_print(ndo, cp, length);
- break;
- +#endif
- case PT_DOMAIN:
- udpipaddr_print(ndo, ip, sport, dport);
- /* over_tcp: FALSE, is_mdns: FALSE */
- @@ -594,8 +600,12 @@ udp_print(netdissect_options *ndo, const
- bootp_print(ndo, cp, length);
- else if (IS_SRC_OR_DST_PORT(TFTP_PORT))
- tftp_print(ndo, cp, length);
- +#ifndef TCPDUMP_MINI
- +#ifdef ENABLE_SMB
- else if (IS_SRC_OR_DST_PORT(KERBEROS_PORT))
- krb_print(ndo, (const u_char *)cp);
- +#endif
- +#endif
- else if (IS_SRC_OR_DST_PORT(NTP_PORT))
- ntp_print(ndo, cp, length);
- #ifdef ENABLE_SMB
- @@ -607,6 +617,7 @@ udp_print(netdissect_options *ndo, const
- else if (IS_SRC_OR_DST_PORT(SNMP_PORT) ||
- IS_SRC_OR_DST_PORT(SNMPTRAP_PORT))
- snmp_print(ndo, cp, length);
- +#ifndef TCPDUMP_MINI
- else if (IS_SRC_OR_DST_PORT(PTP_EVENT_PORT) ||
- IS_SRC_OR_DST_PORT(PTP_GENERAL_PORT))
- ptp_print(ndo, cp, length);
- @@ -614,38 +625,50 @@ udp_print(netdissect_options *ndo, const
- cisco_autorp_print(ndo, cp, length);
- else if (IS_SRC_OR_DST_PORT(ISAKMP_PORT))
- isakmp_print(ndo, cp, length, bp2);
- +#endif
- else if (IS_SRC_OR_DST_PORT(SYSLOG_PORT))
- syslog_print(ndo, cp, length);
- +#ifndef TCPDUMP_MINI
- else if (IS_SRC_OR_DST_PORT(RIP_PORT))
- rip_print(ndo, cp, length);
- else if (IS_SRC_OR_DST_PORT(RIPNG_PORT))
- ripng_print(ndo, cp, length);
- else if (IS_SRC_OR_DST_PORT(TIMED_PORT))
- timed_print(ndo, (const u_char *)cp);
- +#endif
- else if (IS_SRC_OR_DST_PORT(DHCP6_SERV_PORT) ||
- IS_SRC_OR_DST_PORT(DHCP6_CLI_PORT))
- dhcp6_print(ndo, cp, length);
- +#ifndef TCPDUMP_MINI
- else if (IS_SRC_OR_DST_PORT(LDP_PORT))
- ldp_print(ndo, cp, length);
- else if (IS_SRC_OR_DST_PORT(AODV_PORT))
- aodv_print(ndo, cp, length, IP_V(ip) == 6);
- +#endif
- else if (IS_SRC_OR_DST_PORT(OLSR_PORT))
- olsr_print(ndo, cp, length, IP_V(ip) == 6);
- +#ifndef TCPDUMP_MINI
- else if (IS_SRC_OR_DST_PORT(LMP_PORT))
- lmp_print(ndo, cp, length);
- +#ifdef ENABLE_SMB
- else if (IS_SRC_OR_DST_PORT(KERBEROS_SEC_PORT))
- krb_print(ndo, (const u_char *)cp);
- +#endif
- else if (IS_SRC_OR_DST_PORT(LWRES_PORT))
- lwres_print(ndo, cp, length);
- else if (IS_SRC_OR_DST_PORT(MULTICASTDNS_PORT))
- /* over_tcp: FALSE, is_mdns: TRUE */
- domain_print(ndo, cp, length, FALSE, TRUE);
- +#ifdef ENABLE_SMB
- else if (IS_SRC_OR_DST_PORT(ISAKMP_PORT_NATT))
- isakmp_rfc3948_print(ndo, cp, length, bp2, IP_V(ip), fragmented, ttl_hl);
- else if (IS_SRC_OR_DST_PORT(ISAKMP_PORT_USER1) || IS_SRC_OR_DST_PORT(ISAKMP_PORT_USER2))
- isakmp_print(ndo, cp, length, bp2);
- +#endif
- +#endif
- else if (IS_SRC_OR_DST_PORT(L2TP_PORT))
- l2tp_print(ndo, cp, length);
- +#ifndef TCPDUMP_MINI
- else if (dport == VAT_PORT)
- vat_print(ndo, cp, length);
- else if (IS_SRC_OR_DST_PORT(ZEPHYR_SRV_PORT) || IS_SRC_OR_DST_PORT(ZEPHYR_CLT_PORT))
- @@ -669,6 +692,7 @@ udp_print(netdissect_options *ndo, const
- */
- else if (dport == WB_PORT)
- wb_print(ndo, cp, length);
- +#endif
- else if (IS_SRC_OR_DST_PORT(RADIUS_PORT) ||
- IS_SRC_OR_DST_PORT(RADIUS_NEW_PORT) ||
- IS_SRC_OR_DST_PORT(RADIUS_ACCOUNTING_PORT) ||
- @@ -676,6 +700,7 @@ udp_print(netdissect_options *ndo, const
- IS_SRC_OR_DST_PORT(RADIUS_CISCO_COA_PORT) ||
- IS_SRC_OR_DST_PORT(RADIUS_COA_PORT) )
- radius_print(ndo, cp, length);
- +#ifndef TCPDUMP_MINI
- else if (dport == HSRP_PORT)
- hsrp_print(ndo, cp, length);
- else if (IS_SRC_OR_DST_PORT(MPLS_LSP_PING_PORT))
- @@ -695,8 +720,10 @@ udp_print(netdissect_options *ndo, const
- lwapp_control_print(ndo, cp, length, 0);
- else if (IS_SRC_OR_DST_PORT(LWAPP_DATA_PORT))
- lwapp_data_print(ndo, cp, length);
- +#endif
- else if (IS_SRC_OR_DST_PORT(SIP_PORT))
- sip_print(ndo, cp, length);
- +#ifndef TCPDUMP_MINI
- else if (IS_SRC_OR_DST_PORT(OTV_PORT))
- otv_print(ndo, cp, length);
- else if (IS_SRC_OR_DST_PORT(VXLAN_PORT))
- @@ -721,6 +748,7 @@ udp_print(netdissect_options *ndo, const
- someip_print(ndo, cp, length);
- else if (sport == BCM_LI_PORT)
- bcm_li_print(ndo, cp, length);
- +#endif
- else {
- if (ulen > length && !fragmented)
- ND_PRINT("UDP, bad length %u > %u",
- --- a/print.c
- +++ b/print.c
- @@ -46,6 +46,7 @@ struct printer {
- };
-
- static const struct printer printers[] = {
- +#ifndef TCPDUMP_MINI
- #ifdef DLT_APPLE_IP_OVER_IEEE1394
- { ap1394_if_print, DLT_APPLE_IP_OVER_IEEE1394 },
- #endif
- @@ -84,7 +85,9 @@ static const struct printer printers[] =
- #ifdef DLT_ENC
- { enc_if_print, DLT_ENC },
- #endif
- +#endif
- { ether_if_print, DLT_EN10MB },
- +#ifndef TCPDUMP_MINI
- { fddi_if_print, DLT_FDDI },
- #ifdef DLT_FR
- { fr_if_print, DLT_FR },
- @@ -92,6 +95,7 @@ static const struct printer printers[] =
- #ifdef DLT_FRELAY
- { fr_if_print, DLT_FRELAY },
- #endif
- +#endif
- #ifdef DLT_IEEE802_11
- { ieee802_11_if_print, DLT_IEEE802_11},
- #endif
- @@ -101,6 +105,7 @@ static const struct printer printers[] =
- #ifdef DLT_IEEE802_11_RADIO
- { ieee802_11_radio_if_print, DLT_IEEE802_11_RADIO },
- #endif
- +#ifndef TCPDUMP_MINI
- #ifdef DLT_IEEE802_15_4
- { ieee802_15_4_if_print, DLT_IEEE802_15_4 },
- #endif
- @@ -113,9 +118,11 @@ static const struct printer printers[] =
- #ifdef DLT_IP_OVER_FC
- { ipfc_if_print, DLT_IP_OVER_FC },
- #endif
- +#endif
- #ifdef DLT_IPNET
- { ipnet_if_print, DLT_IPNET },
- #endif
- +#ifndef TCPDUMP_MINI
- #ifdef DLT_IPOIB
- { ipoib_if_print, DLT_IPOIB },
- #endif
- @@ -170,19 +177,23 @@ static const struct printer printers[] =
- #ifdef DLT_MFR
- { mfr_if_print, DLT_MFR },
- #endif
- +#endif
- #ifdef DLT_NETANALYZER
- { netanalyzer_if_print, DLT_NETANALYZER },
- #endif
- #ifdef DLT_NETANALYZER_TRANSPARENT
- { netanalyzer_transparent_if_print, DLT_NETANALYZER_TRANSPARENT },
- #endif
- +#ifndef TCPDUMP_MINI
- #ifdef DLT_NFLOG
- { nflog_if_print, DLT_NFLOG},
- #endif
- +#endif
- { null_if_print, DLT_NULL },
- #ifdef DLT_LOOP
- { null_if_print, DLT_LOOP },
- #endif
- +#ifndef TCPDUMP_MINI
- #ifdef DLT_PFLOG
- { pflog_if_print, DLT_PFLOG },
- #endif
- @@ -198,6 +209,7 @@ static const struct printer printers[] =
- #ifdef DLT_PPP_SERIAL
- { ppp_hdlc_if_print, DLT_PPP_SERIAL },
- #endif
- +#endif
- { ppp_if_print, DLT_PPP },
- #ifdef DLT_PPP_PPPD
- { ppp_if_print, DLT_PPP_PPPD },
- @@ -209,6 +221,7 @@ static const struct printer printers[] =
- { prism_if_print, DLT_PRISM_HEADER },
- #endif
- { raw_if_print, DLT_RAW },
- +#ifndef TCPDUMP_MINI
- #ifdef DLT_IPV4
- { raw_if_print, DLT_IPV4 },
- #endif
- @@ -241,6 +254,7 @@ static const struct printer printers[] =
- #ifdef DLT_VSOCK
- { vsock_if_print, DLT_VSOCK },
- #endif
- +#endif
- { NULL, 0 },
- };
-
|