diff --git a/_oasis b/_oasis index dffcc9ff5..4e11a524f 100644 --- a/_oasis +++ b/_oasis @@ -19,7 +19,7 @@ Library ethif Path: lib Findlibparent: tcpip Findlibname: ethif - Modules: Ethif, Arpv4, Checksum + Modules: Ethif, Arpv4, Tcpip_checksum BuildDepends: tcpip,io-page,mirage-types,ipaddr,cstruct,cstruct.syntax,lwt.syntax,lwt Library ipv4 @@ -27,7 +27,7 @@ Library ipv4 Path: lib Findlibparent: tcpip Findlibname: ipv4 - Modules: Ipv4,Checksum + Modules: Ipv4, Tcpip_checksum BuildDepends: io-page,mirage-types,ipaddr,cstruct,cstruct.syntax,lwt.syntax,lwt,tcpip Library udpv4 diff --git a/lib/ethif.mllib b/lib/ethif.mllib index a37d0b9bf..781b9dca1 100644 --- a/lib/ethif.mllib +++ b/lib/ethif.mllib @@ -1,6 +1,6 @@ # OASIS_START -# DO NOT EDIT (digest: a4c31223314dd9e58ea4b39aad9c3902) +# DO NOT EDIT (digest: 2b7c737ea78eec32e6ca6ff80e37b7f6) Ethif Arpv4 -Checksum +Tcpip_checksum # OASIS_STOP diff --git a/lib/ipv4.ml b/lib/ipv4.ml index f94a04326..d384d28c1 100644 --- a/lib/ipv4.ml +++ b/lib/ipv4.ml @@ -97,7 +97,7 @@ module Make(Ethif : V1_LWT.ETHIF) = struct set_ipv4_len buf tlen; set_ipv4_id buf (Random.int 65535); (* TODO *) set_ipv4_csum buf 0; - let checksum = Checksum.ones_complement (Cstruct.sub buf 0 sizeof_ipv4) in + let checksum = Tcpip_checksum.ones_complement (Cstruct.sub buf 0 sizeof_ipv4) in set_ipv4_csum buf checksum (* We write a whole frame, truncated from the right where the diff --git a/lib/ipv4.mllib b/lib/ipv4.mllib index 26c391bea..1858087da 100644 --- a/lib/ipv4.mllib +++ b/lib/ipv4.mllib @@ -1,5 +1,5 @@ # OASIS_START -# DO NOT EDIT (digest: 8b28693feceb1e79d8aadfb2e54f9ccf) +# DO NOT EDIT (digest: c82b9080a7392074bb86153d9c076fce) Ipv4 -Checksum +Tcpip_checksum # OASIS_STOP diff --git a/lib/checksum.ml b/lib/tcpip_checksum.ml similarity index 100% rename from lib/checksum.ml rename to lib/tcpip_checksum.ml diff --git a/lib/checksum.mli b/lib/tcpip_checksum.mli similarity index 100% rename from lib/checksum.mli rename to lib/tcpip_checksum.mli diff --git a/setup.ml b/setup.ml index 6c3e7f6ad..9bc054a10 100644 --- a/setup.ml +++ b/setup.ml @@ -1,7 +1,7 @@ (* setup.ml generated for the first time by OASIS v0.4.1 *) (* OASIS_START *) -(* DO NOT EDIT (digest: 4f574bb08de2009b13a1000913590a6f) *) +(* DO NOT EDIT (digest: cd9371981b4305b55cb6e9d1813a2034) *) (* Regenerated by OASIS v0.4.1 Visit http://oasis.forge.ocamlcore.org for more information and @@ -6674,7 +6674,7 @@ let setup_t = bs_nativeopt = [(OASISExpr.EBool true, [])] }, { - lib_modules = ["Ethif"; "Arpv4"; "Checksum"]; + lib_modules = ["Ethif"; "Arpv4"; "Tcpip_checksum"]; lib_pack = false; lib_internal_modules = []; lib_findlib_parent = Some "tcpip"; @@ -6714,7 +6714,7 @@ let setup_t = bs_nativeopt = [(OASISExpr.EBool true, [])] }, { - lib_modules = ["Ipv4"; "Checksum"]; + lib_modules = ["Ipv4"; "Tcpip_checksum"]; lib_pack = false; lib_internal_modules = []; lib_findlib_parent = Some "tcpip"; @@ -7254,7 +7254,7 @@ let setup_t = }; oasis_fn = Some "_oasis"; oasis_version = "0.4.1"; - oasis_digest = Some "ØRS[¹M\000\155\t\026ý÷#\130\018ê"; + oasis_digest = Some "ÿ8<¦ÕF\027^½\159¹\017D\016 §"; oasis_exec = None; oasis_setup_args = []; setup_update = false diff --git a/tcp/pcb.ml b/tcp/pcb.ml index 3c3be4bf5..6ab59c09a 100644 --- a/tcp/pcb.ml +++ b/tcp/pcb.ml @@ -82,7 +82,7 @@ module Make(Ipv4:V1_LWT.IPV4)(Time:V1_LWT.TIME)(Clock:V1.CLOCK)(Random:V1.RANDOM set_pseudo_header_res pbuf 0; set_pseudo_header_proto pbuf 6; set_pseudo_header_len pbuf (Cstruct.lenv data); - Checksum.ones_complement_list (pbuf::data) + Tcpip_checksum.ones_complement_list (pbuf::data) let verify_checksum id pkt = true diff --git a/tcp/wire.ml b/tcp/wire.ml index d8ab611bf..51b9e03d5 100644 --- a/tcp/wire.ml +++ b/tcp/wire.ml @@ -38,7 +38,7 @@ let checksum ~src ~dst = set_tcpv4_pseudo_header_res pbuf 0; set_tcpv4_pseudo_header_proto pbuf 6; set_tcpv4_pseudo_header_len pbuf (Cstruct.lenv data); - Checksum.ones_complement_list (pbuf::data) + Tcpip_checksum.ones_complement_list (pbuf::data) type id = { dest_port: int; (* Remote TCP port *)