Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(build): do not use Ethernet_wire #640

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/hostnet/hostnet_dns.ml
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ struct
packet creation fn *)
let frame = Io_page.to_cstruct (Io_page.get 1) in
let smac = "\000\000\000\000\000\000" in
Ethernet__Ethernet_wire.set_ethernet_src smac 0 frame;
Ethernet__Ethernet_wire.set_ethernet_ethertype frame 0x0800;
Cstruct.blit_from_string smac 0 frame 6 6;
Cstruct.BE.set_uint16 frame 12 0x0800;
let buf = Cstruct.shift frame Ethernet.Packet.sizeof_ethernet in
Ipv4_wire.set_ipv4_hlen_version buf ((4 lsl 4) + (5));
Ipv4_wire.set_ipv4_tos buf 0;
Expand All @@ -283,7 +283,7 @@ struct
let tlen = Cstruct.lenv bufs - Ethernet.Packet.sizeof_ethernet in
let dmac = String.make 6 '\000' in
(* Ip.adjust_output_header *)
Ethernet__Ethernet_wire.set_ethernet_dst dmac 0 frame;
Cstruct.blit_from_string dmac 0 frame 0 6;
let buf =
Cstruct.sub frame Ethernet.Packet.sizeof_ethernet Ipv4_wire.sizeof_ipv4
in
Expand Down