]> gitweb.factorcode.org Git - factor-unmaintained.git/blobdiff - headers/bsd/bsd.factor
headers: moving to io.sockets.headers to match IN: declaration.
[factor-unmaintained.git] / headers / bsd / bsd.factor
diff --git a/headers/bsd/bsd.factor b/headers/bsd/bsd.factor
deleted file mode 100644 (file)
index 06634c2..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-! Copyright (C) 2007 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: alien alien.c-types alien.syntax byte-arrays io
-kernel math prettyprint ;
-IN: io.sockets.headers.bsd
-
-C-STRUCT: bpfh
-    { "timeval" "timestamp" }
-    { "ulong" "caplen" }
-    { "ulong" "datalen" }
-    { "ushort" "hdrlen" } ;
-
-: bpfh. ( bpfh -- )
-    [
-        bpfh-timestamp "Timestamp: " write
-        "timeval" heap-size memory>byte-array .
-    ] keep
-    [ bpfh-caplen "caplen: " write . ] keep
-    [ bpfh-datalen "datalen: " write . ] keep
-    [ bpfh-hdrlen "hdrlen: " write . ] keep
-    drop ;
-