Go to the documentation of this file.
35 static const char * IpProtoToString(
int ip_proto);
40 const char *ip_proto_str = NULL;
49 ip_proto_str = IpProtoToString(p->
ip_proto);
50 if (ip_proto_str == NULL)
53 SCLogDebug(
"%s %s protocol detection enabled.", ip_proto_str, p->
name);
63 SCLogDebug(
"Unittest mode, registering default configuration.");
74 if (enable_default != 0) {
75 SCLogDebug(
"No %s app-layer configuration, enabling %s"
76 " detection %s detection on port %s.",
83 SCLogDebug(
"No %s app-layer configuration for detection port (%s).",
84 p->
name, ip_proto_str);
95 const char *ip_proto_str = NULL;
103 ip_proto_str = IpProtoToString(p->
ip_proto);
104 if (ip_proto_str == NULL)
192 static const char * IpProtoToString(
int ip_proto)
int(* StateGetEventInfo)(const char *event_name, int *event_id, AppLayerEventType *event_type)
void AppLayerParserRegisterGetStateProgressFunc(uint8_t ipproto, AppProto alproto, int(*StateGetProgress)(void *alstate, uint8_t direction))
int AppLayerProtoDetectPPParseConfPorts(const char *ipproto_name, uint8_t ipproto, const char *alproto_name, AppProto alproto, uint16_t min_depth, uint16_t max_depth, ProbingParserFPtr ProbingParserTs, ProbingParserFPtr ProbingParserTc)
void AppLayerParserRegisterLocalStorageFunc(uint8_t ipproto, AppProto alproto, void *(*LocalStorageAlloc)(void), void(*LocalStorageFree)(void *))
void AppLayerParserRegisterOptionFlags(uint8_t ipproto, AppProto alproto, uint32_t flags)
const char * default_port
void AppLayerParserRegisterGetEventsFunc(uint8_t ipproto, AppProto alproto, AppLayerDecoderEvents *(*StateGetEvents)(void *))
void AppLayerParserRegisterTruncateFunc(uint8_t ipproto, AppProto alproto, void(*Truncate)(void *, uint8_t))
ProbingParserFPtr ProbeTS
void AppLayerParserRegisterStateProgressCompletionStatus(AppProto alproto, const int ts, const int tc)
void AppLayerParserRegisterTxFreeFunc(uint8_t ipproto, AppProto alproto, void(*StateTransactionFree)(void *, uint64_t))
void *(* LocalStorageAlloc)(void)
void AppLayerParserRegisterDetectStateFuncs(uint8_t ipproto, AppProto alproto, DetectEngineState *(*GetTxDetectState)(void *tx), int(*SetTxDetectState)(void *tx, DetectEngineState *))
void(* Truncate)(void *state, uint8_t direction)
void *(* StateAlloc)(void *, AppProto)
AppLayerParserFPtr ParseTS
void(* StateFree)(void *)
AppLayerTxData *(* GetTxData)(void *tx)
void AppLayerProtoDetectPPRegister(uint8_t ipproto, const char *portstr, AppProto alproto, uint16_t min_depth, uint16_t max_depth, uint8_t direction, ProbingParserFPtr ProbingParser1, ProbingParserFPtr ProbingParser2)
register parser at a port
int(* StateGetProgress)(void *alstate, uint8_t direction)
void(* StateTransactionFree)(void *, uint64_t)
AppProto StringToAppProto(const char *proto_name)
Maps a string to its ALPROTO_* equivalent.
void AppLayerParserRegisterGetFilesFunc(uint8_t ipproto, AppProto alproto, FileContainer *(*StateGetFiles)(void *, uint8_t))
ProbingParserFPtr ProbeTC
void AppLayerParserRegisterStateFuncs(uint8_t ipproto, AppProto alproto, void *(*StateAlloc)(void *, AppProto), void(*StateFree)(void *))
void(* LocalStorageFree)(void *)
int(* StateGetEventInfoById)(int event_id, const char **event_name, AppLayerEventType *event_type)
void AppLayerParserRegisterGetEventInfo(uint8_t ipproto, AppProto alproto, int(*StateGetEventInfo)(const char *event_name, int *event_id, AppLayerEventType *event_type))
void AppLayerProtoDetectRegisterProtocol(AppProto alproto, const char *alproto_name)
Registers a protocol for protocol detection phase.
int RunmodeIsUnittests(void)
int AppLayerParserRegisterParser(uint8_t ipproto, AppProto alproto, uint8_t direction, AppLayerParserFPtr Parser)
Register app layer parser for the protocol.
void AppLayerParserRegisterGetTx(uint8_t ipproto, AppProto alproto, void *(StateGetTx)(void *alstate, uint64_t tx_id))
DetectEngineState *(* GetTxDetectState)(void *tx)
AppLayerDecoderEvents *(* StateGetEvents)(void *)
void AppLayerParserRegisterApplyTxConfigFunc(uint8_t ipproto, AppProto alproto, bool(*ApplyTxConfig)(void *state, void *tx, int mode, AppLayerTxConfig))
AppLayerParserFPtr ParseTC
#define FatalError(x,...)
void AppLayerParserRegisterTxDataFunc(uint8_t ipproto, AppProto alproto, AppLayerTxData *(*GetTxData)(void *tx))
FileContainer *(* StateGetFiles)(void *, uint8_t)
AppProto AppLayerRegisterProtocolDetection(const struct AppLayerParser *p, int enable_default)
App layer protocol detection function.
void AppLayerParserRegisterGetTxIterator(uint8_t ipproto, AppProto alproto, AppLayerGetTxIteratorFunc Func)
void AppLayerParserRegisterGetEventInfoById(uint8_t ipproto, AppProto alproto, int(*StateGetEventInfoById)(int event_id, const char **event_name, AppLayerEventType *event_type))
uint64_t(* StateGetTxCnt)(void *alstate)
int(* SetTxDetectState)(void *tx, DetectEngineState *)
int AppLayerRegisterParser(const struct AppLayerParser *p, AppProto alproto)
App layer protocol registration function.
void AppLayerParserRegisterGetTxCnt(uint8_t ipproto, AppProto alproto, uint64_t(*StateGetTxCnt)(void *alstate))
AppLayerGetTxIterTuple(* GetTxIterator)(const uint8_t ipproto, const AppProto alproto, void *alstate, uint64_t min_tx_id, uint64_t max_tx_id, AppLayerGetTxIterState *istate)
bool(* ApplyTxConfig)(void *state, void *tx, int mode, AppLayerTxConfig)
void *(* StateGetTx)(void *alstate, uint64_t tx_id)