Add support to build libpcap.lib and wpcap.dll under Cygnus and
MingW32.
Support for radiotap on Linux (Mike Kershaw)
Fixes for HP-UX
parts of the filter expression to look at the PPP headers and
headers in the PPP payload
Fixes for compiling on nearly every platform,
including improved 64bit support
- 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.
# 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
system-dependent packet capture modules in each application.
```text
-formerly from Lawrence Berkeley National Laboratory
+formerly from Lawrence Berkeley National Laboratory
ftp://ftp.ee.lbl.gov/old/libpcap-0.4a7.tar.Z
```
#
# 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
#
# 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.
_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; }
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
#
#
# 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.
#
# Capture module
#
- PLATFORM_C_SRC="pcap-linux.c"
+ PLATFORM_C_SRC="pcap-linux.c"
#
# Do we have the wireless extensions?
#
# 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
#
# 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
#
#
# Capture module
#
- PLATFORM_C_SRC="pcap-bpf.c"
+ PLATFORM_C_SRC="pcap-bpf.c"
#
# Check whether we have the *BSD-style ioctls.
#
# 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)
#
# Capture module
#
- PLATFORM_C_SRC="pcap-null.c"
+ PLATFORM_C_SRC="pcap-null.c"
;;
*)
#
# 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
#
# 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
#
#
# 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
#
# 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
#
#
# 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
#
# 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
#
#
# 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
#
# 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
#
)
],
[
- # 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.])
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
#
#
# 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.
#
# Capture module
#
- PLATFORM_C_SRC="pcap-linux.c"
+ PLATFORM_C_SRC="pcap-linux.c"
#
# Do we have the wireless extensions?
#
# Capture module
#
- PLATFORM_C_SRC="pcap-bpf.c"
+ PLATFORM_C_SRC="pcap-bpf.c"
#
# Check whether we have the *BSD-style ioctls.
#
# 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)
#
# Capture module
#
- PLATFORM_C_SRC="pcap-null.c"
+ PLATFORM_C_SRC="pcap-null.c"
;;
*)
default:
bpf_error(cstate, "not a broadcast link");
}
- /*NOTREACHED*/
+ /*NOTREACHED*/
case Q_IP:
/*
return (b);
} else
bpf_error(cstate, "ARCnet address used in non-arc expression");
- /*NOTREACHED*/
+ /*NOTREACHED*/
default:
bpf_error(cstate, "aid supported only on ARCnet");
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*/
* *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) {
/*
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)
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)
*
* 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
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);
* 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
{ 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 },
linknamelist_t *entry, *next;
linkwalk_t lw = {NULL, 0};
- int save_errno;
+ int save_errno;
/*
* Get the list of regular interfaces first.
* pcap-linux.c: Packet capture interface to the Linux kernel
*
*
* License: BSD
*
*/
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,
* 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.
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) {
#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 */
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.
"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 */
<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>
<P>
<TABLE>
<TR>
- <TD STYLE="background-color: #c0FFc0"> [Packet Header] </TD>
- <TD STYLE="background-color: #c0FFc0"> [Packet Data] </TD>
- <TD STYLE="background-color: #c0c0FF"> [Packet Header] </TD>
- <TD STYLE="background-color: #c0c0FF"> [Packet Data] </TD>
- <TD STYLE="background-color: #e0c0c0"> [Packet Header] </TD>
- <TD STYLE="background-color: #e0c0c0"> [Packet Data] </TD>
- <TD>...</TD>
+ <TD STYLE="background-color: #c0FFc0"> [Packet Header] </TD>
+ <TD STYLE="background-color: #c0FFc0"> [Packet Data] </TD>
+ <TD STYLE="background-color: #c0c0FF"> [Packet Header] </TD>
+ <TD STYLE="background-color: #c0c0FF"> [Packet Data] </TD>
+ <TD STYLE="background-color: #e0c0c0"> [Packet Header] </TD>
+ <TD STYLE="background-color: #e0c0c0"> [Packet Data] </TD>
+ <TD>...</TD>
</TR>
</TABLE>
* 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);
*/
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.
snf_freeifaddrs(ifaddrs);
/*
* Create a snfX entry if port aggregation is enabled
- */
+ */
if (merge) {
/*
* Add a new entry with all ports bitmask
#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.
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;
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
#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
*/
struct bpf_insn {
u_short code;
- u_char jt;
- u_char jf;
+ u_char jt;
+ u_char jf;
bpf_u_int32 k;
};
* 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
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_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 *);
# 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
*
* 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).
*
# 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