From b5e73b8462e5fbb9d1acd7948f49c8595b8f4e1b Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Mon, 16 Jun 2014 10:15:53 -0400 Subject: [PATCH] Make note re: checksums --- ip.rkt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ip.rkt b/ip.rkt index c01e61a..0763887 100644 --- a/ip.rkt +++ b/ip.rkt @@ -46,7 +46,7 @@ (fragment-offset :: bits 13) ttl protocol - (header-checksum :: bits 16) + (header-checksum :: bits 16) ;; TODO: check checksum (source-ip0 :: binary bits 32) (destination-ip0 :: binary bits 32) (rest :: binary) ] @@ -124,7 +124,7 @@ (match e [(message (ip-packet peer-address _ _ _ _ body) _ _) (bit-string-case body - ([ type code (checksum :: integer bytes 2) (rest :: binary) ] + ([ type code (checksum :: integer bytes 2) (rest :: binary) ] ;; TODO: check cksum (case type [(8) ;; ECHO (0 is ECHO-REPLY) (log-info "Ping of ~a from ~a" @@ -153,4 +153,4 @@ [_ #f])) (void) (gestalt-union (pub (ip-packet my-address ? ? PROTOCOL-ICMP ? ?)) - (sub (ip-packet ? my-address ? PROTOCOL-ICMP ? ?))))) \ No newline at end of file + (sub (ip-packet ? my-address ? PROTOCOL-ICMP ? ?)))))