]> git.ipfire.org Git - thirdparty/suricata.git/commit
decode: update API to return error
authorEric Leblond <eric@regit.org>
Wed, 27 Nov 2013 17:53:52 +0000 (18:53 +0100)
committerEric Leblond <eric@regit.org>
Thu, 28 Nov 2013 16:38:11 +0000 (17:38 +0100)
commitd4b7ecfbe3f33ce1ea502000b6103e99267c0a28
tree687b6ea98cf7428af7c0af5eb231419c4fecf263
parent0b0e9340dcd23c22009c94cbbedcf46270e5d135
decode: update API to return error

In some cases, the decoding is not possible and some really invalid
packet can be created. This is in particular the case of tunnel. In
that case, it is more interesting to forget about the tunneled
packet and only consider the original packet.

DecodeTunnel function is maked as warn_unused_result because it is
meaningful for the decoder to know if the underlying data were not
correct. And in this case, only focus detection on the content.
18 files changed:
src/decode-ethernet.c
src/decode-gre.c
src/decode-icmpv4.c
src/decode-icmpv6.c
src/decode-ipv4.c
src/decode-ipv6.c
src/decode-ppp.c
src/decode-pppoe.c
src/decode-raw.c
src/decode-sctp.c
src/decode-sll.c
src/decode-tcp.c
src/decode-teredo.c
src/decode-udp.c
src/decode-vlan.c
src/decode.c
src/decode.h
src/source-pcap-file.c