suricata
app-layer-register.c File Reference
#include "suricata-common.h"
#include "stream.h"
#include "conf.h"
#include "app-layer-detect-proto.h"
#include "app-layer-parser.h"
#include "app-layer-register.h"
Include dependency graph for app-layer-register.c:

Go to the source code of this file.

Functions

AppProto AppLayerRegisterProtocolDetection (const struct AppLayerParser *p, int enable_default)
 App layer protocol detection function. More...
 
int AppLayerRegisterParser (const struct AppLayerParser *p, AppProto alproto)
 App layer protocol registration function. More...
 

Detailed Description

Author
Pierre Chifflier chiff.nosp@m.lier.nosp@m.@wzdf.nosp@m.tpd..nosp@m.net

Parser registration functions.

Definition in file app-layer-register.c.

Function Documentation

◆ AppLayerRegisterParser()

int AppLayerRegisterParser ( const struct AppLayerParser p,
AppProto  alproto 
)

App layer protocol registration function.

Parameters
parserThe parser declaration structure.
alprotoThe application layer protocol identifier.
Return values
0if successful. On error, this function never returns.

Definition at line 93 of file app-layer-register.c.

References ALPROTO_FAILED, ALPROTO_UNKNOWN, FatalError, AppLayerParser::name, and SC_ERR_FATAL.

◆ AppLayerRegisterProtocolDetection()

AppProto AppLayerRegisterProtocolDetection ( const struct AppLayerParser parser,
int  enable_default 
)

App layer protocol detection function.

Parameters
parserThe parser declaration structure.
enable_defaultA boolean to indicate if default port configuration should be used if none given
Return values
TheAppProto constant if successful. On error, this function never returns.

Definition at line 37 of file app-layer-register.c.

References ALPROTO_FAILED, ALPROTO_UNKNOWN, FatalError, AppLayerParser::name, SC_ERR_FATAL, and StringToAppProto().

Here is the call graph for this function: