]> The Tcpdump Group git mirrors - libpcap/commitdiff
Fix spaces before tabs in indentation
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 15 Feb 2023 09:47:49 +0000 (10:47 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Wed, 15 Feb 2023 10:36:27 +0000 (11:36 +0100)
23 files changed:
CHANGES
Makefile.in
README.md
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 34757c6df346cc2d22495014747df292f3a1cf84..7a16ac00adc79c58c1ac69f484741366d50c679e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1063,7 +1063,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.
 
        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
 
        Support for radiotap on Linux (Mike Kershaw)
        Fixes for HP-UX
@@ -1074,7 +1074,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
 
        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
 
        Fixes for compiling on nearly every platform,
                including improved 64bit support
@@ -1113,16 +1113,16 @@ Wed.   November 12, 2003. [email protected]. Summary for 0.8 release
 
 Tuesday, February 25, 2003. [email protected].  0.7.2 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
 
 
 Monday October 23, 2001. [email protected]. Summary for 0.7 release
 
index 771aef7068442753dec8ca793270f5c6da121902..77a688cb77a91b3c18a57a937ebebc859036f65b 100644 (file)
@@ -1,5 +1,5 @@
 #  Copyright (c) 1993, 1994, 1995, 1996
 #  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
 #
 #  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
 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
 ```
                Network Research Group <[email protected]>
                ftp://ftp.ee.lbl.gov/old/libpcap-0.4a7.tar.Z
 ```
index 940979fed4109766f7b2d61e14bd82823d73ce05..06aae07add5c54dc9f122de00a7a0648460916fd 100644 (file)
@@ -242,7 +242,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.])
                AC_MSG_RESULT(yes)
                AC_DEFINE(HAVE_GNU_STRERROR_R,,
                    [Define to 1 if you have a GNU-style `strerror_r' function.])
@@ -806,9 +806,9 @@ else
                V_PCAP=linux
                VALGRINDTEST_SRC=valgrindtest.c
        elif test "$ac_cv_header_net_pfilt_h" = yes; then
                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
                #
                V_PCAP=pf
        elif test "$ac_cv_header_net_enet_h" = yes; then
                #
@@ -1010,7 +1010,7 @@ enet)
        #
        # Capture module
        #
        #
        # Capture module
        #
-       PLATFORM_C_SRC="pcap-enet.c"
+       PLATFORM_C_SRC="pcap-enet.c"
        ;;
 
 haiku)
        ;;
 
 haiku)
@@ -1029,7 +1029,7 @@ linux)
        #
        # Capture module
        #
        #
        # Capture module
        #
-       PLATFORM_C_SRC="pcap-linux.c"
+       PLATFORM_C_SRC="pcap-linux.c"
 
        #
        # Do we have the wireless extensions?
 
        #
        # Do we have the wireless extensions?
@@ -1130,7 +1130,7 @@ bpf)
        #
        # Capture module
        #
        #
        # Capture module
        #
-       PLATFORM_C_SRC="pcap-bpf.c"
+       PLATFORM_C_SRC="pcap-bpf.c"
 
        #
        # Check whether we have the *BSD-style ioctls.
 
        #
        # Check whether we have the *BSD-style ioctls.
@@ -1155,21 +1155,21 @@ pf)
        #
        # Capture module
        #
        #
        # Capture module
        #
-       PLATFORM_C_SRC="pcap-pf.c"
+       PLATFORM_C_SRC="pcap-pf.c"
        ;;
 
 snit)
        #
        # Capture module
        #
        ;;
 
 snit)
        #
        # Capture module
        #
-       PLATFORM_C_SRC="pcap-snit.c"
+       PLATFORM_C_SRC="pcap-snit.c"
        ;;
 
 snoop)
        #
        # Capture module
        #
        ;;
 
 snoop)
        #
        # Capture module
        #
-       PLATFORM_C_SRC="pcap-snoop.c"
+       PLATFORM_C_SRC="pcap-snoop.c"
        ;;
 
 hurd)
        ;;
 
 hurd)
@@ -1221,7 +1221,7 @@ null)
        #
        # Capture module
        #
        #
        # Capture module
        #
-       PLATFORM_C_SRC="pcap-null.c"
+       PLATFORM_C_SRC="pcap-null.c"
        ;;
 
 *)
        ;;
 
 *)
index 59201aac4a17f45d0472363c1ccd8459352c1108..07c2a9d26bd1d629988bed13df3fe7cc82a289ba 100644 (file)
--- a/gencode.c
+++ b/gencode.c
@@ -8005,7 +8005,7 @@ gen_broadcast(compiler_state_t *cstate, int proto)
                default:
                        bpf_error(cstate, "not a broadcast link");
                }
                default:
                        bpf_error(cstate, "not a broadcast link");
                }
-               /*NOTREACHED*/
+               /*NOTREACHED*/
 
        case Q_IP:
                /*
 
        case Q_IP:
                /*
@@ -8670,7 +8670,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");
                        return (b);
                } else
                        bpf_error(cstate, "ARCnet address used in non-arc expression");
-               /*NOTREACHED*/
+               /*NOTREACHED*/
 
        default:
                bpf_error(cstate, "aid supported only on ARCnet");
 
        default:
                bpf_error(cstate, "aid supported only on ARCnet");
@@ -8706,27 +8706,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");
 
        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");
 
        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");
 
        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");
 
        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");
 
        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");
 
        case Q_TA:
                bpf_error(cstate, "'ta' is only supported on 802.11");
-               /*NOTREACHED*/
+               /*NOTREACHED*/
        }
        abort();
        /*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;
         * *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) {
                /*
            &h_errnoval);
        if (err != 0) {
                /*
@@ -296,16 +296,16 @@ pcap_nametonetaddr(const char *name)
        else
                np = &result_buf;
   #else
        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)
        np = getnetbyname(name);
   #endif
        if (np != NULL)
@@ -552,16 +552,16 @@ pcap_nametoproto(const char *str)
        else
                p = &result_buf;
   #else
        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
         * 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)
        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 {
  *
  * 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
     }
  *
  *  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_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);
                                break;
                }
                cmsg = CMSG_NXTHDR(&msg, cmsg);
index 6fad94210f64786667b6da0de331d204944ff4ef..7c5219503a2c15e7776f6fcc316511f7ee6a79ba 100644 (file)
  * which is stored with each packet:
  *
  *   EXP_PDU_TAG_DISSECTOR_NAME      the name of the Wireshark dissector
  * 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
  *
  *   EXP_PDU_TAG_HEUR_DISSECTOR_NAME the name of the Wireshark heuristic
  *                                  dissector that can make sense of the
@@ -1284,7 +1284,7 @@ static struct linktype_map {
        { DLT_FR,               LINKTYPE_FRELAY },
 #endif
 
        { 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 },
        { 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};
 
        linknamelist_t  *entry, *next;
        linkwalk_t      lw = {NULL, 0};
-       int             save_errno;
+       int             save_errno;
 
        /*
         * Get the list of regular interfaces first.
 
        /*
         * Get the list of regular interfaces first.
index 871cb662365a85185e18f4f48e8a5cb93f0463c5..4cf99a921a50f75eb6798e1345794bb135fd79e3 100644 (file)
@@ -2,7 +2,7 @@
  *  pcap-linux.c: Packet capture interface to the Linux kernel
  *
  *  Copyright (c) 2000 Torsten Landschoff <[email protected]>
  *  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
  *
  *
  *  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_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,
 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,
@@ -3504,7 +3504,7 @@ static int pcap_wait_for_frames_mmap(pcap_t *handle)
         * don't need to poll.
         */
        for (;;) {
         * 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.
                 * 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;
 
        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) {
                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
   #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 */
 #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++;
 
        /*
                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.
         * 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;
                                        }
                                                    "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 */
                                        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 27ae94a36903aa488d8a417ce50a4efd9ceece0b..cb88aabe5030b521d066804b9bdddd624e6ee5f8 100644 (file)
@@ -52,16 +52,16 @@ A { text-decoration:none }
        <P>
        <CENTER>
        <TABLE BORDER=1 CELLSPACING=0 CELLPADDING=3>
        <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>
                        <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>
                        <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>
                        <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>
        <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>
 
                </TR>
        </TABLE>
 
index 95a64ac03e1a975194e63c658c69ae68d1aa5844..14e7f98558981a786032311567a8cf0d8c042cb8 100644 (file)
@@ -400,7 +400,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?
                 * 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);
                (void)snprintf(desc,MAX_DESC_LENGTH,"Myricom %ssnf%d",
                        merge ? "Merge Bitmask Port " : "",
                        merge ? 1 << ifa->snf_ifa_portnum : ifa->snf_ifa_portnum);
@@ -449,14 +449,14 @@ snf_findalldevs(pcap_if_list_t *devlistp, char *errbuf)
                         */
                         ret = inet_pton(AF_INET, dev->name, &addr.sin_addr);
                         if (ret == 1) {
                         */
                         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.
                         } else if (ret == -1) {
                                /*
                                 * Error.
@@ -472,7 +472,7 @@ snf_findalldevs(pcap_if_list_t *devlistp, char *errbuf)
        snf_freeifaddrs(ifaddrs);
        /*
         * Create a snfX entry if port aggregation is enabled
        snf_freeifaddrs(ifaddrs);
        /*
         * Create a snfX entry if port aggregation is enabled
-                */
+        */
        if (merge) {
                /*
                 * Add a new entry with all ports bitmask
        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_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.
 
 /*
  * 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.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;
 #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;
 #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;
 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
 
        /*
         * 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_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
 #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;
  */
 struct bpf_insn {
        u_short code;
-       u_char  jt;
-       u_char  jf;
+       u_char  jt;
+       u_char  jf;
        bpf_u_int32 k;
 };
 
        bpf_u_int32 k;
 };
 
index 2663c2a64194fd0ac210b5a8c10db664d5862bea..08b005b6e4690fd168b365741df71dd8884ced1c 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:
  *
  * 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;
  *
  *
  *     a 1-byte flags field;
  *
  * which is stored with each packet:
  *
  *   EXP_PDU_TAG_DISSECTOR_NAME      the name of the Wireshark dissector
  * 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
  *
  *   EXP_PDU_TAG_HEUR_DISSECTOR_NAME the name of the Wireshark heuristic
  *                                  dissector that can make sense of the
index 88b96847c1191b8f7a8484020b731b7920b7f68a..53733b54fbcb488f37c236d6f210326157cfde71 100644 (file)
@@ -620,7 +620,7 @@ PCAP_AVAILABLE_0_4
 PCAP_API const u_char *pcap_next(pcap_t *, struct pcap_pkthdr *);
 
 PCAP_AVAILABLE_0_8
 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 *);
 
 PCAP_AVAILABLE_0_8
 PCAP_API void  pcap_breakloop(pcap_t *);
@@ -632,7 +632,7 @@ PCAP_AVAILABLE_0_4
 PCAP_API int   pcap_setfilter(pcap_t *, struct bpf_program *);
 
 PCAP_AVAILABLE_0_9
 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 *);
 
 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
 #  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
 #
 #  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:
  *
  *
  *   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).
  *
  *     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
 #  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
 #
 #  Redistribution and use in source and binary forms, with or without
 #  modification, are permitted provided that: (1) source code distributions