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

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

Variables

const char * known_proto [256]
 

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 by the IANA

Definition in file util-proto-name.c.

Function Documentation

◆ 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 195 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

const char* known_proto[256]

Lookup array to hold the information related to known protocol values

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

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