| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| |
| | |
mcr-add_with-libnl_switch
|
| |\ |
|
| | | |
|
|\ \ \
| | | |
| | | | |
configure.in cross compile and noMMU fixes
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Also, -lpthread is needed for the test to build for noMMU targets (AKA
uClinux).
Signend-off-by: Baruch Siach <baruch@tkos.co.il>
|
| | | |
| | | |
| | | |
| | | |
| | | | |
It breaks cross compilation since /usr/include/libnl3 is the host include
directory that is not guaranteed to exist at all.
|
|\ \ \ \
| | | | |
| | | | | |
Move the inclusion of config.h to the top of scanner.c
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This works around _LARGE_FILES difficulties on AIX. See
http://seclists.org/nmap-dev/2012/q1/459 for example.
This is an alternative to the flex-only solution in #359
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Add the --disable-packet-ring configure option.
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This allows the creation of 32-bit binaries that are compatible with
64-bit Linux kernels before version 2.6.27.
Original patch credit: David Fifield of the Nmap project
(https://svn.nmap.org/nmap/libpcap/NMAP_MODIFICATIONS/0002-Add-the-disable-packet-ring-configure-option.patch)
|
|\ \ \ \ \ |
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
pcap-linux: Obtain VLAN TPID from the kernel when available
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Unify the VLAN TPID selection logic into a helper macro VLAN_TPID().
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The VLAN TPID was hardcoded in pcap-linux.c but recent Linux kernel
supports 802.1ad Q-in-Q.
Since Linux 3.14, kernel gives the TPID value to the userspace when
available.
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
|
| |\ \ \ \ \ \
|/ / / / / / /
| | | | | | |
| | | | | | | |
Merge branch 'master' of https://github.com/solofox/libpcap into solofox-master
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
browser.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
bpf_optimize().
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
That'll let us make Travis builds fail if the test fails.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
If we don't have an address, don't add a pcap_addr_t with a null addr
pointer to the list of addresses; it conveys no information.
That seems to happen, at least with a venet device on Linux on the
Travis build machine.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This occurs with 'venet0' interface.
The reason of the NULL pointer is currently unkown.
There is now a message:
Warning: a->addr is NULL, skipping this address.
Context:
Linux: 2.6.32 x86_64
$ ip link
2: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
link/void
gdb trace:
--------------------------------------------------------------------------
venet0
Loopback: no
Program received signal SIGSEGV, Segmentation fault.
0x0000000000403430 in ifprint (d=0x63e070) at ./tests/findalldevstest.c:69
69 switch(a->addr->sa_family)
--------------------------------------------------------------------------
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Make sure the userland filtering happens correctly on cooked interfaces.
|
|/ / / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
If filtering in userland and capturing on a cooked interface, the packet buffer
being sent to bpf_filter_with_aux_data did not include the sll header, so the
filter was being applied improperly. The buffer would start at the layer3
header.
This change moves the code to fill out the sll structure and update the bp
pointer to point to it to before the call to bpf_filter_with_aux_data.
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
It really means "payload of the link layer", where "link layer" includes
any 802.2 LLC headers, and is used for fields not at the "network
layer". The old OR_LINKPL was no longer used - either OR_LLC is used,
for testing fields in the 802.2 LLC header, or OR_MPLSPL is used.
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
That subsumes gen_load_linkhdrrel(), gen_load_prevlinkhdrrel(), and
gen_load_linkplrel().
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Define a structure that, for absolute offsets, has a Boolean flag
indicating whether the offset has a variable part, the constant part of
the offset, and the register, if any, holding the variable part of the
offset. Have a routine that either generates code to load the X
register with the variable part of the offset or generates no code, and
use that instead of the existing routines for specific offsets.
Use instances of that structure instead of individual variables.
Add a macro to save the current link-layer header absolute offset and
set it to a new value.
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
I.e., treat them as the sum of a possibly-missing variable part
(stored in a "memory register") and a possibly-zero constant part.
Given that, correctly handle PPPoE; that finally makes filters for
protocols on top of PPPoE, when "E" stands for "Wi-Fi", generate the
correct code.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Clean up some comments while we're at it.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Replace "ll"/"LL" with "linkhdr"/"LINKHDR", matching "linkpl"/"LINKPL",
as it refers to the offset to the link-layer header.
Use "prev", not "outer", for the link-layer information for the layer in
which the current one is encapsulated (if there's any encapsulation);
that name works better if there are multiple layers of encapsulation.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
That code has to look at the link-layer header types and offsets for the
outermost link layer when, for example, the link-layer header type and
offset are changed for PPPoE session-layer packets.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
As a side-effect, this fixes PPPoE over LANE, just in case anybody
cares.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
To handle the case where link-layer frames are encapsulated inside
another protocol stack, and where we'd want to do tests on the
encapsulated link-layer frame, have variables for an "outer" link-layer
type, that being the link-layer type of the other protocol stack, and
use those when relevant.
Use that for ATM LANE; that lets us get rid of is_lane. Consolidate the
code to generate tests for non-LE Control frames into a single routine
while we're at it.
Also, set off_ll rather than off_mac for DLT_NETANALYZER and
DLT_NETANALYZER_TRANSPARENT; this lets us eliminate off_mac, simplifying
things a bit.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Distinguish between "offset from the beginning of the 802.2 LLC header",
"offset from the beginning of the MPLS payload", and "offset from the
beginning of the link-layer payload".
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Use "link-layer" instead of "MAC-layer", and "linkpl" instead of
"macpl".
(Yes, there's still off_mac; we need to handle encapsulation of
link-layer protocols in other protocols better.)
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The offset of the MAC-layer payload is, in the general case, now the
sum of a variable value, computed based on the contents of various parts
of the packet, and a constant value. Rename off_macpl to
off_macpl_constant_part to indicate that it's the constant value in
question, not necessarily the full offset, and update a lot of comments
to reflect that reality.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Some filters (such as VLAN) increment off_macpl as they are parsed.
In the fixed MAC header case, this is handled properly since it is
simply incorporated into the header length. However, currently with
variable length headers we only look at the variable component and ignore
the fixed part, so the VLAN stack can't be handled.
This includes both pieces for variable headers; in cases where there
are no VLAN filters, off_macpl is zero so things still work.
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Directly using off_linktype to match the VLAN EtherType only
works for basic Ethernet cases. Instead we can use gen_linktype()
which is more general and is more likely to be updated to handle
future protocols.
|
| | | | | | | |
|
| | | | | | | |
|