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)
98 *sevents = new_devents;
101 if ((*sevents)->cnt == UCHAR_MAX) {
105 if ((*sevents)->cnt == (*sevents)->events_buffer_size) {
107 if (UCHAR_MAX - (*sevents)->cnt < steps)
108 steps = UCHAR_MAX - (*sevents)->cnt < steps;
110 void *ptr =
SCRealloc((*sevents)->events,
111 ((*sevents)->cnt + steps) *
sizeof(uint8_t));
117 (*sevents)->events = ptr;
118 (*sevents)->events_buffer_size += steps;
121 (*sevents)->events[(*sevents)->cnt++] = event;
126 if (events != NULL) {
135 if (events && *events != NULL) {
136 if ((*events)->events != NULL)
137 SCFree((*events)->events);
167 if (*event_id == -1) {
169 "det_ctx's enum map table.",
174 *event_type = APP_LAYER_EVENT_TYPE_TRANSACTION;
@ DETECT_EVENT_TOO_MANY_BUFFERS
@ APPLAYER_UNEXPECTED_PROTOCOL
@ FILE_DECODER_EVENT_LZMA_UNKNOWN_ERROR
SCEnumCharMap det_ctx_event_table[]
@ FILE_DECODER_EVENT_LZMA_DECODER_ERROR
uint8_t event_last_logged
@ FILE_DECODER_EVENT_Z_UNKNOWN_ERROR
void AppLayerDecoderEventsFreeEvents(AppLayerDecoderEvents **events)
@ APPLAYER_PROTO_DETECTION_SKIPPED
@ FILE_DECODER_EVENT_LZMA_XZ_ERROR
void AppLayerDecoderEventsResetEvents(AppLayerDecoderEvents *events)
Data structure to store app layer decoder events.
@ APPLAYER_NO_TLS_AFTER_STARTTLS
@ APPLAYER_MISMATCH_PROTOCOL_BOTH_DIRECTIONS
int AppLayerGetEventInfoById(int event_id, const char **event_name, AppLayerEventType *event_type)
@ FILE_DECODER_EVENT_Z_STREAM_ERROR
@ FILE_DECODER_EVENT_INVALID_SWF_LENGTH
@ FILE_DECODER_EVENT_LZMA_IO_ERROR
@ FILE_DECODER_EVENT_Z_BUF_ERROR
#define SCRealloc(ptr, sz)
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
@ APPLAYER_DETECT_PROTOCOL_ONLY_ONE_DIRECTION
@ FILE_DECODER_EVENT_NO_MEM
int DetectEngineGetEventInfo(const char *event_name, int *event_id, AppLayerEventType *event_type)
#define SCLogError(...)
Macro used to log ERROR messages.
@ FILE_DECODER_EVENT_Z_DATA_ERROR
int AppLayerGetPktEventInfo(const char *event_name, int *event_id)
@ FILE_DECODER_EVENT_INVALID_SWF_VERSION
@ APPLAYER_WRONG_DIRECTION_FIRST_DATA
@ FILE_DECODER_EVENT_LZMA_HEADER_TOO_SHORT_ERROR
@ FILE_DECODER_EVENT_LZMA_MEMLIMIT_ERROR