[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] pa_cstruct first cut available
I've knocked together the C-struct syntax extension, and it's actually quite simple and effective. https://github.com/avsm/ocaml-cstruct/blob/master/lib_test/pcap.ml is a pcap parser that cracks open pcap/ethernet/ipv4/tcp and displays the payloads. The 'cstruct' declaration defines all the accessors as you might expect, and the underlying buffers are all reference counted (as in MPL) and so can be passed around. The base-pointer can also be retrieved, so you can do comparisons of the underlying Io_page (e.g. to get a Xen grant onto it). If noone has any objections, I'll add unit tests for the write path, and merge this into Mirage in my os-bigarray branch. I dont think we actually need bitstring at all anymore. Mort: reckon you can easily port the DNS code to this? It should speed up the responses an awful lot. -anil
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |