suricata
stream.h File Reference
#include "flow.h"
Include dependency graph for stream.h:

Go to the source code of this file.

Macros

#define STREAM_START   BIT_U8(0)
 
#define STREAM_EOF   BIT_U8(1)
 
#define STREAM_TOSERVER   BIT_U8(2)
 
#define STREAM_TOCLIENT   BIT_U8(3)
 
#define STREAM_GAP   BIT_U8(4)
 
#define STREAM_DEPTH   BIT_U8(5)
 
#define STREAM_MIDSTREAM   BIT_U8(6)
 
#define STREAM_FLUSH   BIT_U8(7)
 

Typedefs

typedef int(* StreamSegmentCallback) (const Packet *, void *, const uint8_t *, uint32_t)
 

Functions

int StreamSegmentForEach (const Packet *p, uint8_t flag, StreamSegmentCallback CallbackFunc, void *data)
 Run callback for all segments. More...
 

Detailed Description

Author
Victor Julien victo.nosp@m.r@in.nosp@m.linia.nosp@m.c.ne.nosp@m.t

Definition in file stream.h.

Macro Definition Documentation

#define STREAM_DEPTH   BIT_U8(5)

depth reached

Definition at line 34 of file stream.h.

Referenced by AppLayerParserParse(), FlowGetDisruptionFlags(), and StreamTcpReassembleHandleSegmentHandleData().

#define STREAM_FLUSH   BIT_U8(7)

Definition at line 36 of file stream.h.

Referenced by SigMatchSignaturesGetSgh().

#define STREAM_GAP   BIT_U8(4)

data gap encountered

Definition at line 33 of file stream.h.

Referenced by AppLayerHandleTCPData(), AppLayerParserParse(), FlowGetDisruptionFlags(), and StreamNeedsReassembly().

#define STREAM_MIDSTREAM   BIT_U8(6)

Definition at line 35 of file stream.h.

Referenced by StreamTcpReassembleHandleSegmentHandleData().

#define STREAM_TOCLIENT   BIT_U8(3)

Definition at line 32 of file stream.h.

Referenced by AppLayerHandleTCPData(), AppLayerHandleUdp(), AppLayerHtpPrintStats(), AppLayerIncTxCounter(), AppLayerParserParse(), AppLayerParserRegisterParserAcceptableDataDirection(), AppLayerParserStreamTruncated(), AppLayerParserTransactionsCleanup(), AppLayerProtoDetectPPParseConfPorts(), AppLayerProtoDetectReset(), AppLayerProtoDetectUnittestCtxRestore(), AppLayerRegisterParser(), DCERPCCleanup(), DetectBypassRegister(), DetectDceGetState(), DetectDceOpnumRegister(), DetectDceStubDataRegister(), DetectDNP3Register(), DetectDnsQueryRegister(), DetectEngineStateFree(), DetectEngineStateResetTxs(), DetectFileInspectGeneric(), DetectFilestorePostMatch(), DetectFtpdataRegister(), DetectHttpResponseLineRegister(), DetectLuaRegister(), DetectSignatureApplyActions(), DetectSshSoftwareVersionRegister(), DetectSshVersionRegister(), DetectSslStateRegister(), DetectSslVersionRegister(), DetectTemplateBufferRegister(), DetectTemplateRustBufferRegister(), DetectTlsFingerprintRegister(), DetectTlsIssuerRegister(), DetectTlsSerialRegister(), DetectTlsSubjectRegister(), DetectTlsValidityRegister(), DetectTlsVersionRegister(), DisableDetectFlowFileFlags(), DNSGetAlstateProgress(), FlowForceReassemblyNeedReassembly(), HtpConfigRestoreBackup(), HTPFileClose(), HTPFileOpen(), HTPFileStoreChunk(), HTPFreeConfig(), OutputRegisterFiledataLogger(), OutputRegisterFileLogger(), OutputRegisterTxLogger(), RegisterDCERPCParsers(), RegisterDCERPCUDPParsers(), RegisterDNP3Parsers(), RegisterDNSTCPParsers(), RegisterDNSUDPParsers(), RegisterENIPTCPParsers(), RegisterENIPUDPParsers(), RegisterFTPParsers(), RegisterHTPParsers(), RegisterModbusParsers(), RegisterNFSTCPParsers(), RegisterNFSUDPParsers(), RegisterSMB2Parsers(), RegisterSMBParsers(), RegisterSMTPParsers(), RegisterSSHParsers(), RegisterSSLParsers(), RegisterTemplateParsers(), RegisterTFTPParsers(), SigMatchSignaturesGetSgh(), SMTPParserCleanup(), SMTPStateAlloc(), SSLVersionToString(), StreamTcpPruneSession(), and StreamTcpReassembleHandleSegmentHandleData().

#define STREAM_TOSERVER   BIT_U8(2)

Definition at line 31 of file stream.h.

Referenced by AppLayerHandleTCPData(), AppLayerHandleUdp(), AppLayerHtpPrintStats(), AppLayerIncTxCounter(), AppLayerParserGetTransactionActive(), AppLayerParserGetTransactionInspectId(), AppLayerParserParse(), AppLayerParserRegisterParser(), AppLayerParserRegisterParserAcceptableDataDirection(), AppLayerParserRegisterProtocolParsers(), AppLayerParserRestoreParserTable(), AppLayerParserSetTransactionInspectId(), AppLayerParserStreamTruncated(), AppLayerParserTransactionsCleanup(), AppLayerRegisterParser(), AppLayerRegisterProtocolDetection(), DCERPCCleanup(), DetectBypassRegister(), DetectDceGetState(), DetectDceOpnumRegister(), DetectDNP3Register(), DetectDnsQueryRegister(), DetectEngineInspectENIP(), DetectEngineInspectModbus(), DetectEngineInspectStream(), DetectEngineStateFree(), DetectEngineStateResetTxs(), DetectFileInspectGeneric(), DetectFilestorePostMatch(), DetectFtpbounceRegister(), DetectFtpdataRegister(), DetectHttpRawHeaderRegister(), DetectHttpRequestLineRegister(), DetectHttpResponseLineRegister(), DetectLuaRegister(), DetectPcrePayloadMatch(), DetectSignatureApplyActions(), DetectSshSoftwareVersionRegister(), DetectSshVersionRegister(), DetectSslStateRegister(), DetectSslVersionRegister(), DetectTemplateBufferRegister(), DetectTemplateRustBufferRegister(), DetectTlsFingerprintRegister(), DetectTlsIssuerRegister(), DetectTlsJa3HashRegister(), DetectTlsJa3StringRegister(), DetectTlsRegister(), DetectTlsSerialRegister(), DetectTlsSniRegister(), DetectTlsSubjectRegister(), DetectTlsValidityRegister(), DetectTlsVersionRegister(), DetectUricontentRegister(), DetectUrilenValidateContent(), DisableDetectFlowFileFlags(), DNSGetTxDetectFlags(), DNSSetTxDetectFlags(), FileDisableFilesize(), FileDisableMagic(), FileDisableMd5(), FileDisableSha1(), FileDisableSha256(), FileDisableStoring(), FileFlowToFlags(), FlowForceReassemblyNeedReassembly(), FlowGetDisruptionFlags(), FTPAtExitPrintStats(), HtpBodyPrune(), HtpConfigRestoreBackup(), HTPFileClose(), HTPFileOpen(), HTPFreeConfig(), OutputRegisterFiledataLogger(), OutputRegisterFileLogger(), OutputRegisterTxLogger(), RegisterDCERPCParsers(), RegisterDCERPCUDPParsers(), RegisterDNP3Parsers(), RegisterDNSTCPParsers(), RegisterDNSUDPParsers(), RegisterENIPTCPParsers(), RegisterENIPUDPParsers(), RegisterFTPParsers(), RegisterHTPParsers(), RegisterModbusParsers(), RegisterNFSTCPParsers(), RegisterNFSUDPParsers(), RegisterSMB2Parsers(), RegisterSMBParsers(), RegisterSMTPParsers(), RegisterSSHParsers(), RegisterSSLParsers(), RegisterTemplateParsers(), RegisterTFTPParsers(), SigMatchSignaturesGetSgh(), SMTPParserCleanup(), SMTPProcessDataChunk(), SMTPStateAlloc(), SSLSetEvent(), SSLVersionToString(), StreamNeedsReassembly(), StreamTcpPruneSession(), StreamTcpReassembleHandleSegmentHandleData(), StreamTcpReassembleTriggerRawReassembly(), and StreamTcpReassemblySetMinInspectDepth().

Typedef Documentation

typedef int(* StreamSegmentCallback) (const Packet *, void *, const uint8_t *, uint32_t)

Definition at line 38 of file stream.h.

Function Documentation

int StreamSegmentForEach ( const Packet p,
uint8_t  flag,
StreamSegmentCallback  CallbackFunc,
void *  data 
)

Run callback for all segments.

Must be called under flow lock.

Returns
-1 in case of error, the number of segment in case of success

Definition at line 39 of file stream.c.

References Packet_::proto, SC_ERR_UNKNOWN_PROTOCOL, SCLogWarning, and StreamTcpSegmentForEach().

Here is the call graph for this function: