From 0130c7b34e9e4e831c2794f00a0d017040a967a9 Mon Sep 17 00:00:00 2001 From: Andrey Konovalov Date: Wed, 8 Feb 2017 15:49:03 +0100 Subject: prog, sys: add icmpv6 packet descriptions and checksums Also generalize checksums into the two kinds: inet and pseudo. Inet checksums is just the Internet checksum of a packet. Pseudo checksum is the Internet checksum of a packet with a pseudo header. --- sys/test.txt | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'sys/test.txt') diff --git a/sys/test.txt b/sys/test.txt index 9d4ac0ced..851164305 100644 --- a/sys/test.txt +++ b/sys/test.txt @@ -398,6 +398,7 @@ syz_test$csum_ipv4_tcp(a0 ptr[in, syz_csum_ipv4_tcp_packet]) syz_test$csum_ipv6_tcp(a0 ptr[in, syz_csum_ipv6_tcp_packet]) syz_test$csum_ipv4_udp(a0 ptr[in, syz_csum_ipv4_udp_packet]) syz_test$csum_ipv6_udp(a0 ptr[in, syz_csum_ipv6_udp_packet]) +syz_test$csum_ipv6_icmp(a0 ptr[in, syz_csum_ipv6_icmp_packet]) syz_csum_encode { f0 int16 @@ -409,13 +410,13 @@ syz_csum_encode { } [packed] syz_csum_ipv4_header { - csum csum[inet, int16] + csum csum[parent, inet, int16] src_ip int32be dst_ip int32be } [packed] syz_csum_tcp_header { - csum csum[tcp, int16] + csum csum[syz_csum_tcp_packet, pseudo, IPPROTO_TCP, int16] } [packed] syz_csum_tcp_packet { @@ -439,7 +440,7 @@ syz_csum_ipv6_tcp_packet { } [packed] syz_csum_udp_packet { - csum csum[udp, int16] + csum csum[parent, pseudo, IPPROTO_UDP, int16] payload array[int8] } [packed] @@ -452,3 +453,13 @@ syz_csum_ipv6_udp_packet { header syz_csum_ipv6_header payload syz_csum_udp_packet } [packed] + +syz_csum_icmp_packet { + csum csum[parent, pseudo, IPPROTO_ICMPV6, int16] + payload array[int8] +} [packed] + +syz_csum_ipv6_icmp_packet { + header syz_csum_ipv6_header + payload syz_csum_icmp_packet +} [packed] -- cgit mrf-deployment