Victor Julien
2d5c381c3b
decode/ipv4: prep for turning ip4h/ip6h into union
...
Store IPv4 decoder vars in a new Packet::l3 section in the packet.
Use inline functions instead of the often multi-layer macro's for
various IPv4 header getters.
Ticket: #6938 .
3 years ago
Jeff Lucovsky
d7026b7b11
detect/ipopts: Handle multiple ip options
...
Issue: 6864
Multiple IP options were not handled properly as the value being OR'd
into the packet's ip option variable were enum values instead of bit
values.
3 years ago
Victor Julien
561b81dd9e
decode: don't clear computed csums twice
...
Already done in a generic way by PACKET_RESET_CHECKSUMS.
3 years ago
Victor Julien
40afbf5b09
decode/ipv4: remove unused field
3 years ago
Jason Ish
44388f1b69
src: make include guards more library friendly
...
Include guards for libraries should use a prefix that is meaningful for
the library to avoid conflicts with other user code. For Suricata, use
SURICATA.
Additionally, remove the pattern of leading and trailing underscores as
these are reserved for the language implementation per the C and C++
standards.
3 years ago
Victor Julien
79d5caacd0
decode: spelling
4 years ago
Sascha Steinbiss
8438ee48aa
decode-ipv4: adjust validation to RFC
...
RFC1108 only specifies a minimum field length of 3, not
a fixed length of 11.
4 years ago
Sascha Steinbiss
fb790121bb
decode-ipv4: implement extended security option
...
IP option 0x85 (extended security) is mentioned in the
documentation for the ipopts keyword but was not implemented.
4 years ago
Victor Julien
002b335b4a
decode/checksums: constify pointer args
5 years ago
Philippe Antoine
73ed780095
decode: fix integer warnings
...
Ticket: 4516
5 years ago
Victor Julien
579cc9f02b
const: constify decoder, app-layer, detect funcs
7 years ago
Victor Julien
9dd200b5c9
decode: remove useless packed attributes
8 years ago
Victor Julien
11be9bd971
mingw: add SCNtohl and SCNtohs macro's
...
On MinGW the result of ntohl needs to be casted to uint32_t and
the result of ntohs to uint16_t. To avoid doing this everywhere
add SCNtohl and SCNtohs macros.
9 years ago
Jason Ish
63078909d5
ipv4: update checksum function to be like tcp/udp
...
Update the IPv4 checksum function to be like the
changed TCP/UDP checksum functions for consistency.
10 years ago
Victor Julien
6ea0db2f60
ipv4: removed unused variables
11 years ago
Victor Julien
8c37906cf9
ipv4: store ipopts as flags, not bools
11 years ago
Victor Julien
be5a5df1f7
ipv4: shrink per packet ipopts storage
11 years ago
Ken Steele
c91b7fd3bc
More structures that need to be marked Packed.
...
These structures are cast from raw packet data, so they should be packed.
The case is:
typedef struct Foo_ {
} Foo;
Foo *f = (Foo *)pkt;
12 years ago
Ken Steele
f16b339fc4
Rename checksums to level3_comp_csum and level4_comp_csum.
...
This will also sharing even more memory in the Packet_ structure.
13 years ago
Anoop Saldanha
98a8234e0a
csum function fixes. Improves alert accuracy. FPs on invalid-csums decoder rules fixed
15 years ago
Victor Julien
cdba2f50d1
Various fixes and improvements based on feedback by Coverity analyzer.
15 years ago
Victor Julien
e1d4e16645
Simplify packet decoding macro's.
16 years ago
Victor Julien
6aa551c558
Small optimizations to IPV4 and TCP header parsing.
16 years ago
Gurvinder Singh
7d0781b349
added support to log dropped packet as netfilter logs while in inline mode
16 years ago
Victor Julien
6519a86ec7
Move packet pool to ringbuffer, update packet pool api and ringbuffer api. Remove memset usage from PACKET_RECYCLE, add proper cleanup macros.
17 years ago
William Metcalf
2eef905c07
GPL and Copyright header updates.
17 years ago
Victor Julien
548a3b2c93
Improve flow hash debugging functions. Make sure ICMP errors don't create flows. Handle ICMP DEST UNREACH errors in the flow they are sending the error about.
17 years ago
William Metcalf
ce01927515
Import of GPLv2 Header 050410
17 years ago
Pablo Rincon
943b4742a8
Moving inline functions to the .h files, so gcc can inline them correctly
17 years ago
Jamie
0dc471db9c
looking inside ICMP packets
17 years ago
Victor Julien
0d0ffb9963
Reorganize header inclusions.
17 years ago
Jason Ish
beef3c6c24
Fix access to ttl.
17 years ago
Anoop Saldanha
22c0ec2bc5
Added support for the csum-<protocol> rules keyword to the detection engine. Keywords added are ipv4-csum, tcpv4-csum, tcpv6-csum, udpv4-csum, udpv6-csum, icmpv4-csum and icmpv6-csum
17 years ago
Brian Rectanus
74cb73fc1d
Decode IPv4 options.
17 years ago
Brian Rectanus
fa5939ca91
64 bit cleanup part2
17 years ago
Victor Julien
689bbfdc45
Rename all structure definitions in the "typedef struct _SomeStruct" format to "typedef struct SomeStruct_" to make the Doxygen output more useful.
...
Remove the Trie multi pattern matcher code. It wasn't used anymore.
17 years ago
Victor Julien
516ca7ead5
Fix IPv4 and IPv6 decoders not being able to deal with ethernet packets with trailing bytes.
17 years ago
Victor Julien
bab4b62376
Initial add of the files.
17 years ago