27#ifndef SURICATA_APP_LAYER_H
28#define SURICATA_APP_LAYER_H
40#define APP_LAYER_DATA_ALREADY_SENT_TO_APP_LAYER \
41 (~STREAM_TOSERVER & ~STREAM_TOCLIENT)
127#define AppLayerProfilingReset(app_tctx) AppLayerProfilingResetInternal(app_tctx)
128#define AppLayerProfilingStore(app_tctx, p) AppLayerProfilingStoreInternal(app_tctx, p)
130#define AppLayerProfilingReset(app_tctx)
131#define AppLayerProfilingStore(app_tctx, p)
148static inline const uint8_t *StreamSliceGetData(
const StreamSlice *stream_slice)
150 return stream_slice->input;
153static inline uint32_t StreamSliceGetDataLen(
const StreamSlice *stream_slice)
155 return stream_slice->input_len;
struct StreamSlice StreamSlice
void AppLayerProfilingStoreInternal(AppLayerThreadCtx *app_tctx, Packet *p)
AppProto AppLayerGetProtoByName(const char *alproto_name)
Given a protocol string, returns the corresponding internal protocol id.
void AppLayerListSupportedProtocols(void)
void AppLayerIncInternalErrorCounter(ThreadVars *tv, Flow *f)
int AppLayerSetup(void)
Setup the app layer.
void AppLayerRegisterGlobalCounters(void)
HACK to work around our broken unix manager (re)init loop.
void AppLayerDestroyCtxThread(AppLayerThreadCtx *tctx)
Destroys the context created by AppLayerGetCtxThread().
void AppLayerRegisterThreadCounters(ThreadVars *tv)
Registers per flow counters for all protocols.
void AppLayerIncAllocErrorCounter(ThreadVars *tv, Flow *f)
const char * AppLayerGetProtoName(AppProto alproto)
Given the internal protocol id, returns a string representation of the protocol.
void AppLayerIncGapErrorCounter(ThreadVars *tv, Flow *f)
void AppLayerIncParserErrorCounter(ThreadVars *tv, Flow *f)
void AppLayerIncTxCounter(ThreadVars *tv, Flow *f, uint64_t step)
int AppLayerHandleTCPData(ThreadVars *tv, TcpReassemblyThreadCtx *ra_ctx, Packet *p, Flow *f, TcpSession *ssn, TcpStream **stream, uint8_t *data, uint32_t data_len, uint8_t flags, enum StreamUpdateDir dir)
Handles reassembled tcp stream.
int AppLayerDeSetup(void)
De initializes the app layer.
void AppLayerUnittestsRegister(void)
AppLayerThreadCtx * AppLayerGetCtxThread(void)
Creates a new app layer thread context.
void AppLayerProfilingResetInternal(AppLayerThreadCtx *app_tctx)
int AppLayerHandleUdp(ThreadVars *tv, AppLayerThreadCtx *app_tctx, Packet *p, Flow *f)
Handles an udp chunk.
This is for the app layer in general and it contains per thread context relevant to both the alpd and...
Per thread variable structure.