Skip to content

Commit 308001c

Browse files
committed
fix(build): do not use Ethernet_wire
This dependency is not available anymore. I used the same technique used here mirage/ethernet@61dfc14 to fix the build. Signed-off-by: Marco Casaroli <[email protected]>
1 parent dc331cb commit 308001c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/hostnet/hostnet_dns.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,8 @@ struct
257257
packet creation fn *)
258258
let frame = Io_page.to_cstruct (Io_page.get 1) in
259259
let smac = "\000\000\000\000\000\000" in
260-
Ethernet__Ethernet_wire.set_ethernet_src smac 0 frame;
261-
Ethernet__Ethernet_wire.set_ethernet_ethertype frame 0x0800;
260+
Cstruct.blit_from_string smac 0 frame 6 6;
261+
Cstruct.BE.set_uint16 frame 12 0x0800;
262262
let buf = Cstruct.shift frame Ethernet.Packet.sizeof_ethernet in
263263
Ipv4_wire.set_ipv4_hlen_version buf ((4 lsl 4) + (5));
264264
Ipv4_wire.set_ipv4_tos buf 0;
@@ -283,7 +283,7 @@ struct
283283
let tlen = Cstruct.lenv bufs - Ethernet.Packet.sizeof_ethernet in
284284
let dmac = String.make 6 '\000' in
285285
(* Ip.adjust_output_header *)
286-
Ethernet__Ethernet_wire.set_ethernet_dst dmac 0 frame;
286+
Cstruct.blit_from_string dmac 0 frame 0 6;
287287
let buf =
288288
Cstruct.sub frame Ethernet.Packet.sizeof_ethernet Ipv4_wire.sizeof_ipv4
289289
in

0 commit comments

Comments
 (0)