@@ -469,6 +469,20 @@ static inline void process_udp_recv(struct sk_buff *skb, statkey *key,
469
469
key -> pid = pid ;
470
470
}
471
471
472
+ /**
473
+ * Process an ICMPv4 packet and populate the key with the relevant information.
474
+ *
475
+ * @param skb pointer to the socket buffer containing the ICMPv4 packet
476
+ * @param key pointer to the statkey structure to be populated
477
+ * @param pid process ID associated with the packet
478
+ *
479
+ * This function extracts source and destination IP addresses and ICMP type
480
+ * and code from the ICMPv4 packet, taking into account the IPv4 header. It
481
+ * stores these details in the provided statkey structure, along with the
482
+ * protocol type set to ICMPv4 and the associated process ID.
483
+ *
484
+ * @throws none
485
+ */
472
486
static inline size_t process_icmp4 (struct sk_buff * skb , statkey * key ,
473
487
pid_t pid ) {
474
488
struct icmphdr * icmphdr =
@@ -501,6 +515,23 @@ static inline size_t process_icmp4(struct sk_buff *skb, statkey *key,
501
515
return msglen ;
502
516
}
503
517
518
+ /**
519
+ * Process an ICMPv6 packet and populate the key with the relevant information.
520
+ *
521
+ * @param skb pointer to the socket buffer containing the ICMPv6 packet
522
+ * @param key pointer to the statkey structure to be populated
523
+ * @param pid process ID associated with the packet
524
+ *
525
+ * This function extracts source and destination IP addresses and ICMPv6 type
526
+ * and code from the ICMPv6 packet, taking into account the IPv6 header. It
527
+ * stores these details in the provided statkey structure, along with the
528
+ * protocol type set to ICMPv6 and the associated process ID. It also returns
529
+ * the length of the ICMPv6 message payload.
530
+ *
531
+ * @return the length of the ICMPv6 message payload
532
+ * @throws none
533
+ */
534
+
504
535
static inline size_t process_icmp6 (struct sk_buff * skb , statkey * key ,
505
536
pid_t pid ) {
506
537
struct icmp6hdr * icmphdr =
0 commit comments