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.

Macros

#define PROTO_FILE   "/etc/protocols"
 

Functions

uint8_t 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...
 
void SCProtoNameInit (void)
 Function to load the protocol names from the specified protocol file. More...
 
void SCProtoNameDeInit (void)
 Function to clears the memory used in storing the protocol names. More...
 

Variables

char * known_proto [256]
 

Detailed Description

Macro Definition Documentation

#define PROTO_FILE   "/etc/protocols"

Definition at line 28 of file util-proto-name.h.

Referenced by SCProtoNameInit().

Function Documentation

void SCProtoNameDeInit ( void  )

Function to clears the memory used in storing the protocol names.

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

References known_proto, and SCFree.

Referenced by GlobalsInitPreConfig().

Here is the caller graph for this function:

void SCProtoNameInit ( void  )

Function to load the protocol names from the specified protocol file.

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

References BUG_ON, known_proto, proto, PROTO_FILE, SC_ERR_MEM_ALLOC, SCFree, SCLogError, SCStrdup, and unlikely.

Referenced by PostRunDeinit(), and RunUnittests().

Here is the caller graph for this function:

uint8_t 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 94 of file util-proto-name.c.

References FALSE, known_proto, and TRUE.

Referenced by AlertFastLogger(), and OutputJsonRegister().

Here is the caller graph for this function:

Variable Documentation

char* known_proto[256]

Lookup array to hold the information related to known protocol in /etc/protocols

Definition at line 35 of file util-proto-name.h.

Referenced by AlertFastLogger(), OutputJsonRegister(), SCProtoNameDeInit(), SCProtoNameInit(), and SCProtoNameValid().