Go to the documentation of this file.
36 static const char * IpProtoToString(
int ip_proto);
41 const char *ip_proto_str = NULL;
44 FatalError(
"Call to %s with NULL pointer.", __FUNCTION__);
52 ip_proto_str = IpProtoToString(p->
ip_proto);
53 if (ip_proto_str == NULL)
54 FatalError(
"Unknown or unsupported ip_proto field in parser '%s'", p->
name);
56 SCLogDebug(
"%s %s protocol detection enabled.", ip_proto_str, p->
name);
67 SCLogDebug(
"Unittest mode, registering default configuration.");
78 if (enable_default != 0) {
79 SCLogDebug(
"No %s app-layer configuration, enabling %s"
80 " detection %s detection on port %s.",
87 SCLogDebug(
"No %s app-layer configuration for detection port (%s).",
88 p->
name, ip_proto_str);
99 const char *ip_proto_str = NULL;
102 FatalError(
"Call to %s with NULL pointer.", __FUNCTION__);
109 ip_proto_str = IpProtoToString(p->
ip_proto);
110 if (ip_proto_str == NULL)
111 FatalError(
"Unknown or unsupported ip_proto field in parser '%s'", p->
name);
201 static const char * IpProtoToString(
int ip_proto)
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
const char * AppProtoToString(AppProto alproto)
Maps the ALPROTO_*, to its string equivalent.
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 *(* 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)
AppLayerParserGetFrameNameByIdFn GetFrameNameById
void(* StateTransactionFree)(void *, uint64_t)
AppProto StringToAppProto(const char *proto_name)
Maps a string to its ALPROTO_* equivalent.
void AppLayerParserRegisterGetFrameFuncs(uint8_t ipproto, AppProto alproto, AppLayerParserGetFrameIdByNameFn GetIdByNameFunc, AppLayerParserGetFrameNameByIdFn GetNameByIdFunc)
ProbingParserFPtr ProbeTC
void AppLayerParserRegisterStateFuncs(uint8_t ipproto, AppProto alproto, void *(*StateAlloc)(void *, AppProto), void(*StateFree)(void *))
void(* LocalStorageFree)(void *)
void AppLayerParserRegisterGetEventInfo(uint8_t ipproto, AppProto alproto, int(*StateGetEventInfo)(const char *event_name, uint8_t *event_id, AppLayerEventType *event_type))
void AppLayerParserRegisterGetTxFilesFunc(uint8_t ipproto, AppProto alproto, AppLayerGetFileState(*GetTxFiles)(void *, uint8_t))
void AppLayerProtoDetectRegisterProtocol(AppProto alproto, const char *alproto_name)
Registers a protocol for protocol detection phase.
int(* StateGetEventInfoById)(uint8_t event_id, const char **event_name, AppLayerEventType *event_type)
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))
void AppLayerParserRegisterApplyTxConfigFunc(uint8_t ipproto, AppProto alproto, bool(*ApplyTxConfig)(void *state, void *tx, int mode, AppLayerTxConfig))
AppLayerParserFPtr ParseTC
void AppLayerParserRegisterStateDataFunc(uint8_t ipproto, AppProto alproto, AppLayerStateData *(*GetStateData)(void *state))
void AppLayerParserRegisterTxDataFunc(uint8_t ipproto, AppProto alproto, AppLayerTxData *(*GetTxData)(void *tx))
int(* StateGetEventInfo)(const char *event_name, uint8_t *event_id, AppLayerEventType *event_type)
AppProto AppLayerRegisterProtocolDetection(const struct AppLayerParser *p, int enable_default)
App layer protocol detection function.
void AppLayerParserRegisterGetTxIterator(uint8_t ipproto, AppProto alproto, AppLayerGetTxIteratorFunc Func)
uint64_t(* StateGetTxCnt)(void *alstate)
int AppLayerRegisterParser(const struct AppLayerParser *p, AppProto alproto)
App layer protocol registration function.
void AppLayerProtoDetectRegisterAlias(const char *proto_name, const char *proto_alias)
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)
void AppLayerParserRegisterGetEventInfoById(uint8_t ipproto, AppProto alproto, int(*StateGetEventInfoById)(uint8_t event_id, const char **event_name, AppLayerEventType *event_type))
bool(* ApplyTxConfig)(void *state, void *tx, int mode, AppLayerTxConfig)
int AppLayerRegisterParserAlias(const char *proto_name, const char *proto_alias)
AppLayerStateData *(* GetStateData)(void *state)
AppLayerParserGetFrameIdByNameFn GetFrameIdByName
AppLayerGetFileState(* GetTxFiles)(void *, uint8_t)
void *(* StateGetTx)(void *alstate, uint64_t tx_id)