From: Francois-Xavier Le Bail Date: Thu, 8 Oct 2015 14:36:23 +0000 (+0200) Subject: Get rid of "TCPDUMP" in some libnetdissect codes X-Git-Tag: tcpdump-4.8.0~96 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/7194047efd2b57b04a65d732959cac81f2273d34?ds=inline Get rid of "TCPDUMP" in some libnetdissect codes --- diff --git a/config.h.in b/config.h.in index 66996714..e45a2de8 100644 --- a/config.h.in +++ b/config.h.in @@ -1,5 +1,8 @@ /* config.h.in. Generated from configure.in by autoheader. */ +/* define if you want to build the possibly-buggy SMB printer */ +#undef ENABLE_SMB + /* Define to 1 if you have the `alarm' function. */ #undef HAVE_ALARM @@ -280,9 +283,6 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS -/* define if you want to build the possibly-buggy SMB printer */ -#undef TCPDUMP_DO_SMB - /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME diff --git a/configure b/configure index 6566eda2..57234921 100755 --- a/configure +++ b/configure @@ -4500,7 +4500,7 @@ $as_echo "yes" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The SMB printer may have exploitable buffer overflows!!!" >&5 $as_echo "$as_me: WARNING: The SMB printer may have exploitable buffer overflows!!!" >&2;} -$as_echo "#define TCPDUMP_DO_SMB 1" >>confdefs.h +$as_echo "#define ENABLE_SMB 1" >>confdefs.h LOCALSRC="print-smb.c smbutil.c $LOCALSRC" ;; diff --git a/configure.in b/configure.in index d0cd0833..0fb86a7a 100644 --- a/configure.in +++ b/configure.in @@ -175,7 +175,7 @@ AC_ARG_ENABLE(smb, case "$enableval" in yes) AC_MSG_RESULT(yes) AC_WARN([The SMB printer may have exploitable buffer overflows!!!]) - AC_DEFINE(TCPDUMP_DO_SMB, 1, + AC_DEFINE(ENABLE_SMB, 1, [define if you want to build the possibly-buggy SMB printer]) LOCALSRC="print-smb.c smbutil.c $LOCALSRC" ;; diff --git a/print-ipx.c b/print-ipx.c index 22e613e7..383a84b0 100644 --- a/print-ipx.c +++ b/print-ipx.c @@ -123,7 +123,7 @@ ipx_decode(netdissect_options *ndo, const struct ipxHdr *ipx, const u_char *data break; case IPX_SKT_NETBIOS: ND_PRINT((ndo, "ipx-netbios %d", length)); -#ifdef TCPDUMP_DO_SMB +#ifdef ENABLE_SMB ipx_netbios_print(ndo, datap, length); #endif break; @@ -132,7 +132,7 @@ ipx_decode(netdissect_options *ndo, const struct ipxHdr *ipx, const u_char *data break; case IPX_SKT_NWLINK_DGM: ND_PRINT((ndo, "ipx-nwlink-dgm %d", length)); -#ifdef TCPDUMP_DO_SMB +#ifdef ENABLE_SMB ipx_netbios_print(ndo, datap, length); #endif break; diff --git a/print-llc.c b/print-llc.c index 3fdcef72..aaaac8e1 100644 --- a/print-llc.c +++ b/print-llc.c @@ -303,7 +303,7 @@ llc_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen, return (hdrlen); } -#ifdef TCPDUMP_DO_SMB +#ifdef ENABLE_SMB if (ssap == LLCSAP_NETBEUI && dsap == LLCSAP_NETBEUI && (!(control & LLC_S_FMT) || control == LLC_U_FMT)) { /* diff --git a/print-tcp.c b/print-tcp.c index ce9bf11e..98dc07d1 100644 --- a/print-tcp.c +++ b/print-tcp.c @@ -654,7 +654,7 @@ tcp_print(netdissect_options *ndo, bgp_print(ndo, bp, length); else if (sport == PPTP_PORT || dport == PPTP_PORT) pptp_print(ndo, bp); -#ifdef TCPDUMP_DO_SMB +#ifdef ENABLE_SMB else if (sport == NETBIOS_SSN_PORT || dport == NETBIOS_SSN_PORT) nbt_tcp_print(ndo, bp, length); else if (sport == SMB_PORT || dport == SMB_PORT) diff --git a/print-udp.c b/print-udp.c index f9a6e333..2b63318a 100644 --- a/print-udp.c +++ b/print-udp.c @@ -577,7 +577,7 @@ udp_print(netdissect_options *ndo, register const u_char *bp, u_int length, krb_print(ndo, (const void *)(up + 1)); else if (ISPORT(L2TP_PORT)) l2tp_print(ndo, (const u_char *)(up + 1), length); -#ifdef TCPDUMP_DO_SMB +#ifdef ENABLE_SMB else if (ISPORT(NETBIOS_NS_PORT)) nbt_udp137_print(ndo, (const u_char *)(up + 1), length); else if (ISPORT(NETBIOS_DGRAM_PORT))