1 ! Copyright (C) 2007 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: alien alien.c-types alien.syntax byte-arrays io
4 kernel math prettyprint ;
5 IN: io.sockets.headers.bsd
8 { "timeval" "timestamp" }
11 { "ushort" "hdrlen" } ;
15 bpfh-timestamp "Timestamp: " write
16 "timeval" heap-size memory>byte-array .
18 [ bpfh-caplen "caplen: " write . ] keep
19 [ bpfh-datalen "datalen: " write . ] keep
20 [ bpfh-hdrlen "hdrlen: " write . ] keep