Add support for parsing IP Authentication Header

This commit is contained in:
luwenpeng
2024-06-04 15:48:34 +08:00
parent ae2e36b382
commit 8c4f4c9f72
6 changed files with 99 additions and 47 deletions

View File

@@ -108,13 +108,10 @@ function preprocess_tshark_ouput() {
":data" ""
":sctp:m3ua" ""
":sctp" ""
":teredo:ipv6:udp" ""
":teredo:ipv6:tcp" ""
":teredo:ipv6:icmpv6" ""
":teredo:ipv6:gre:ip:udp" ""
":igmp" ""
":icmp:ip:tcp" ":icmp"
":pwethheuristic:pwethnocw" ""
":ospf" ""
)
for ((i = 0; i < ${#kv_array[@]}; i += 2)); do
key=${kv_array[i]}

View File

@@ -25,7 +25,7 @@ static int ipv6_proto_to_str(const struct packet_layer *ipv6_layer, char *buff,
used += snprintf(buff + used, size - used, ":ipv6.routing");
break;
case IPPROTO_AH:
used += snprintf(buff + used, size - used, ":ipv6.ah");
used += snprintf(buff + used, size - used, ":ah");
break;
case IPPROTO_DSTOPTS:
used += snprintf(buff + used, size - used, ":ipv6.dstopts");
@@ -79,6 +79,9 @@ static int packet_proto_to_str(const struct packet *pkt, char *buff, int size)
case LAYER_TYPE_IPV6:
used += ipv6_proto_to_str(layer, buff + used, size - used);
break;
case LAYER_TYPE_IPAH:
used += snprintf(buff + used, size - used, "ah");
break;
case LAYER_TYPE_GRE:
used += snprintf(buff + used, size - used, "gre");
break;