Add more info to filter logging.
This commit is contained in:
@@ -57,6 +57,30 @@ ip_range_t ParseIpCidr(const char *ip)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves protocol name by ID.
|
||||
*
|
||||
* @param id The protocol ID
|
||||
*
|
||||
* @return The protocol string.
|
||||
*/
|
||||
const char* GetProtocolStrById(int id)
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case IPPROTO_TCP:
|
||||
return "TCP";
|
||||
|
||||
case IPPROTO_UDP:
|
||||
return "UDP";
|
||||
|
||||
case IPPROTO_ICMP:
|
||||
return "ICMP";
|
||||
}
|
||||
|
||||
return "N/A";
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints tool name and author.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user