X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=examples%2Fipv4_header.ml;fp=examples%2Fipv4_header.ml;h=e47de03f36acaabd97d9db872d76fbc957f91f67;hb=0fb4b24ebe3b85c935786f8e3e472d0d2292744e;hp=6db81ad61ea11fe6668f390b7351809b8b7ee798;hpb=46d02767bf223661c05127d86878a74be0bda712;p=ocaml-bitstring.git diff --git a/examples/ipv4_header.ml b/examples/ipv4_header.ml index 6db81ad..e47de03 100644 --- a/examples/ipv4_header.ml +++ b/examples/ipv4_header.ml @@ -4,7 +4,7 @@ open Printf -let header = Bitmatch.bitstring_of_file "ipv4_header.dat" +let header = Bitstring.bitstring_of_file "ipv4_header.dat" let () = bitmatch header with @@ -29,13 +29,13 @@ let () = printf " checksum: %d\n" checksum; printf " source: %lx dest: %lx\n" source dest; printf " header options + padding:\n"; - Bitmatch.hexdump_bitstring stdout options; + Bitstring.hexdump_bitstring stdout options; printf " packet payload:\n"; - Bitmatch.hexdump_bitstring stdout payload + Bitstring.hexdump_bitstring stdout payload | { version : 4 } -> eprintf "cannot parse IP version %d\n" version | { _ } as header -> eprintf "data is smaller than one nibble:\n"; - Bitmatch.hexdump_bitstring stderr header + Bitstring.hexdump_bitstring stderr header