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);
59 SCLogDebug(
"Unittest mode, registering default configuration.");
70 if (enable_default != 0) {
71 SCLogDebug(
"No %s app-layer configuration, enabling %s" 72 " detection %s detection on port %s.",
79 SCLogDebug(
"No %s app-layer configuration for detection port (%s).",
80 p->
name, ip_proto_str);
91 const char *ip_proto_str = NULL;
99 ip_proto_str = IpProtoToString(p->
ip_proto);
100 if (ip_proto_str == NULL)
182 static const char * IpProtoToString(
int ip_proto)
const char * default_port
int(* StateGetProgress)(void *alstate, uint8_t direction)
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
void AppLayerParserRegisterLocalStorageFunc(uint8_t ipproto, AppProto alproto, void *(*LocalStorageAlloc)(void), void(*LocalStorageFree)(void *))
FileContainer *(* StateGetFiles)(void *, uint8_t)
void AppLayerParserRegisterGetStateProgressFunc(uint8_t ipproto, AppProto alproto, int(*StateGetProgress)(void *alstate, uint8_t direction))
void *(* LocalStorageAlloc)(void)
int(* StateGetEventInfoById)(int event_id, const char **event_name, AppLayerEventType *event_type)
void AppLayerParserRegisterDetectFlagsFuncs(uint8_t ipproto, AppProto alproto, uint64_t(*GetTxDetectFlags)(void *tx, uint8_t dir), void(*SetTxDetectFlags)(void *tx, uint8_t dir, uint64_t))
void AppLayerParserRegisterDetectStateFuncs(uint8_t ipproto, AppProto alproto, DetectEngineState *(*GetTxDetectState)(void *tx), int(*SetTxDetectState)(void *tx, DetectEngineState *))
int AppLayerRegisterParser(const struct AppLayerParser *p, AppProto alproto)
App layer protocol registration function.
uint32_t(* StateGetTxLogged)(void *alstate, void *tx)
AppLayerGetTxIterTuple(* GetTxIterator)(const uint8_t ipproto, const AppProto alproto, void *alstate, uint64_t min_tx_id, uint64_t max_tx_id, AppLayerGetTxIterState *istate)
void AppLayerParserRegisterGetEventsFunc(uint8_t ipproto, AppProto alproto, AppLayerDecoderEvents *(*StateGetEvents)(void *))
void AppLayerParserRegisterLoggerFuncs(uint8_t ipproto, AppProto alproto, LoggerId(*StateGetTxLogged)(void *, void *), void(*StateSetTxLogged)(void *, void *, LoggerId))
int(* StateGetProgressCompletionStatus)(uint8_t direction)
uint64_t(* StateGetTxCnt)(void *alstate)
void *(* StateAlloc)(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))
AppProto AppLayerRegisterProtocolDetection(const struct AppLayerParser *p, int enable_default)
App layer protocol detection function.
void(* StateFree)(void *)
void AppLayerParserRegisterGetFilesFunc(uint8_t ipproto, AppProto alproto, FileContainer *(*StateGetFiles)(void *, uint8_t))
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 AppLayerParserRegisterGetEventInfo(uint8_t ipproto, AppProto alproto, int(*StateGetEventInfo)(const char *event_name, int *event_id, AppLayerEventType *event_type))
AppProto StringToAppProto(const char *proto_name)
Maps a string to its ALPROTO_* equivalent.
void(* SetTxDetectFlags)(void *, uint8_t, uint64_t)
void AppLayerParserRegisterGetStateProgressCompletionStatus(AppProto alproto, int(*StateGetProgressCompletionStatus)(uint8_t direction))
DetectEngineState *(* GetTxDetectState)(void *tx)
int RunmodeIsUnittests(void)
void AppLayerParserRegisterGetEventInfoById(uint8_t ipproto, AppProto alproto, int(*StateGetEventInfoById)(int event_id, const char **event_name, AppLayerEventType *event_type))
void(* LocalStorageFree)(void *)
uint64_t(* GetTxMpmIDs)(void *tx)
void AppLayerProtoDetectRegisterProtocol(AppProto alproto, const char *alproto_name)
Registers a protocol for protocol detection phase.
#define FatalError(x,...)
void(* StateTransactionFree)(void *, uint64_t)
void AppLayerParserRegisterGetTxIterator(uint8_t ipproto, AppProto alproto, AppLayerGetTxIteratorFunc Func)
AppLayerDecoderEvents *(* StateGetEvents)(void *)
uint64_t(* GetTxDetectFlags)(void *, uint8_t)
int(* StateGetEventInfo)(const char *event_name, int *event_id, AppLayerEventType *event_type)
ProbingParserFPtr ProbeTS
void AppLayerParserRegisterGetTxCnt(uint8_t ipproto, AppProto alproto, uint64_t(*StateGetTxCnt)(void *alstate))
void AppLayerParserRegisterStateFuncs(uint8_t ipproto, AppProto alproto, void *(*StateAlloc)(void), void(*StateFree)(void *))
void(* StateSetTxLogged)(void *alstate, void *tx, uint32_t logger)
void *(* StateGetTx)(void *alstate, uint64_t tx_id)
ProbingParserFPtr ProbeTC
AppLayerParserFPtr ParseTC
int(* SetTxDetectState)(void *tx, DetectEngineState *)
AppLayerParserFPtr ParseTS
int(* SetTxMpmIDs)(void *tx, uint64_t)
void AppLayerParserRegisterTxFreeFunc(uint8_t ipproto, AppProto alproto, void(*StateTransactionFree)(void *, uint64_t))
void AppLayerParserRegisterMpmIDsFuncs(uint8_t ipproto, AppProto alproto, uint64_t(*GetTxMpmIDs)(void *tx), int(*SetTxMpmIDs)(void *tx, uint64_t))