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

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...
 
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

◆ PROTO_FILE

#define PROTO_FILE   "/etc/protocols"

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

Function Documentation

◆ SCProtoNameDeInit()

void SCProtoNameDeInit ( void  )

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

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

◆ SCProtoNameInit()

void SCProtoNameInit ( void  )

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

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

References BUG_ON.

Referenced by RunUnittests().

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

References known_proto, and proto.

Referenced by AlertFastLogger(), and JsonAddrInfoInit().

Here is the caller graph for this function:

Variable Documentation

◆ known_proto

char* known_proto[256]

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

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

Referenced by AlertFastLogger(), JsonAddrInfoInit(), and SCProtoNameValid().