Skip to content

Commit

Permalink
[FIX] Missing IPPROTOs.
Browse files Browse the repository at this point in the history
  • Loading branch information
DanieleDeSensi committed Jan 6, 2019
1 parent e67afe8 commit 0c37adb
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions src/parsing_l4.c
Expand Up @@ -266,31 +266,81 @@ pfwl_status_t pfwl_dissect_from_L4(pfwl_state_t *state,

static const char* pfwl_l4_protocols_names[IPPROTO_MAX] = {
[0 ... IPPROTO_MAX - 1] = "",
#ifdef IPPROTO_IP
[IPPROTO_IP] = "IP",
#endif
#ifdef IPPROTO_ICMP
[IPPROTO_ICMP] = "ICMP",
#endif
#ifdef IPPROTO_IGMP
[IPPROTO_IGMP] = "IGMP",
#endif
#ifdef IPPROTO_IPIP
[IPPROTO_IPIP] = "IPIP",
#endif
#ifdef IPPROTO_TCP
[IPPROTO_TCP] = "TCP",
#endif
#ifdef IPPROTO_EGP
[IPPROTO_EGP] = "EGP",
#endif
#ifdef IPPROTO_PUP
[IPPROTO_PUP] = "PUP",
#endif
#ifdef IPPROTO_UDP
[IPPROTO_UDP] = "UDP",
#endif
#ifdef IPPROTO_IDP
[IPPROTO_IDP] = "IDP",
#endif
#ifdef IPPROTO_TP
[IPPROTO_TP] = "TP",
#endif
#ifdef IPPROTO_DCCP
[IPPROTO_DCCP] = "DCCP",
#endif
#ifdef IPPROTO_IPV6
[IPPROTO_IPV6] = "IPV6",
#endif
#ifdef IPPROTO_RSVP
[IPPROTO_RSVP] = "RSVP",
#endif
#ifdef IPPROTO_GRE
[IPPROTO_GRE] = "GRE",
#endif
#ifdef IPPROTO_ESP
[IPPROTO_ESP] = "ESP",
#endif
#ifdef IPPROTO_AH
[IPPROTO_AH] = "AH",
#endif
#ifdef IPPROTO_MTP
[IPPROTO_MTP] = "MTP",
#endif
#ifdef IPPROTO_BEETPH
[IPPROTO_BEETPH] = "BEETPH",
#endif
#ifdef IPPROTO_ENCAP
[IPPROTO_ENCAP] = "ENCAP",
#endif
#ifdef IPPROTO_PIM
[IPPROTO_PIM] = "PIM",
#endif
#ifdef IPPROTO_COMP
[IPPROTO_COMP] = "COMP",
#endif
#ifdef IPPROTO_SCTP
[IPPROTO_SCTP] = "SCTP",
#endif
#ifdef IPPROTO_UDPLITE
[IPPROTO_UDPLITE] = "UDPLITE",
#endif
#ifdef IPPROTO_MPLS
[IPPROTO_MPLS] = "MPLS",
#endif
#ifdef IPPROTO_RAW
[IPPROTO_RAW] = "RAW"
#endif
};

const char *pfwl_get_L4_protocol_name(pfwl_protocol_l4_t protocol){
Expand Down

0 comments on commit 0c37adb

Please sign in to comment.