ref: 36602462ba2673c18227116a4a91d0230570a0af
parent: 626035e375b738a533179c07fbffb516121514b5
author: Ori Bernstein <[email protected]>
date: Wed Jun 18 06:57:04 EDT 2014
Add IP protos to OSX
--- a/libstd/sys-linux.myr
+++ b/libstd/sys-linux.myr
@@ -131,6 +131,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 +458,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)
--- a/libstd/sys-osx.myr
+++ b/libstd/sys-osx.myr
@@ -143,6 +143,12 @@
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#)