Add more info to filter logging.

This commit is contained in:
Christian Deacon
2025-02-26 12:16:33 -05:00
parent f27481fb3b
commit e54fb3fe79
5 changed files with 72 additions and 4 deletions

View File

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