[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [MirageOS-devel] mirage-www on xen and networking (on ARM)
On Sun, Mar 29, 2015 at 5:02 PM, Magnus Therning <magnus@xxxxxxxxxxxx> wrote: I've finally managed to set up an ARM system that can compile Assuming you're using the v2.3.0 release (IIRC v2.4.0 hasn't been merged yet), then this is the assert:  let input t ~tcp ~udp ~default buf =   (* buf pointers to start of IPv4 header here *)   let ihl = (Wire_structs.Ipv4_wire.get_ipv4_hlen_version buf land 0xf) * 4 in   let src = "" (Wire_structs.Ipv4_wire.get_ipv4_src buf) in   let dst = Ipaddr.V4.of_int32 (Wire_structs.Ipv4_wire.get_ipv4_dst buf) in   let payload_len = Wire_structs.Ipv4_wire.get_ipv4_len buf - ihl in   (* XXX this will raise exception for 0-length payload *)   let hdr, data = "" buf ihl in   assert (Cstruct.len data = "">   let proto = Wire_structs.Ipv4_wire.get_ipv4_proto buf in   match Wire_structs.Ipv4_wire.int_to_protocol proto with   | Some `ICMP -> icmp_input t src hdr data   | Some `TCP Â-> tcp ~src ~dst data   | Some `UDP Â-> udp ~src ~dst data   | None    -> default ~proto ~src ~dst data So it looks like you're receiving truncated IP frames. It would be helpful to know what the frames actually are-- could you do something like: git clone git://github.com/mirage/mirage-tcpip cd mirage-tcpip git checkout v2.3.0 perhaps change the assert into something like if Cstruct.len data <> payload_len then begin  printf "argh, it's all broken! len = %d payload_len = %d\n" (Cstruct.len data) payload_len;  Cstruct.hexdump buf; end (quoting the Cstruct manual: Â" when the going gets tough, the tough hexdump their cstructs   and peer at it until the bug disappears. This will directly   prettyprint the contents of the cstruct to the standard output. ") opam pin add tcpip . .. and then rebuild your app with the new code. [ snip ]   DHCP: offer received It's obviously not all bad, since some networking is working!    Manager: configuration done I don't think the assert failures are your fault ;-) Cheers, Dave Â
Dave Scott
_______________________________________________ MirageOS-devel mailing list MirageOS-devel@xxxxxxxxxxxxxxxxxxxx http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |