Commit Graph

33 Commits (fa6b73d1c9f88d5ee534f5d85cb29d9426b78e20)

Author SHA1 Message Date
Victor Julien fa6b73d1c9 offloading: don't set multiple times per interface
This could happen with netmap igb0->igb0^ IPS mode.
7 years ago
Jacob Masen-Smith ec77632e84 Adds WinDivert support to Windows builds
Enables IPS functionality on Windows using the open-source
(LGPLv3/GPLv2) WinDivert driver and API.

From https://www.reqrypt.org/windivert-doc.html : "WinDivert is a
user-mode capture/sniffing/modification/blocking/re-injection package
for Windows Vista, Windows Server 2008, Windows 7, and Windows 8.
WinDivert can be used to implement user-mode packet filters, packet
sniffers, firewalls, NAT, VPNs, tunneling applications, etc., without
the need to write kernel-mode code."

- adds `--windivert [filter string]` and `--windivert-forward [filter
    string]` command-line options to enable WinDivert IPS mode.
    `--windivert[-forward] true` will open a filter for all traffic. See
    https://www.reqrypt.org/windivert-doc.html#filter_language for more
    information.

Limitation: currently limited to `autofp` runmode.

Additionally:
- `tmm_modules` now zeroed during `RegisterAllModules`
- fixed Windows Vista+ `inet_ntop` call in `PrintInet`
- fixed `GetRandom` bug (nonexistent keys) on fresh Windows installs
- fixed `RandomGetClock` building on Windows builds
- Added WMI queries for MTU
8 years ago
Eric Leblond 75b6972cfd util-ioctl: fix a typo in setter message 8 years ago
Victor Julien ab1200fbd7 compiler: more strict compiler warnings
Set flags by default:

    -Wmissing-prototypes
    -Wmissing-declarations
    -Wstrict-prototypes
    -Wwrite-strings
    -Wcast-align
    -Wbad-function-cast
    -Wformat-security
    -Wno-format-nonliteral
    -Wmissing-format-attribute
    -funsigned-char

Fix minor compiler warnings for these new flags on gcc and clang.
9 years ago
Victor Julien 5e3b61cc65 offloading: reduce verbosity to 'perf' 9 years ago
Victor Julien 2b2984dae9 offloading: implement restoring settings for BSD 9 years ago
Victor Julien 499e27de14 offloading: restore settings on exit 9 years ago
Victor Julien 98092f63b5 offloading: Linux ethtool offloading support 9 years ago
Victor Julien 7004987670 offloading: preparation for disabling offload on BSD
Add functions for setting IFCAP flags.
9 years ago
Victor Julien 18de4c9654 offloading: work around missing TOE support 10 years ago
Victor Julien 9b80c21d78 offloading: distinguish between csum and the rest
As AF_PACKET handles csum offloading don't check for this type of
offloading. Other methods like pcap and netmap do require it to be
turned off.

Improve disable command suggestion wording.
10 years ago
Victor Julien 03d46f1369 offloading: reduce verbosity 10 years ago
Victor Julien 45fa25eb0c offloading: improve checks on FreeBSD
Move FreeBSD specific (but not netmap specific) checks from the netmap
code to the general ioctl wrapper code.

Warn from the check functions now, so callers no longer need to.
10 years ago
Victor Julien 33f8769001 offloading: move linux specific into their own func 10 years ago
Victor Julien 54bc471810 offloading: check for more offloading on Linux 10 years ago
Eric Leblond 4defc5acc2 util-ioctcl: increase header size
Headers can contain VLAN or Qing so we need to increase the value
returned by GetIfaceMaxHWHeaderLength.
10 years ago
Victor Julien 2a7f068438 ioctl: fix NULL check after dereference (CID 1204326) 10 years ago
Victor Julien cf2588acc4 offloading: compress printing of iface offloading 10 years ago
Alexander Gozman 8ac48872a5 Feature 1605: more descriptive error messages when checking MTU, etc 10 years ago
Eric Leblond bed5b28412 util-ioctl: don't build code RX ring on old system
If ETHTOOL_GRXRINGS is undefined we will not be able to build the
RX rings code. So we can make the build conditional to the
definition of ETHTOOL_GRXRINGS.
11 years ago
Victor Julien fa10811585 ioctl: make all string args const pointers 11 years ago
Eric Leblond 123c58af4b util-ioctl: add message in case of failure 11 years ago
Eric Leblond b4bb6e67ba util-ioctl: Add function to get number of RSS queues on iface
The number of RSS queues can be fetched via a standard ioctl which
is independant of hardware.
11 years ago
Victor Julien f06e5f3c73 ethtool: add missing include necessary for CentOS5 12 years ago
Alexander Gozman 405baa3cb2 Fix compile-time error on old kernels and ethtool.h 12 years ago
Eric Leblond 6e77c4d1b4 util-ioctl: only get MTU when iface name is set
This patch fixes a warning message when suricata is started without
giving an interface name on the command line. The code was trying
to get the MTU even if pcap_dev was not set.
12 years ago
Eric Leblond 9bbcc8671e util-ioctl: ioctl error should be a warning 12 years ago
Eric Leblond fcc8759561 util-ioctl: add GRO/LRO detection capabilities
This patch adds a new function GetIfaceOffloading which return 0
if LRO and GRO are not set on a interface and 1 if not the case.
12 years ago
Eric Leblond 008ed41cb4 util-ioctl: minor code cleaning.
Fix author e-mail and simplify an indentation.
12 years ago
Victor Julien fc7879322e Rename GetIfaceMaxPayloadSize to GetIfaceMaxPacketSize to reflect the actual function. 13 years ago
Victor Julien b73939bcef Clean up & better check includes to allow Windows to build. 15 years ago
Victor Julien 076d77cd80 Add strncpy and strncat to banned function list as we have better replacements: strlcpy and strlcat. 15 years ago
Eric Leblond 3eada85ff8 Add interface setting discovery via ioctl
This patch adds support for MTU discovery of link following idea
of go.ph1g. It also adds some function to give a approximation of
link header length.
15 years ago