]> The Tcpdump Group git mirrors - libpcap/commitdiff
Fix spaces before tabs in indentation
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 15 Feb 2023 19:02:05 +0000 (20:02 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Wed, 15 Feb 2023 19:48:38 +0000 (20:48 +0100)
25 files changed:
CHANGES
Makefile.in
README.md
aclocal.m4
configure
configure.ac
gencode.c
nametoaddr.c
optimize.c
pcap-bt-linux.c
pcap-common.c
pcap-libdlpi.c
pcap-linux.c
pcap-netfilter-linux.c
pcap-npf.c
pcap-sita.c
pcap-sita.html
pcap-snf.c
pcap-usb-linux.c
pcap/bpf.h
pcap/dlt.h
pcap/pcap.h
rpcapd/Makefile.in
sockutils.c
testprogs/Makefile.in

diff --git a/CHANGES b/CHANGES
index 50bf122c2b72757656f4d00c9006719385903484..69e794c0cbc004bcc6506cf56119304adaf1ba3e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1021,7 +1021,7 @@ Tue.      September 19, 2006. [email protected]. Summary for 0.9.5 libpcap release
        Add support to build libpcap.lib and wpcap.dll under Cygnus and
         MingW32.
 
-Mon.   September 5, 2005.  [email protected]. Summary for 0.9.4 libpcap release
+Mon.   September 5, 2005.  [email protected]. Summary for 0.9.4 libpcap release
 
        Support for radiotap on Linux (Mike Kershaw)
        Fixes for HP-UX
@@ -1032,7 +1032,7 @@ Mon.      September 5, 2005.  [email protected]. Summary for 0.9.4 libpcap release
        parts of the filter expression to look at the PPP headers and
        headers in the PPP payload
 
-Tue.   July 5, 2005.  [email protected]. Summary for 0.9.3 libpcap release
+Tue.   July 5, 2005.  [email protected]. Summary for 0.9.3 libpcap release
 
        Fixes for compiling on nearly every platform,
                including improved 64bit support
@@ -1071,16 +1071,16 @@ Wed.   November 12, 2003. [email protected]. Summary for 0.8 release
 
 Tuesday, February 25, 2003. [email protected].  0.7.2 release
 
-       Support link types that use 802.2 always, never, and sometimes.
-       Don't decrease the size of the BPF buffer from the default.
-       Support frame relay.
-       Handle 32-bit timestamps in DLPI, and pass the right buffer size.
-       Handle Linux systems with modern kernel but without
-        SOL_PACKET in the userland headers.
-       Linux support for ARPHRD_RAWHDLC.
-       Handle 32-bit timestamps in snoop.
-       Support eg (Octane/O2xxx/O3xxx Gigabit) devices.
-       Add new reserved DLT types.
+       Support link types that use 802.2 always, never, and sometimes.
+       Don't decrease the size of the BPF buffer from the default.
+       Support frame relay.
+       Handle 32-bit timestamps in DLPI, and pass the right buffer size.
+       Handle Linux systems with modern kernel but without
+        SOL_PACKET in the userland headers.
+       Linux support for ARPHRD_RAWHDLC.
+       Handle 32-bit timestamps in snoop.
+       Support eg (Octane/O2xxx/O3xxx Gigabit) devices.
+       Add new reserved DLT types.
 
 Monday October 23, 2001. [email protected]. Summary for 0.7 release
 
index 50fa7827d7444678be8dd2744736a2b29fcc1d58..3468e204c7561042cc6632f4d00c435b737c6ffb 100644 (file)
@@ -1,5 +1,5 @@
 #  Copyright (c) 1993, 1994, 1995, 1996
-#      The Regents of the University of California.  All rights reserved.
+#      The Regents of the University of California.  All rights reserved.
 #
 #  Redistribution and use in source and binary forms, with or without
 #  modification, are permitted provided that: (1) source code distributions
index 46c33c24125e35ecc69f664ca09dd92b510f5595..e38b9a15d6b3c5e5d49107f6c40a534ffa707414 100644 (file)
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@ to ease in porting and to alleviate the need for several
 system-dependent packet capture modules in each application.
 
 ```text
-formerly from  Lawrence Berkeley National Laboratory
+formerly from  Lawrence Berkeley National Laboratory
                Network Research Group <[email protected]>
                ftp://ftp.ee.lbl.gov/old/libpcap-0.4a7.tar.Z
 ```
index 4ba8671e341e3452f1b2b295486709f79b4e9529..9ec93c28d5e5384f9473843837313568fb3d4c44 100644 (file)
@@ -1204,8 +1204,8 @@ See the pkg-config man page for more details.])
                #
                # That failed - report an error.
                #
-               AC_MSG_RESULT([error])
-               _PKG_SHORT_ERRORS_SUPPORTED
+               AC_MSG_RESULT([error])
+               _PKG_SHORT_ERRORS_SUPPORTED
                if test $_pkg_short_errors_supported = yes; then
                        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
                else
@@ -1228,7 +1228,7 @@ _PKG_TEXT])[]dnl
                #
                # We don't have pkg-config, so it didn't work.
                #
-               AC_MSG_RESULT([not found (pkg-config not found)])
+               AC_MSG_RESULT([not found (pkg-config not found)])
        else
                #
                # We found the package.
index cc06bbea920237f7178fde2670073977d0e98e41..7827179f0361ca379d10491b102fc5e664ca5b61 100755 (executable)
--- a/configure
+++ b/configure
@@ -6110,7 +6110,7 @@ main(void)
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
-               # GNU-style
+               # GNU-style
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
@@ -7343,9 +7343,9 @@ done
                V_PCAP=linux
                VALGRINDTEST_SRC=valgrindtest.c
        elif test "$ac_cv_header_net_pfilt_h" = yes; then
-               #
-               # DEC OSF/1, Digital UNIX, Tru64 UNIX
-               #
+               #
+               # DEC OSF/1, Digital UNIX, Tru64 UNIX
+               #
                V_PCAP=pf
        elif test "$ac_cv_header_net_enet_h" = yes; then
                #
@@ -7784,14 +7784,14 @@ enet)
        #
        # Capture module
        #
-       PLATFORM_C_SRC="pcap-enet.c"
+       PLATFORM_C_SRC="pcap-enet.c"
        ;;
 
 haiku)
        #
        # Capture module
        #
-       PLATFORM_CXX_SRC="pcap-haiku.cpp"
+       PLATFORM_CXX_SRC="pcap-haiku.cpp"
 
        #
        # Just for the sake of it.
@@ -7815,7 +7815,7 @@ linux)
        #
        # Capture module
        #
-       PLATFORM_C_SRC="pcap-linux.c"
+       PLATFORM_C_SRC="pcap-linux.c"
 
        #
        # Do we have the wireless extensions?
@@ -7938,7 +7938,7 @@ fi
                #
                # That failed - report an error.
                #
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
 $as_echo "error" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -7969,7 +7969,7 @@ See the pkg-config man page for more details." "$LINENO" 5
                #
                # We don't have pkg-config, so it didn't work.
                #
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5
 $as_echo "not found (pkg-config not found)" >&6; }
        else
                #
@@ -8115,7 +8115,7 @@ bpf)
        #
        # Capture module
        #
-       PLATFORM_C_SRC="pcap-bpf.c"
+       PLATFORM_C_SRC="pcap-bpf.c"
 
        #
        # Check whether we have the *BSD-style ioctls.
@@ -8160,21 +8160,21 @@ pf)
        #
        # Capture module
        #
-       PLATFORM_C_SRC="pcap-pf.c"
+       PLATFORM_C_SRC="pcap-pf.c"
        ;;
 
 snit)
        #
        # Capture module
        #
-       PLATFORM_C_SRC="pcap-snit.c"
+       PLATFORM_C_SRC="pcap-snit.c"
        ;;
 
 snoop)
        #
        # Capture module
        #
-       PLATFORM_C_SRC="pcap-snoop.c"
+       PLATFORM_C_SRC="pcap-snoop.c"
        ;;
 
 dag)
@@ -8221,7 +8221,7 @@ null)
        #
        # Capture module
        #
-       PLATFORM_C_SRC="pcap-null.c"
+       PLATFORM_C_SRC="pcap-null.c"
        ;;
 
 *)
@@ -9387,7 +9387,7 @@ fi
                #
                # That failed - report an error.
                #
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
 $as_echo "error" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -9418,7 +9418,7 @@ See the pkg-config man page for more details." "$LINENO" 5
                #
                # We don't have pkg-config, so it didn't work.
                #
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5
 $as_echo "not found (pkg-config not found)" >&6; }
        else
                #
@@ -12879,7 +12879,7 @@ fi
                #
                # That failed - report an error.
                #
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
 $as_echo "error" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -12910,7 +12910,7 @@ See the pkg-config man page for more details." "$LINENO" 5
                #
                # We don't have pkg-config, so it didn't work.
                #
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5
 $as_echo "not found (pkg-config not found)" >&6; }
        else
                #
@@ -13350,7 +13350,7 @@ fi
                #
                # That failed - report an error.
                #
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
 $as_echo "error" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -13375,7 +13375,7 @@ fi
                #
                # We don't have pkg-config, so it didn't work.
                #
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5
 $as_echo "not found (pkg-config not found)" >&6; }
        else
                #
@@ -13549,7 +13549,7 @@ fi
                #
                # That failed - report an error.
                #
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
 $as_echo "error" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -13580,7 +13580,7 @@ See the pkg-config man page for more details." "$LINENO" 5
                #
                # We don't have pkg-config, so it didn't work.
                #
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5
 $as_echo "not found (pkg-config not found)" >&6; }
        else
                #
index 4072216ae307b68a251c940d671f2f8fa21c0ee1..ec601c8445e989a22860469f22d2a7ced53114a3 100644 (file)
@@ -220,7 +220,7 @@ main(void)
 )
            ],
            [
-               # GNU-style
+               # GNU-style
                AC_MSG_RESULT(yes)
                AC_DEFINE(HAVE_GNU_STRERROR_R,,
                    [Define to 1 if you have a GNU-style `strerror_r' function.])
@@ -783,9 +783,9 @@ else
                V_PCAP=linux
                VALGRINDTEST_SRC=valgrindtest.c
        elif test "$ac_cv_header_net_pfilt_h" = yes; then
-               #
-               # DEC OSF/1, Digital UNIX, Tru64 UNIX
-               #
+               #
+               # DEC OSF/1, Digital UNIX, Tru64 UNIX
+               #
                V_PCAP=pf
        elif test "$ac_cv_header_net_enet_h" = yes; then
                #
@@ -982,14 +982,14 @@ enet)
        #
        # Capture module
        #
-       PLATFORM_C_SRC="pcap-enet.c"
+       PLATFORM_C_SRC="pcap-enet.c"
        ;;
 
 haiku)
        #
        # Capture module
        #
-       PLATFORM_CXX_SRC="pcap-haiku.cpp"
+       PLATFORM_CXX_SRC="pcap-haiku.cpp"
 
        #
        # Just for the sake of it.
@@ -1001,7 +1001,7 @@ linux)
        #
        # Capture module
        #
-       PLATFORM_C_SRC="pcap-linux.c"
+       PLATFORM_C_SRC="pcap-linux.c"
 
        #
        # Do we have the wireless extensions?
@@ -1102,7 +1102,7 @@ bpf)
        #
        # Capture module
        #
-       PLATFORM_C_SRC="pcap-bpf.c"
+       PLATFORM_C_SRC="pcap-bpf.c"
 
        #
        # Check whether we have the *BSD-style ioctls.
@@ -1127,21 +1127,21 @@ pf)
        #
        # Capture module
        #
-       PLATFORM_C_SRC="pcap-pf.c"
+       PLATFORM_C_SRC="pcap-pf.c"
        ;;
 
 snit)
        #
        # Capture module
        #
-       PLATFORM_C_SRC="pcap-snit.c"
+       PLATFORM_C_SRC="pcap-snit.c"
        ;;
 
 snoop)
        #
        # Capture module
        #
-       PLATFORM_C_SRC="pcap-snoop.c"
+       PLATFORM_C_SRC="pcap-snoop.c"
        ;;
 
 dag)
@@ -1188,7 +1188,7 @@ null)
        #
        # Capture module
        #
-       PLATFORM_C_SRC="pcap-null.c"
+       PLATFORM_C_SRC="pcap-null.c"
        ;;
 
 *)
index 87a6e962b01203b14a26a5f771cd3512efa4be7f..496e02f377e64ed4e60c4169952dde2c58dc22ac 100644 (file)
--- a/gencode.c
+++ b/gencode.c
@@ -7990,7 +7990,7 @@ gen_broadcast(compiler_state_t *cstate, int proto)
                default:
                        bpf_error(cstate, "not a broadcast link");
                }
-               /*NOTREACHED*/
+               /*NOTREACHED*/
 
        case Q_IP:
                /*
@@ -8655,7 +8655,7 @@ gen_acode(compiler_state_t *cstate, const char *s, struct qual q)
                        return (b);
                } else
                        bpf_error(cstate, "ARCnet address used in non-arc expression");
-               /*NOTREACHED*/
+               /*NOTREACHED*/
 
        default:
                bpf_error(cstate, "aid supported only on ARCnet");
@@ -8691,27 +8691,27 @@ gen_ahostop(compiler_state_t *cstate, const u_char *eaddr, int dir)
 
        case Q_ADDR1:
                bpf_error(cstate, "'addr1' and 'address1' are only supported on 802.11");
-               /*NOTREACHED*/
+               /*NOTREACHED*/
 
        case Q_ADDR2:
                bpf_error(cstate, "'addr2' and 'address2' are only supported on 802.11");
-               /*NOTREACHED*/
+               /*NOTREACHED*/
 
        case Q_ADDR3:
                bpf_error(cstate, "'addr3' and 'address3' are only supported on 802.11");
-               /*NOTREACHED*/
+               /*NOTREACHED*/
 
        case Q_ADDR4:
                bpf_error(cstate, "'addr4' and 'address4' are only supported on 802.11");
-               /*NOTREACHED*/
+               /*NOTREACHED*/
 
        case Q_RA:
                bpf_error(cstate, "'ra' is only supported on 802.11");
-               /*NOTREACHED*/
+               /*NOTREACHED*/
 
        case Q_TA:
                bpf_error(cstate, "'ta' is only supported on 802.11");
-               /*NOTREACHED*/
+               /*NOTREACHED*/
        }
        abort();
        /*NOTREACHED*/
index 55f93897b9f8b1cc80c9068db8bbf07d7dd0dbda..7a04a61dbd6c39f17a5ff204cc61391f1c9c634a 100644 (file)
@@ -267,7 +267,7 @@ pcap_nametonetaddr(const char *name)
         * *not* always get set if getnetbyname_r() succeeds.
         */
        np = NULL;
-       err = getnetbyname_r(name, &result_buf, buf, sizeof buf, &np,
+       err = getnetbyname_r(name, &result_buf, buf, sizeof buf, &np,
            &h_errnoval);
        if (err != 0) {
                /*
@@ -296,16 +296,16 @@ pcap_nametonetaddr(const char *name)
        else
                np = &result_buf;
   #else
-       /*
-        * We don't have any getnetbyname_r(); either we have a
-        * getnetbyname() that uses thread-specific data, in which
-        * case we're thread-safe (sufficiently recent FreeBSD,
-        * sufficiently recent Darwin-based OS, sufficiently recent
-        * HP-UX, sufficiently recent Tru64 UNIX), or we have the
-        * traditional getnetbyname() (everything else, including
-        * current NetBSD and OpenBSD), in which case we're not
-        * thread-safe.
-        */
+       /*
+        * We don't have any getnetbyname_r(); either we have a
+        * getnetbyname() that uses thread-specific data, in which
+        * case we're thread-safe (sufficiently recent FreeBSD,
+        * sufficiently recent Darwin-based OS, sufficiently recent
+        * HP-UX, sufficiently recent Tru64 UNIX), or we have the
+        * traditional getnetbyname() (everything else, including
+        * current NetBSD and OpenBSD), in which case we're not
+        * thread-safe.
+        */
        np = getnetbyname(name);
   #endif
        if (np != NULL)
@@ -552,16 +552,16 @@ pcap_nametoproto(const char *str)
        else
                p = &result_buf;
   #else
-       /*
-        * We don't have any getprotobyname_r(); either we have a
-        * getprotobyname() that uses thread-specific data, in which
-        * case we're thread-safe (sufficiently recent FreeBSD,
-        * sufficiently recent Darwin-based OS, sufficiently recent
-        * HP-UX, sufficiently recent Tru64 UNIX, Windows), or we have
+       /*
+        * We don't have any getprotobyname_r(); either we have a
+        * getprotobyname() that uses thread-specific data, in which
+        * case we're thread-safe (sufficiently recent FreeBSD,
+        * sufficiently recent Darwin-based OS, sufficiently recent
+        * HP-UX, sufficiently recent Tru64 UNIX, Windows), or we have
         * the traditional getprotobyname() (everything else, including
-        * current NetBSD and OpenBSD), in which case we're not
-        * thread-safe.
-        */
+        * current NetBSD and OpenBSD), in which case we're not
+        * thread-safe.
+        */
        p = getprotobyname(str);
   #endif
        if (p != 0)
index 0ad0c4163bb09e3a14f1cca50e79bbcd55fa1afa..9af4c15d2ca71a1f40f38dfdc3b743c99818d14a 100644 (file)
@@ -3029,14 +3029,14 @@ dot_dump_edge(struct icode *ic, struct block *block, FILE *out)
  *
  * example DOT for BPF `ip src host 1.1.1.1' is:
     digraph BPF {
-       block0 [shape=ellipse, id="block-0" label="BLOCK0\n\n(000) ldh      [12]\n(001) jeq      #0x800           jt 2  jf 5" tooltip="val[A]=0 val[X]=0"];
-       block1 [shape=ellipse, id="block-1" label="BLOCK1\n\n(002) ld       [26]\n(003) jeq      #0x1010101       jt 4  jf 5" tooltip="val[A]=0 val[X]=0"];
-       block2 [shape=ellipse, id="block-2" label="BLOCK2\n\n(004) ret      #68" tooltip="val[A]=0 val[X]=0", peripheries=2];
-       block3 [shape=ellipse, id="block-3" label="BLOCK3\n\n(005) ret      #0" tooltip="val[A]=0 val[X]=0", peripheries=2];
-       "block0":se -> "block1":n [label="T"];
-       "block0":sw -> "block3":n [label="F"];
-       "block1":se -> "block2":n [label="T"];
-       "block1":sw -> "block3":n [label="F"];
+       block0 [shape=ellipse, id="block-0" label="BLOCK0\n\n(000) ldh      [12]\n(001) jeq      #0x800           jt 2  jf 5" tooltip="val[A]=0 val[X]=0"];
+       block1 [shape=ellipse, id="block-1" label="BLOCK1\n\n(002) ld       [26]\n(003) jeq      #0x1010101       jt 4  jf 5" tooltip="val[A]=0 val[X]=0"];
+       block2 [shape=ellipse, id="block-2" label="BLOCK2\n\n(004) ret      #68" tooltip="val[A]=0 val[X]=0", peripheries=2];
+       block3 [shape=ellipse, id="block-3" label="BLOCK3\n\n(005) ret      #0" tooltip="val[A]=0 val[X]=0", peripheries=2];
+       "block0":se -> "block1":n [label="T"];
+       "block0":sw -> "block3":n [label="F"];
+       "block1":se -> "block2":n [label="T"];
+       "block1":sw -> "block3":n [label="F"];
     }
  *
  *  After install graphviz on https://www.graphviz.org/, save it as bpf.dot
index 37c805658253cda346b5d40c6821c07485d374f1..c7bfef1dfad750f086099004916f5d0792a6836e 100644 (file)
@@ -367,9 +367,9 @@ bt_read_linux(pcap_t *handle, int max_packets _U_, pcap_handler callback, u_char
                        case HCI_CMSG_DIR:
                                memcpy(&in, CMSG_DATA(cmsg), sizeof in);
                                break;
-                       case HCI_CMSG_TSTAMP:
-                               memcpy(&pkth.ts, CMSG_DATA(cmsg),
-                                   sizeof pkth.ts);
+                       case HCI_CMSG_TSTAMP:
+                               memcpy(&pkth.ts, CMSG_DATA(cmsg),
+                                       sizeof pkth.ts);
                                break;
                }
                cmsg = CMSG_NXTHDR(&msg, cmsg);
index 4f12d8abb18e2d6cc2e0d245ce60ce7442e1efad..75461b12cf26f45055080b06b000071d70edaa0b 100644 (file)
  * which is stored with each packet:
  *
  *   EXP_PDU_TAG_DISSECTOR_NAME      the name of the Wireshark dissector
- *                                  that can make sense of the data stored.
+ *                                  that can make sense of the data stored.
  *
  *   EXP_PDU_TAG_HEUR_DISSECTOR_NAME the name of the Wireshark heuristic
  *                                  dissector that can make sense of the
@@ -1240,7 +1240,7 @@ static struct linktype_map {
        { DLT_FR,               LINKTYPE_FRELAY },
 #endif
 
-       { DLT_ATM_RFC1483,      LINKTYPE_ATM_RFC1483 },
+       { DLT_ATM_RFC1483,      LINKTYPE_ATM_RFC1483 },
        { DLT_RAW,              LINKTYPE_RAW },
        { DLT_SLIP_BSDOS,       LINKTYPE_SLIP_BSDOS },
        { DLT_PPP_BSDOS,        LINKTYPE_PPP_BSDOS },
index 70cb5d45f77fb36a18d477490008217b7a64e892..f281fb93393b0382460d775f1502096aeba85e1e 100644 (file)
@@ -344,7 +344,7 @@ pcap_platform_finddevs(pcap_if_list_t *devlistp, char *errbuf)
 
        linknamelist_t  *entry, *next;
        linkwalk_t      lw = {NULL, 0};
-       int             save_errno;
+       int             save_errno;
 
        /*
         * Get the list of regular interfaces first.
index 43d2a9f0eec640865db9c841aa6d01f31c9fbce5..13bd8529f65c187d09854045aae4138059dc52d7 100644 (file)
@@ -2,7 +2,7 @@
  *  pcap-linux.c: Packet capture interface to the Linux kernel
  *
  *  Copyright (c) 2000 Torsten Landschoff <[email protected]>
- *                    Sebastian Krahmer  <[email protected]>
+ *                    Sebastian Krahmer  <[email protected]>
  *
  *  License: BSD
  *
@@ -315,8 +315,8 @@ static const struct timeval netdown_timeout = {
  */
 static int     iface_get_id(int fd, const char *device, char *ebuf);
 static int     iface_get_mtu(int fd, const char *device, char *ebuf);
-static int     iface_get_arptype(int fd, const char *device, char *ebuf);
-static int     iface_bind(int fd, int ifindex, char *ebuf, int protocol);
+static int     iface_get_arptype(int fd, const char *device, char *ebuf);
+static int     iface_bind(int fd, int ifindex, char *ebuf, int protocol);
 static int     enter_rfmon_mode(pcap_t *handle, int sock_fd,
     const char *device);
 static int     iface_get_ts_types(const char *device, pcap_t *handle,
@@ -3498,7 +3498,7 @@ static int pcap_wait_for_frames_mmap(pcap_t *handle)
         * don't need to poll.
         */
        for (;;) {
-               /*
+               /*
                 * Yes, we do this even in non-blocking mode, as it's
                 * the only way to get error indications from a
                 * tpacket socket.
index 33204a54e045bed86b69928f586cfb9c1ca66b10..2eb0fc8c02aebd42a223f6f26367a2e1464c21f7 100644 (file)
@@ -526,8 +526,8 @@ netfilter_activate(pcap_t* handle)
        nftype_t type = OTHER;
        int i;
 
-       if (strncmp(dev, NFLOG_IFACE, strlen(NFLOG_IFACE)) == 0) {
-               dev += strlen(NFLOG_IFACE);
+       if (strncmp(dev, NFLOG_IFACE, strlen(NFLOG_IFACE)) == 0) {
+               dev += strlen(NFLOG_IFACE);
                type = NFLOG;
 
        } else if (strncmp(dev, NFQUEUE_IFACE, strlen(NFQUEUE_IFACE)) == 0) {
index 62c526d923ad288fc19d76633e1a34c22846bb78..99b5981e5a571a97896bcc4ad2ebd5aaa8787c1f 100644 (file)
@@ -2085,8 +2085,8 @@ get_if_flags(const char *name, bpf_u_int32 *flags, char *errbuf)
   #ifdef OID_GEN_PHYSICAL_MEDIUM_EX
                OID_GEN_PHYSICAL_MEDIUM_EX,
   #endif
-               OID_GEN_PHYSICAL_MEDIUM
-       };
+               OID_GEN_PHYSICAL_MEDIUM
+       };
 #define N_GEN_PHYSICAL_MEDIUM_OIDS     (sizeof gen_physical_medium_oids / sizeof gen_physical_medium_oids[0])
        size_t i;
 #endif /* OID_GEN_PHYSICAL_MEDIUM */
@@ -2398,7 +2398,7 @@ pcap_platform_finddevs(pcap_if_list_t *devlistp, char *errbuf)
                desc++;
 
        /*
-        * Found it - "desc" points to the first of the two
+        * Found it - "desc" points to the first of the two
         * nulls at the end of the list of names, so the
         * first byte of the list of descriptions is two bytes
         * after it.
index 2e5d4426adb785ae996255f81c05ea6aa7edcf56..70a36471d03ef9550a4d66ea2e04b2200400baae 100644 (file)
@@ -634,7 +634,7 @@ static int process_client_data (char *errbuf) {                                                             /* returns: -1 = error, 0
                                                    "malloc");
                                                return -1;
                                        }
-                                       memset((char *)addr, 0, sizeof(pcap_addr_t)); /* bzero() is deprecated, replaced with memset() */
+                                       memset((char *)addr, 0, sizeof(pcap_addr_t)); /* bzero() is deprecated, replaced with memset() */
                                        if (iff->addresses == 0) iff->addresses = addr;
                                        if (prev_addr) prev_addr->next = addr;                                                  /* insert a forward link */
                                        if (*ptr) {                                                                                                             /* if there is a count for the address */
index 33f1e10fa52c8409ae695b0ed5eba02c298c02b9..04f51292f03cd981f0c71c4de78ed35e8045633a 100644 (file)
@@ -52,16 +52,16 @@ A { text-decoration:none }
        <P>
        <CENTER>
        <TABLE BORDER=1 CELLSPACING=0 CELLPADDING=3>
-       <TR><TH>Application</TH>        <TH>Capture</TH>        <TH>Termination</TH></TR>
-       <TR><TH VALIGN=TOP NOWRAP>wireshark</TH>
+       <TR><TH>Application</TH>        <TH>Capture</TH>        <TH>Termination</TH></TR>
+       <TR><TH VALIGN=TOP NOWRAP>wireshark</TH>
                        <TD VALIGN=TOP>pcap_dispatch(all packets in one buffer of capture only)</TD>
                        <TD VALIGN=TOP>pcap_breakloop()</TD>
                </TR>
-       <TR><TH VALIGN=TOP NOWRAP>tshark</TH>
+       <TR><TH VALIGN=TOP NOWRAP>tshark</TH>
                        <TD VALIGN=TOP>pcap_dispatch(one buffer of capture only)</TD>
                        <TD VALIGN=TOP>Since a CTRL-C was used to terminate the application, pcap_breakloop() is never called.</TD>
                </TR>
-       <TR><TH VALIGN=TOP NOWRAP>tcpdump</TH>
+       <TR><TH VALIGN=TOP NOWRAP>tcpdump</TH>
                        <TD VALIGN=TOP>pcap_loop(all packets in the next buffer, and loop forever)</TD>
                        <TD VALIGN=TOP>pcap_breakloop()</TD>
                </TR>
@@ -771,13 +771,13 @@ A { text-decoration:none }
        <P>
        <TABLE>
                <TR>
-                       <TD STYLE="background-color: #c0FFc0">&nbsp;[Packet Header]&nbsp;</TD>
-                       <TD STYLE="background-color: #c0FFc0">&nbsp;[Packet Data]&nbsp;</TD>
-                       <TD STYLE="background-color: #c0c0FF">&nbsp;[Packet Header]&nbsp;</TD>
-                       <TD STYLE="background-color: #c0c0FF">&nbsp;[Packet Data]&nbsp;</TD>
-                       <TD STYLE="background-color: #e0c0c0">&nbsp;[Packet Header]&nbsp;</TD>
-                       <TD STYLE="background-color: #e0c0c0">&nbsp;[Packet Data]&nbsp;</TD>
-                       <TD>...</TD>
+                       <TD STYLE="background-color: #c0FFc0">&nbsp;[Packet Header]&nbsp;</TD>
+                       <TD STYLE="background-color: #c0FFc0">&nbsp;[Packet Data]&nbsp;</TD>
+                       <TD STYLE="background-color: #c0c0FF">&nbsp;[Packet Header]&nbsp;</TD>
+                       <TD STYLE="background-color: #c0c0FF">&nbsp;[Packet Data]&nbsp;</TD>
+                       <TD STYLE="background-color: #e0c0c0">&nbsp;[Packet Header]&nbsp;</TD>
+                       <TD STYLE="background-color: #e0c0c0">&nbsp;[Packet Data]&nbsp;</TD>
+                       <TD>...</TD>
                </TR>
        </TABLE>
 
index b885e02657c1e9c1d8481788167a25e6e9527864..fe9cc9c8d18af81833482b220b60e2706a48e3c9 100644 (file)
@@ -403,7 +403,7 @@ snf_findalldevs(pcap_if_list_t *devlistp, char *errbuf)
                 * the port?  If so, should we add them to the
                 * entry for the device, if they're not already in the
                 * list of IP addresses for the device?
-                */
+                */
                (void)snprintf(desc,MAX_DESC_LENGTH,"Myricom %ssnf%d",
                        merge ? "Merge Bitmask Port " : "",
                        merge ? 1 << ifa->snf_ifa_portnum : ifa->snf_ifa_portnum);
@@ -452,14 +452,14 @@ snf_findalldevs(pcap_if_list_t *devlistp, char *errbuf)
                         */
                         ret = inet_pton(AF_INET, dev->name, &addr.sin_addr);
                         if (ret == 1) {
-                               /*
-                                * Successful conversion of device name
-                                * to IPv4 address.
-                                */
-                               addr.sin_family = AF_INET;
-                               if (add_addr_to_dev(dev, &addr, sizeof(addr),
-                                   NULL, 0, NULL, 0, NULL, 0, errbuf) == -1)
-                                       return -1;
+                               /*
+                                * Successful conversion of device name
+                                * to IPv4 address.
+                                */
+                               addr.sin_family = AF_INET;
+                               if (add_addr_to_dev(dev, &addr, sizeof(addr),
+                                   NULL, 0, NULL, 0, NULL, 0, errbuf) == -1)
+                                       return -1;
                         } else if (ret == -1) {
                                /*
                                 * Error.
@@ -475,7 +475,7 @@ snf_findalldevs(pcap_if_list_t *devlistp, char *errbuf)
        snf_freeifaddrs(ifaddrs);
        /*
         * Create a snfX entry if port aggregation is enabled
-                */
+        */
        if (merge) {
                /*
                 * Add a new entry with all ports bitmask
index 7020577ca6cb459206f828131d755357f90a9ea3..726e4a8a64623bf1120515f97035efd541709142 100644 (file)
@@ -117,10 +117,10 @@ struct mon_bin_mfetch {
 #define MON_IOCX_MFETCH _IOWR(MON_IOC_MAGIC, 7, struct mon_bin_mfetch)
 #define MON_IOCH_MFLUSH _IO(MON_IOC_MAGIC, 8)
 
-#define MON_BIN_SETUP  0x1 /* setup hdr is present*/
-#define MON_BIN_SETUP_ZERO     0x2 /* setup buffer is not available */
-#define MON_BIN_DATA_ZERO      0x4 /* data buffer is not available */
-#define MON_BIN_ERROR  0x8
+#define MON_BIN_SETUP  0x1 /* setup hdr is present*/
+#define MON_BIN_SETUP_ZERO     0x2 /* setup buffer is not available */
+#define MON_BIN_DATA_ZERO      0x4 /* data buffer is not available */
+#define MON_BIN_ERROR  0x8
 
 /*
  * Private data for capturing on Linux USB.
@@ -373,13 +373,13 @@ probe_devices(int bus)
                ctrl.bRequest = USB_REQ_GET_DESCRIPTOR;
                ctrl.wValue = USB_DT_DEVICE << 8;
                ctrl.wIndex = 0;
-               ctrl.wLength = sizeof(descriptor);
+               ctrl.wLength = sizeof(descriptor);
 #else
                ctrl.requesttype = USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_DEVICE;
                ctrl.request = USB_REQ_GET_DESCRIPTOR;
                ctrl.value = USB_DT_DEVICE << 8;
                ctrl.index = 0;
-               ctrl.length = sizeof(descriptor);
+               ctrl.length = sizeof(descriptor);
 #endif
                ctrl.data = descriptor;
                ctrl.timeout = CTRL_TIMEOUT;
@@ -463,7 +463,7 @@ static int
 usb_activate(pcap_t* handle)
 {
        struct pcap_usb_linux *handlep = handle->priv;
-       char            full_path[USB_LINE_LEN];
+       char            full_path[USB_LINE_LEN];
 
        /*
         * Turn a negative snapshot value (invalid), a snapshot value of
index a8eb177b43bc207a77e1eae804c965c8cc64718c..3970d0a18426321a2ad1d8278488521df2dc18bb 100644 (file)
@@ -149,7 +149,7 @@ struct bpf_program {
 #define                BPF_B           0x10
 /*                             0x18    reserved; used by BSD/OS */
 #define BPF_MODE(code) ((code) & 0xe0)
-#define                BPF_IMM         0x00
+#define                BPF_IMM 0x00
 #define                BPF_ABS         0x20
 #define                BPF_IND         0x40
 #define                BPF_MEM         0x60
@@ -243,8 +243,8 @@ struct bpf_program {
  */
 struct bpf_insn {
        u_short code;
-       u_char  jt;
-       u_char  jf;
+       u_char  jt;
+       u_char  jf;
        bpf_u_int32 k;
 };
 
index ea8a5ba0d8ba4d6e43f5a4ed9fad7fb11cacb273..0da6de236ab6573c11155c181061c545c4c0c07e 100644 (file)
  * From a quick look at sys/net/if_hippi.h and sys/net/if_hippisubr.c
  * in an older version of NetBSD , the header appears to be:
  *
- *     a 1-byte ULP field (ULP-id)?
+ *     a 1-byte ULP field (ULP-id)?
  *
  *     a 1-byte flags field;
  *
  * which is stored with each packet:
  *
  *   EXP_PDU_TAG_DISSECTOR_NAME      the name of the Wireshark dissector
- *                                  that can make sense of the data stored.
+ *                                  that can make sense of the data stored.
  *
  *   EXP_PDU_TAG_HEUR_DISSECTOR_NAME the name of the Wireshark heuristic
  *                                  dissector that can make sense of the
index 9fd14f5e9688e3014b0a782b04db7de74833b356..6894b3cd3265236dbad8d73b40e8531b6f0117eb 100644 (file)
@@ -571,7 +571,7 @@ PCAP_AVAILABLE_0_4
 PCAP_API const u_char *pcap_next(pcap_t *, struct pcap_pkthdr *);
 
 PCAP_AVAILABLE_0_8
-PCAP_API int   pcap_next_ex(pcap_t *, struct pcap_pkthdr **, const u_char **);
+PCAP_API int   pcap_next_ex(pcap_t *, struct pcap_pkthdr **, const u_char **);
 
 PCAP_AVAILABLE_0_8
 PCAP_API void  pcap_breakloop(pcap_t *);
@@ -583,7 +583,7 @@ PCAP_AVAILABLE_0_4
 PCAP_API int   pcap_setfilter(pcap_t *, struct bpf_program *);
 
 PCAP_AVAILABLE_0_9
-PCAP_API int   pcap_setdirection(pcap_t *, pcap_direction_t);
+PCAP_API int   pcap_setdirection(pcap_t *, pcap_direction_t);
 
 PCAP_AVAILABLE_0_7
 PCAP_API int   pcap_getnonblock(pcap_t *, char *);
index 32906790fba1bc75437f0b1c259c2a2e57cfd3f4..b0145cf23612da243f9c57aa73e4240b9e3a79e6 100644 (file)
@@ -1,5 +1,5 @@
 #  Copyright (c) 1993, 1994, 1995, 1996
-#      The Regents of the University of California.  All rights reserved.
+#      The Regents of the University of California.  All rights reserved.
 #
 #  Redistribution and use in source and binary forms, with or without
 #  modification, are permitted provided that: (1) source code distributions
index 933f3267076184755d15fec4a456c33fe3a4f818..1c07f76fd1c09ce2fd0748485b6eafe91b1776e6 100644 (file)
@@ -1389,7 +1389,7 @@ int sock_bufferize(const void *data, int size, char *outbuf, int *offset, int to
  *
  *   SOCK_RECEIVALL_XXX:
  *
- *     if SOCK_RECEIVEALL_NO, return as soon as some data is ready
+ *     if SOCK_RECEIVEALL_NO, return as soon as some data is ready
  *     if SOCK_RECEIVALL_YES, wait until 'size' data has been
  *         received (in case the socket does not have enough data available).
  *
index f195693713f9c4fc8b913a5be5661dfed274fc99..d3fd328ce9a874bd79eb9157846488181c0f3f62 100644 (file)
@@ -1,5 +1,5 @@
 #  Copyright (c) 1993, 1994, 1995, 1996
-#      The Regents of the University of California.  All rights reserved.
+#      The Regents of the University of California.  All rights reserved.
 #
 #  Redistribution and use in source and binary forms, with or without
 #  modification, are permitted provided that: (1) source code distributions