#include <string.h>
#include <stdlib.h>
#include "decode.h"
#include "snort.h"
#include "debug.h"
#include "util.h"
#include "detect.h"
#include "checksum.h"
#include "log.h"
#include "generators.h"
#include "event_queue.h"
#include "inline.h"
Go to the source code of this file.
|
Definition at line 3051 of file decode.c. References _Packet::ah, _PacketCount::arp, DEBUG_DECODE, DEBUG_WRAP, _DecoderFlags::decode_alerts, DECODE_ARP_TRUNCATED, DECODE_ARP_TRUNCATED_STR, DECODE_CLASS, _progvars::decoder_flags, _PacketCount::discards, _DecoderFlags::drop_alerts, ErrorMessage(), GENERATOR_SNORT_DECODE, InlineDrop(), InlineMode(), MODE_IDS, pc, pv, runMode, SnortEventqAdd(), and _progvars::verbose_flag. Referenced by DecodeEthPkt(), DecodeIEEE80211Pkt(), and DecodeVlan(). |
|
Definition at line 1872 of file decode.c. References bzero, CHDLC_ADDR_MULTICAST, CHDLC_ADDR_UNICAST, CHDLC_HEADER_LEN, DEBUG_DECODE, DEBUG_WRAP, DecodeIP(), ErrorMessage(), ETHERNET_TYPE_IP, _PacketCount::other, pc, pv, and _progvars::verbose_flag. Referenced by DecodePppSerialPkt(), and SetPktProcessor(). |
|
Definition at line 3173 of file decode.c. References _EAPHdr::code, DEBUG_DECODE, DEBUG_WRAP, _DecoderFlags::decode_alerts, DECODE_CLASS, DECODE_EAP_TRUNCATED, DECODE_EAP_TRUNCATED_STR, _progvars::decoder_flags, _PacketCount::discards, _DecoderFlags::drop_alerts, EAP_CODE_REQUEST, EAP_CODE_RESPONSE, _Packet::eaph, _Packet::eaptype, GENERATOR_SNORT_DECODE, InlineDrop(), InlineMode(), MODE_IDS, pc, pv, runMode, SnortEventqAdd(), and _progvars::verbose_flag. Referenced by DecodeEapol(). |
|
Definition at line 3091 of file decode.c. References DEBUG_DECODE, DEBUG_WRAP, _DecoderFlags::decode_alerts, DECODE_CLASS, DECODE_EAPOL_TRUNCATED, DECODE_EAPOL_TRUNCATED_STR, DecodeEAP(), DecodeEapolKey(), _progvars::decoder_flags, _PacketCount::discards, _DecoderFlags::drop_alerts, _PacketCount::eapol, EAPOL_TYPE_EAP, EAPOL_TYPE_KEY, _EtherEapol::eaptype, _Packet::eplh, ErrorMessage(), GENERATOR_SNORT_DECODE, InlineDrop(), InlineMode(), MODE_IDS, pc, pv, runMode, SnortEventqAdd(), and _progvars::verbose_flag. Referenced by DecodeIEEE80211Pkt(). |
|
Definition at line 3135 of file decode.c. References DEBUG_DECODE, DEBUG_WRAP, _DecoderFlags::decode_alerts, DECODE_CLASS, DECODE_EAPKEY_TRUNCATED, DECODE_EAPKEY_TRUNCATED_STR, _progvars::decoder_flags, _PacketCount::discards, _DecoderFlags::drop_alerts, _Packet::eapolk, GENERATOR_SNORT_DECODE, InlineDrop(), InlineMode(), MODE_IDS, pc, pv, runMode, SnortEventqAdd(), and _progvars::verbose_flag. Referenced by DecodeEapol(). |
|
Definition at line 3232 of file decode.c. References DEBUG_DECODE, DEBUG_WRAP, _PacketCount::ethloopback, and pc. Referenced by DecodeEthPkt(). |
|
Definition at line 60 of file decode.c. References bzero, pcap_pkthdr::caplen, DEBUG_DECODE, DEBUG_WRAP, DecodeARP(), DecodeEthLoopback(), DecodeIP(), DecodeIPV6(), DecodeIPX(), DecodePPPoEPkt(), DecodeVlan(), ErrorMessage(), ETHERNET_HEADER_LEN, ETHERNET_TYPE_8021Q, ETHERNET_TYPE_ARP, ETHERNET_TYPE_IP, ETHERNET_TYPE_IPV6, ETHERNET_TYPE_IPX, ETHERNET_TYPE_LOOP, ETHERNET_TYPE_PPPoE_DISC, ETHERNET_TYPE_PPPoE_SESS, ETHERNET_TYPE_REVARP, pcap_pkthdr::len, _PacketCount::other, pc, pv, snaplen, and _progvars::verbose_flag. Referenced by SetPktProcessor(). |
|
Definition at line 836 of file decode.c. References _PacketCount::arp, bzero, pcap_pkthdr::caplen, DEBUG_DECODE, DEBUG_WRAP, DecodeIP(), DecodeVlan(), ErrorMessage(), ETHERNET_TYPE_8021Q, ETHERNET_TYPE_ARP, ETHERNET_TYPE_IP, ETHERNET_TYPE_REVARP, FDDI_DSAP_IP, FDDI_DSAP_SNA, FDDI_SSAP_IP, FDDI_SSAP_SNA, pcap_pkthdr::len, _PacketCount::other, pc, pv, snaplen, and _progvars::verbose_flag. Referenced by SetPktProcessor(). |
|
Definition at line 1837 of file decode.c. References bzero, DEBUG_DECODE, DEBUG_WRAP, DecodeIP(), _PacketCount::other, and pc. Referenced by SetPktProcessor(). |
|
Definition at line 1800 of file decode.c. References bzero, DEBUG_DECODE, DEBUG_WRAP, DecodeIP(), _PacketCount::other, and pc. Referenced by SetPktProcessor(). |
|
|
|
|
Definition at line 2277 of file decode.c. References _Packet::data, DEBUG_DECODE, DEBUG_WRAP, _Packet::df, _Packet::dsize, ErrorMessage(), _Packet::frag_flag, _Packet::frag_offset, IP_HEADER_LEN, IP_HLEN, _IPHdr::ip_len, _IPHdr::ip_off, _Packet::ip_option_count, _IPHdr::ip_proto, IP_VER, _Packet::mf, NULL, _Packet::orig_dp, _Packet::orig_icmph, _Packet::orig_iph, _Packet::orig_sp, _Packet::orig_tcph, _Packet::orig_udph, pv, _Packet::rf, _TCPHdr::th_dport, _TCPHdr::th_sport, _UDPHdr::uh_dport, _UDPHdr::uh_sport, and _progvars::verbose_flag. Referenced by DecodeICMP(). |
|
|
Definition at line 3214 of file decode.c. References DEBUG_DECODE, DEBUG_WRAP, _PacketCount::ipv6, and pc. Referenced by DecodeEthPkt(), DecodeOldPflog(), and DecodePflog(). |
|
Definition at line 3251 of file decode.c. References DEBUG_DECODE, DEBUG_WRAP, _PacketCount::ipx, and pc. Referenced by DecodeEthPkt(), and DecodePppPktEncapsulated(). |
|
Definition at line 576 of file decode.c. References bzero, pcap_pkthdr::caplen, DEBUG_DECODE, DEBUG_WRAP, DecodeIP(), ErrorMessage(), pcap_pkthdr::len, NULL_HDRLEN, pv, and _progvars::verbose_flag. Referenced by SetPktProcessor(). |
|
Definition at line 1098 of file decode.c. References bzero, pcap_pkthdr::caplen, DEBUG_DECODE, DEBUG_WRAP, DecodeIP(), DecodeIPV6(), ErrorMessage(), pcap_pkthdr::len, OLDPFLOG_HDRLEN, _PacketCount::other, pc, pv, snaplen, and _progvars::verbose_flag. Referenced by SetPktProcessor(). |
|
Definition at line 1171 of file decode.c. References bzero, pcap_pkthdr::caplen, DEBUG_DECODE, DEBUG_WRAP, DecodeIP(), DecodeIPV6(), ErrorMessage(), pcap_pkthdr::len, _PacketCount::other, pc, PFLOG_HDRLEN, pv, snaplen, and _progvars::verbose_flag. Referenced by SetPktProcessor(). |
|
|
Definition at line 1638 of file decode.c. References bzero, CHDLC_ADDR_BROADCAST, CHDLC_CTRL_UNNUMBERED, DEBUG_DECODE, DEBUG_WRAP, DecodePppPktEncapsulated(), ErrorMessage(), pv, and _progvars::verbose_flag. Referenced by SetPktProcessor(). |
|
Definition at line 1552 of file decode.c. References DEBUG_DECODE, DEBUG_WRAP, DecodeIP(), DecodeIPX(), ErrorMessage(), IP_HEADER_LEN, PPP_IP, PPP_IPX, PPP_VJ_COMP, PPP_VJ_UCOMP, pv, and _progvars::verbose_flag. Referenced by DecodePPPoEPkt(), DecodePppPkt(), and DecodePppSerialPkt(). |
|
Definition at line 1686 of file decode.c. References bzero, CHDLC_ADDR_BROADCAST, CHDLC_CTRL_UNNUMBERED, DEBUG_DECODE, DEBUG_WRAP, DecodeChdlcPkt(), DecodePppPktEncapsulated(), ErrorMessage(), PPP_HDRLEN, pv, and _progvars::verbose_flag. Referenced by SetPktProcessor(). |
|
Definition at line 1770 of file decode.c. References bzero, DEBUG_DECODE, DEBUG_WRAP, and DecodeIP(). Referenced by SetPktProcessor(). |
|
Definition at line 1728 of file decode.c. References bzero, pcap_pkthdr::caplen, DEBUG_DECODE, DEBUG_WRAP, DecodeIP(), ErrorMessage(), pcap_pkthdr::len, and SLIP_HEADER_LEN. Referenced by SetPktProcessor(). |
|
|
|
|
|
|
Setup all the flags for the decoder alerts Definition at line 3702 of file decode.c. References _DecoderFlags::decode_alerts, _progvars::decoder_flags, _DecoderFlags::drop_alerts, _DecoderFlags::drop_ipopt_decode, _DecoderFlags::drop_tcpopt_decode, _DecoderFlags::drop_tcpopt_experiment, _DecoderFlags::drop_tcpopt_obsolete, _DecoderFlags::drop_tcpopt_ttcp, _DecoderFlags::ipopt_decode, pv, _DecoderFlags::tcpopt_decode, _DecoderFlags::tcpopt_experiment, _DecoderFlags::tcpopt_obsolete, and _DecoderFlags::tcpopt_ttcp. Referenced by SnortMain(). |
|
Definition at line 1909 of file decode.c. References DEBUG_DECODE, DEBUG_WRAP, _DecoderFlags::decode_alerts, DECODE_BAD_TRAFFIC_LOOPBACK, DECODE_BAD_TRAFFIC_LOOPBACK_STR, DECODE_BAD_TRAFFIC_SAME_SRCDST, DECODE_BAD_TRAFFIC_SAME_SRCDST_STR, DECODE_CLASS, _progvars::decoder_flags, _DecoderFlags::drop_alerts, GENERATOR_SNORT_DECODE, InlineDrop(), InlineMode(), _IPHdr::ip_dst, _IPHdr::ip_src, MODE_IDS, pv, runMode, and SnortEventqAdd(). Referenced by DecodeIP(). |
|
Validate that the length is an expected length AND that it's in bounds EOL and NOP are handled separately
Definition at line 3274 of file decode.c. References _Options::data, _Options::len, NULL, TCP_OPT_BADLEN, and TCP_OPT_TRUNC. Referenced by DecodeIPOptions(), and DecodeTCPOptions(). |
|
Definition at line 45 of file decode.c. Referenced by ByteJump(), ByteTest(), CheckANDPatternMatch(), CheckORPatternMatch(), fpEvalHeaderSW(), FTPBounce(), IsDataAt(), NormalizeTelnet(), and SnortPcre(). |
|
Definition at line 44 of file decode.c. Referenced by fpEvalHeaderSW(), SnortHttpInspect(), and SnortPcre(). |