Fixed protocol rendering

This commit is contained in:
Luca 2020-01-30 17:01:22 +01:00
parent 9cd9cbff0e
commit b9601ef2e4
2 changed files with 27 additions and 20 deletions

View file

@ -146,15 +146,29 @@ if((ifname == nil) and (_GET ~= nil)) then
end
end
-- See Utils::l4proto2name()
l4_keys = {
{ "TCP", "tcp", 6 },
{ "UDP", "udp", 17 },
{ "ICMP", "icmp", 1 },
{ "ICMPv6", "icmpv6", 58 },
{ "IGMP", "igmp", 2 },
{ "Other IP", "other_ip", -1 }
{ "IP", "ip", 0 },
{ "ICMP", "icmp", 1 },
{ "IGMP", "igmp", 2 },
{ "TCP", "tcp", 6 },
{ "UDP", "udp", 17 },
{ "IPv6", "ipv6", 41 },
{ "RSVP", "rsvp", 46 },
{ "GRE", "gre", 47 },
{ "ESP", "esp", 50 },
{ "IPv6-ICMP", "ipv6icmp", 58 },
{ "OSPF", "ospf", 89 },
{ "PIM", "pim", 103 },
{ "VRRP", "vrrp", 112 },
{ "HIP", "hip", 139 },
{ "ICMPv6", "icmpv6", 58 },
{ "IGMP", "igmp", 2 },
{ "Other IP", "other_ip", -1 }
}
L4_PROTO_KEYS = {tcp=6, udp=17, icmp=1, other_ip=-1}
function __FILE__() return debug.getinfo(2,'S').source end