ref: 14b9612720fce05f21e44267e2212fa55dcb9a16
parent: f6e53709407611de940092c9d73e63926723252f
author: Ori Bernstein <[email protected]>
date: Tue Jun 17 21:31:46 EDT 2014
Add raw socket type.
--- a/libstd/sys-linux.myr
+++ b/libstd/sys-linux.myr
@@ -100,6 +100,7 @@
const Onofollow : fdopt = 0x20000
const Ondelay : fdopt = 0x800
const Otrunc : fdopt = 0x200
+ const Odir : fdopt = 0x10000
/* mmap protection */
const Mprotnone : mprot = 0x0
@@ -131,6 +132,13 @@
const Sockdccp : socktype = 6 /* data congestion control protocol */
const Sockpack : socktype = 10 /* linux specific packet */
+ /* network protocols */
+ const Ipproto_ip : sockproto = 0
+ const Ipproto_icmp : sockproto = 1
+ const Ipproto_tcp : sockproto = 6
+ const Ipproto_udp : sockproto = 17
+ const Ipproto_raw : sockproto = 255
+
const Seekset : whence = 0
const Seekcur : whence = 1
const Seekend : whence = 2
@@ -451,12 +459,6 @@
const Sysgetcpu : scno = 309
const Sysprocess_vm_readv : scno = 310
const Sysprocess_vm_writev : scno = 311
-
- /* network protocols */
- const Ipproto_ip : sockproto = 0
- const Ipproto_icmp : sockproto = 1
- const Ipproto_tcp : sockproto = 6
- const Ipproto_udp : sockproto = 17
/* getting to the os */
extern const syscall : (sc:scno, args:... -> int64)