summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-06-18 10:57:04 -0400
committerOri Bernstein <ori@eigenstate.org>2014-06-18 10:57:04 -0400
commit38fbec291e5dc24213f5111e9523b35701500189 (patch)
tree9710c3a33f079b523613ae9d9691909e25fed95c
parent045848e7ce20786892c6fd395f64e879d57003c0 (diff)
downloadmc-38fbec291e5dc24213f5111e9523b35701500189.tar.gz
Add IP protos to OSX
-rw-r--r--libstd/sys-linux.myr13
-rw-r--r--libstd/sys-osx.myr6
2 files changed, 13 insertions, 6 deletions
diff --git a/libstd/sys-linux.myr b/libstd/sys-linux.myr
index 9c487e3..9aa9afc 100644
--- a/libstd/sys-linux.myr
+++ b/libstd/sys-linux.myr
@@ -131,6 +131,13 @@ pkg std =
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
@@ -452,12 +459,6 @@ pkg std =
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)
diff --git a/libstd/sys-osx.myr b/libstd/sys-osx.myr
index b797b40..61f4ec5 100644
--- a/libstd/sys-osx.myr
+++ b/libstd/sys-osx.myr
@@ -143,6 +143,12 @@ pkg std =
const Sockrdm : socktype = 4
const Sockseqpacket : socktype = 5
+ /* 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
/* return value for a failed mapping */
const Mapbad : byte# = -1 castto(byte#)