suricata
app-layer-events.h File Reference
#include "decode.h"
Include dependency graph for app-layer-events.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  AppLayerDecoderEvents_
 Data structure to store app layer decoder events. More...
 

Typedefs

typedef enum AppLayerEventType_ AppLayerEventType
 

Enumerations

enum  {
  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
}
 
enum  AppLayerEventType_ { APP_LAYER_EVENT_TYPE_TRANSACTION = 1, APP_LAYER_EVENT_TYPE_PACKET }
 

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)
 

Detailed Description

Typedef Documentation

Enumeration Type Documentation

anonymous enum
Enumerator
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 

Definition at line 44 of file app-layer-events.h.

Enumerator
APP_LAYER_EVENT_TYPE_TRANSACTION 
APP_LAYER_EVENT_TYPE_PACKET 

Definition at line 54 of file app-layer-events.h.

Function Documentation

void AppLayerDecoderEventsFreeEvents ( AppLayerDecoderEvents **  events)

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

void AppLayerDecoderEventsResetEvents ( AppLayerDecoderEvents events)

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

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: