suricata
util-proto-name.c File Reference
#include "suricata-common.h"
#include "util-proto-name.h"
Include dependency graph for util-proto-name.c:

Go to the source code of this file.

Functions

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

Detailed Description

Author
Gurvinder Singh gurvi.nosp@m.nder.nosp@m.singh.nosp@m.dahi.nosp@m.ya@gm.nosp@m.ail..nosp@m.com

File to provide the protocol names based on protocol numbers defined in the specified protocol file.

Definition in file util-proto-name.c.

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 JsonFiveTuple().

Here is the caller graph for this function: