Go to the documentation of this file.
23 #ifndef __APP_LAYER_H__
24 #define __APP_LAYER_H__
36 #define APP_LAYER_DATA_ALREADY_SENT_TO_APP_LAYER \
37 (~STREAM_TOSERVER & ~STREAM_TOCLIENT)
47 uint8_t *data, uint32_t data_len,
152 static inline uint8_t StreamSliceGetFlags(
const StreamSlice *stream_slice)
154 return stream_slice->flags;
157 static inline const uint8_t *StreamSliceGetData(
const StreamSlice *stream_slice)
159 return stream_slice->input;
162 static inline uint32_t StreamSliceGetDataLen(
const StreamSlice *stream_slice)
164 return stream_slice->input_len;
167 static inline bool StreamSliceIsGap(
const StreamSlice *stream_slice)
169 return stream_slice->input == NULL && stream_slice->input_len > 0;
172 static inline uint32_t StreamSliceGetGapSize(
const StreamSlice *stream_slice)
174 return StreamSliceGetDataLen(stream_slice);
void AppLayerProfilingStoreInternal(AppLayerThreadCtx *app_tctx, Packet *p)
void AppLayerIncParserErrorCounter(ThreadVars *tv, Flow *f)
AppLayerThreadCtx * AppLayerGetCtxThread(ThreadVars *tv)
Creates a new app layer thread context.
void AppLayerRegisterGlobalCounters(void)
HACK to work around our broken unix manager (re)init loop.
const char * AppLayerGetProtoName(AppProto alproto)
Given the internal protocol id, returns a string representation of the protocol.
void AppLayerIncAllocErrorCounter(ThreadVars *tv, Flow *f)
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)
Handles reassembled tcp stream.
int AppLayerDeSetup(void)
De initializes the app layer.
This is for the app layer in general and it contains per thread context relevant to both the alpd and...
Per thread variable structure.
void AppLayerIncGapErrorCounter(ThreadVars *tv, Flow *f)
int AppLayerSetup(void)
Setup the app layer.
void AppLayerRegisterThreadCounters(ThreadVars *tv)
Registers per flow counters for all protocols.
void AppLayerUnittestsRegister(void)
void AppLayerIncInternalErrorCounter(ThreadVars *tv, Flow *f)
void AppLayerListSupportedProtocols(void)
void AppLayerDestroyCtxThread(AppLayerThreadCtx *tctx)
Destroys the context created by AppLayeGetCtxThread().
AppProto AppLayerGetProtoByName(char *alproto_name)
Given a protocol string, returns the corresponding internal protocol id.
void AppLayerProfilingResetInternal(AppLayerThreadCtx *app_tctx)
int AppLayerHandleUdp(ThreadVars *tv, AppLayerThreadCtx *app_tctx, Packet *p, Flow *f)
Handles an udp chunk.
void AppLayerIncTxCounter(ThreadVars *tv, Flow *f, uint64_t step)