ref: e0e8aafaa651cba00f96c01f8c87dab7109cfc3d
parent: dd39ca79eea4204fe076b0b56a9eafd0c947f4eb
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)