advance the packet data pointer
OSPF: Print more truncation indications
OSPF: Add more length checks
+ SLL2: Translate interface indices to names on Linux only.
TCP: Add support for the AE (AccECN) flag.
User interface:
Add optional unit suffix on -C file size.
# Header files.
#
check_include_file(rpc/rpc.h HAVE_RPC_RPC_H)
-check_include_file(net/if.h HAVE_NET_IF_H)
if(HAVE_RPC_RPC_H)
check_include_files("rpc/rpc.h;rpc/rpcent.h" HAVE_RPC_RPCENT_H)
endif(HAVE_RPC_RPC_H)
/* Define to 1 if you have the `rpc' library (-lrpc). */
#cmakedefine HAVE_LIBRPC 1
-/* Define to 1 if you have the <net/if.h> header file. */
-#cmakedefine HAVE_NET_IF_H 1
-
/* Define to 1 if you have the `openat' function. */
#cmakedefine HAVE_OPENAT 1
fi
AC_LBL_C_INIT(V_CCOPT, V_INCLS)
-AC_CHECK_HEADERS(rpc/rpc.h rpc/rpcent.h net/if.h)
+AC_CHECK_HEADERS(rpc/rpc.h rpc/rpcent.h)
#
# Get the size of a void *, to know whether this is a 32-bit or 64-bit build.
#
#include <config.h>
-#ifdef HAVE_NET_IF_H
+#ifdef __linux__
#include <net/if.h>
#endif
u_short ether_type;
int llc_hdrlen;
u_int hdrlen;
-#ifdef HAVE_NET_IF_H
+#ifdef __linux__
uint32_t if_index;
char ifname[IF_NAMESIZE];
#endif
ND_TCHECK_LEN(p, SLL2_HDR_LEN);
sllp = (const struct sll2_header *)p;
-#ifdef HAVE_NET_IF_H
+#ifdef __linux__
if_index = GET_BE_U_4(sllp->sll2_if_index);
if (!if_indextoname(if_index, ifname))
strncpy(ifname, "?", 2);
pcap_datalink_val_to_description(dlt));
}
fprintf(stderr, ", snapshot length %d\n", pcap_snapshot(pd));
-#ifdef DLT_LINUX_SLL2
+#if defined(DLT_LINUX_SLL2) && defined(__linux__)
if (dlt == DLT_LINUX_SLL2)
fprintf(stderr, "Warning: interface names might be incorrect\n");
#endif