suricata
app-layer-events.c File Reference
#include "suricata-common.h"
#include "decode.h"
#include "flow.h"
#include "app-layer-events.h"
#include "app-layer-parser.h"
#include "util-enum.h"
Include dependency graph for app-layer-events.c:

Go to the source code of this file.

Macros

#define DECODER_EVENTS_BUFFER_STEPS   8
 

Functions

int AppLayerGetPktEventInfo (const char *event_name, int *event_id)
 
void AppLayerDecoderEventsSetEventRaw (AppLayerDecoderEvents **sevents, uint8_t event)
 Set an app layer decoder event. More...
 
void AppLayerDecoderEventsSetEvent (Flow *f, uint8_t event)
 Set an app layer decoder event. More...
 
void AppLayerDecoderEventsResetEvents (AppLayerDecoderEvents *events)
 
void AppLayerDecoderEventsFreeEvents (AppLayerDecoderEvents **events)
 

Variables

SCEnumCharMap app_layer_event_pkt_table []
 

Detailed Description

Macro Definition Documentation

#define DECODER_EVENTS_BUFFER_STEPS   8

Definition at line 64 of file app-layer-events.c.

Referenced by AppLayerDecoderEventsSetEventRaw().

Function Documentation

void AppLayerDecoderEventsFreeEvents ( AppLayerDecoderEvents **  events)

Definition at line 132 of file app-layer-events.c.

References SCFree.

Referenced by AppLayerParserStateFree(), DetectEngineThreadCtxInit(), main(), SMTPStateAlloc(), and SSLVersionToString().

Here is the caller graph for this function:

void AppLayerDecoderEventsResetEvents ( AppLayerDecoderEvents events)

Definition at line 125 of file app-layer-events.c.

References AppLayerDecoderEvents_::cnt.

void AppLayerDecoderEventsSetEvent ( Flow f,
uint8_t  event 
)

Set an app layer decoder event.

Parameters
fPointer to a flow containing DecoderEvents pointer head. If the head points to a DecoderEvents instance, a new instance would be created and the pointer head would would be updated with this new instance
eventThe event to be stored.

Definition at line 116 of file app-layer-events.c.

References Flow_::alparser, AppLayerDecoderEventsSetEventRaw(), AppLayerParserGetDecoderEvents(), AppLayerParserSetDecoderEvents(), and ENIPState_::events.

Here is the call graph for this function:

void AppLayerDecoderEventsSetEventRaw ( AppLayerDecoderEvents **  sevents,
uint8_t  event 
)

Set an app layer decoder event.

Parameters
seventsPointer to a AppLayerDecoderEvents pointer. If *sevents is NULL memory will be allocated.
eventThe event to be stored.

Definition at line 73 of file app-layer-events.c.

References DECODER_EVENTS_BUFFER_STEPS, SCMalloc, and SCRealloc.

Referenced by AppLayerDecoderEventsSetEvent(), AppLayerHandleTCPData(), AppLayerIncTxCounter(), DetectEngineSetEvent(), main(), SSLSetEvent(), and StreamTcpReassembleHandleSegmentHandleData().

Here is the caller graph for this function:

int AppLayerGetPktEventInfo ( const char *  event_name,
int *  event_id 
)

Definition at line 51 of file app-layer-events.c.

References SC_ERR_INVALID_ENUM_MAP, SCLogError, and SCMapEnumNameToValue().

Referenced by DetectAppLayerEventRegister().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

SCEnumCharMap app_layer_event_pkt_table[]
Initial value:
= {
{ "APPLAYER_MISMATCH_PROTOCOL_BOTH_DIRECTIONS",
{ "APPLAYER_WRONG_DIRECTION_FIRST_DATA",
{ "APPLAYER_DETECT_PROTOCOL_ONLY_ONE_DIRECTION",
{ "APPLAYER_PROTO_DETECTION_SKIPPED",
{ "APPLAYER_NO_TLS_AFTER_STARTTLS",
{ "APPLAYER_UNEXPECTED_PROTOCOL",
{ NULL,
-1 },
}

Definition at line 34 of file app-layer-events.c.