Go to the documentation of this file.
35 {
"APPLAYER_MISMATCH_PROTOCOL_BOTH_DIRECTIONS",
37 {
"APPLAYER_WRONG_DIRECTION_FIRST_DATA",
39 {
"APPLAYER_DETECT_PROTOCOL_ONLY_ONE_DIRECTION",
41 {
"APPLAYER_PROTO_DETECTION_SKIPPED",
43 {
"APPLAYER_NO_TLS_AFTER_STARTTLS",
45 {
"APPLAYER_UNEXPECTED_PROTOCOL",
52 AppLayerEventType *event_type)
55 if (*event_name == NULL) {
57 "app-layer-event's enum map table.",
63 *event_type = APP_LAYER_EVENT_TYPE_PACKET;
71 if (*event_id == -1) {
73 "app-layer-event's packet event table.",
82 #define DECODER_EVENTS_BUFFER_STEPS 8
93 if (*sevents == NULL) {
95 if (new_devents == NULL)
99 *sevents = new_devents;
102 if ((*sevents)->cnt == UCHAR_MAX) {
106 if ((*sevents)->cnt == (*sevents)->events_buffer_size) {
108 if (UCHAR_MAX - (*sevents)->cnt < steps)
109 steps = UCHAR_MAX - (*sevents)->cnt < steps;
111 void *ptr =
SCRealloc((*sevents)->events,
112 ((*sevents)->cnt + steps) *
sizeof(uint8_t));
118 (*sevents)->events = ptr;
119 (*sevents)->events_buffer_size += steps;
122 (*sevents)->events[(*sevents)->cnt++] = event;
127 if (events != NULL) {
136 if (events && *events != NULL) {
137 if ((*events)->events != NULL)
138 SCFree((*events)->events);
168 if (*event_id == -1) {
170 "det_ctx's enum map table.",
175 *event_type = APP_LAYER_EVENT_TYPE_TRANSACTION;
@ APPLAYER_MISMATCH_PROTOCOL_BOTH_DIRECTIONS
SCEnumCharMap det_ctx_event_table[]
@ DETECT_EVENT_TOO_MANY_BUFFERS
@ APPLAYER_WRONG_DIRECTION_FIRST_DATA
uint8_t event_last_logged
void AppLayerDecoderEventsFreeEvents(AppLayerDecoderEvents **events)
void AppLayerDecoderEventsResetEvents(AppLayerDecoderEvents *events)
Data structure to store app layer decoder events.
@ FILE_DECODER_EVENT_LZMA_MEMLIMIT_ERROR
@ APPLAYER_DETECT_PROTOCOL_ONLY_ONE_DIRECTION
@ FILE_DECODER_EVENT_INVALID_SWF_LENGTH
@ APPLAYER_PROTO_DETECTION_SKIPPED
@ APPLAYER_NO_TLS_AFTER_STARTTLS
int AppLayerGetEventInfoById(int event_id, const char **event_name, AppLayerEventType *event_type)
@ FILE_DECODER_EVENT_Z_BUF_ERROR
#define SCRealloc(ptr, sz)
@ FILE_DECODER_EVENT_Z_DATA_ERROR
const char * SCMapEnumValueToName(int enum_value, SCEnumCharMap *table)
Maps an enum value to a string name, from the supplied table.
SCEnumCharMap app_layer_event_pkt_table[]
int SCMapEnumNameToValue(const char *enum_name, SCEnumCharMap *table)
Maps a string name to an enum value from the supplied table. Please specify the last element of any m...
void AppLayerDecoderEventsSetEventRaw(AppLayerDecoderEvents **sevents, uint8_t event)
Set an app layer decoder event.
#define DECODER_EVENTS_BUFFER_STEPS
@ FILE_DECODER_EVENT_LZMA_UNKNOWN_ERROR
int DetectEngineGetEventInfo(const char *event_name, int *event_id, AppLayerEventType *event_type)
#define SCLogError(...)
Macro used to log ERROR messages.
@ FILE_DECODER_EVENT_Z_STREAM_ERROR
@ FILE_DECODER_EVENT_NO_MEM
@ FILE_DECODER_EVENT_LZMA_IO_ERROR
int AppLayerGetPktEventInfo(const char *event_name, int *event_id)
@ FILE_DECODER_EVENT_LZMA_XZ_ERROR
@ FILE_DECODER_EVENT_Z_UNKNOWN_ERROR
@ FILE_DECODER_EVENT_LZMA_HEADER_TOO_SHORT_ERROR
@ FILE_DECODER_EVENT_INVALID_SWF_VERSION
@ FILE_DECODER_EVENT_LZMA_DECODER_ERROR
@ APPLAYER_UNEXPECTED_PROTOCOL