[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#564158: [libmlpcap-ocaml-dev] Invalid payload in callback function when reading a trace with pcap_loop



Hello,

2010/1/8 Stéphane Glondu <steph@glondu.net>:
> Actually, pcap_payload embeds a pointer outside the ML heap (ML block
> with unaligned_tag). I guess it is the libpcap receive buffer. As such,
> it is not marshallable nor usable with regular string functions.
> However, unsafe_* variants work fine (see pcap_loop.ml example for
> example). If you want to use it as a regular string, you'll have to
> unsafe_blit the contents into another OCaml string yourself.

Is this documented somewhere? I don't remember having seen this when I
used mlpcap (a long time ago).

Regards,
d.


Reply to: