Go to the documentation of this file.
19 #define PROTO_DETECT_MAX_LEN 1024
53 f =
TestHelperBuildFlow(AF_INET,
"1.2.3.4",
"5.6.7.8", (uint16_t)((data[2] << 8) | data[3]),
54 (uint16_t)((data[4] << 8) | data[5]));
63 uint8_t
flags = STREAM_TOCLIENT;
64 if (data[0] & STREAM_TOSERVER) {
65 flags = STREAM_TOSERVER;
#define SC_ATOMIC_SET(name, val)
Set the value for the atomic variable.
void SCRunmodeSet(int run_mode)
Set the current run mode.
int AppLayerSetup(void)
Setup the app layer.
The app layer protocol detection thread context.
void EngineModeSetIDS(void)
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
AppLayerProtoDetectThreadCtx * alpd_tctx
int ConfYamlLoadString(const char *string, size_t len)
Load configuration from a YAML string.
uint8_t FlowGetProtoMapping(uint8_t proto)
Function to map the protocol to the defined FLOW_PROTO_* enumeration.
void FlowFree(Flow *f)
cleanup & free the memory of a flow
SC_ATOMIC_EXTERN(unsigned int, engine_stage)
const char * configNoChecksum
AppProto AppLayerProtoDetectGetProto(AppLayerProtoDetectThreadCtx *tctx, Flow *f, const uint8_t *buf, uint32_t buflen, uint8_t ipproto, uint8_t flags, bool *reverse_flow)
Returns the app layer protocol given a buffer.
AppLayerProtoDetectThreadCtx * AppLayerProtoDetectGetCtxThread(void)
Inits and returns an app layer protocol detection thread context.
Flow * TestHelperBuildFlow(int family, const char *src, const char *dst, Port sp, Port dp)
int InitGlobal(void)
Global initialization common to all runmodes.