suricata
util-proto-name.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool SCProtoNameValid (uint16_t)
 Function to check if the received protocol number is valid and do we have corresponding name entry for this number or not. More...
 
bool SCGetProtoByName (const char *protoname, uint8_t *proto_number)
 Function to return the protocol number for a named protocol. Note that protocol name aliases are honored. More...
 
void SCProtoNameInit (void)
 
void SCProtoNameRelease (void)
 
void SCProtoNameRegisterTests (void)
 

Variables

const char * known_proto [256]
 

Detailed Description

Function Documentation

◆ SCGetProtoByName()

bool SCGetProtoByName ( const char *  protoname,
uint8_t *  proto_number 
)

Function to return the protocol number for a named protocol. Note that protocol name aliases are honored.

Parameters
protonameProtocol name (or alias for a protocol name).
proto_numberWhere to return protocol number
Return values
retOn success returns the protocol number; else -1

Definition at line 466 of file util-proto-name.c.

References HashTableLookup(), and proto.

Here is the call graph for this function:

◆ SCProtoNameInit()

void SCProtoNameInit ( void  )

Definition at line 417 of file util-proto-name.c.

Referenced by GlobalsInitPreConfig().

Here is the caller graph for this function:

◆ SCProtoNameRegisterTests()

void SCProtoNameRegisterTests ( void  )

Definition at line 502 of file util-proto-name.c.

References UtRegisterTest().

Here is the call graph for this function:

◆ SCProtoNameRelease()

void SCProtoNameRelease ( void  )

Definition at line 438 of file util-proto-name.c.

Referenced by GlobalsDestroy().

Here is the caller graph for this function:

◆ SCProtoNameValid()

bool SCProtoNameValid ( uint16_t  proto)

Function to check if the received protocol number is valid and do we have corresponding name entry for this number or not.

Parameters
protoProtocol number to be validated
Return values
retOn success returns true otherwise false

Definition at line 453 of file util-proto-name.c.

References known_proto, and proto.

Variable Documentation

◆ known_proto

const char* known_proto[256]

Lookup array to hold the information related to known protocol values

Definition at line 40 of file util-proto-name.c.

Referenced by SCProtoNameValid().