Commit 400ea843 authored by Mikio Hara's avatar Mikio Hara Committed by Russ Cox

syscall: add network interface constants for freebsd/386, freebsd/amd64

R=rsc
CC=golang-dev
https://golang.org/cl/4105046
parent 4fd867b2
......@@ -51,6 +51,13 @@ includes_Darwin='
includes_FreeBSD='
#include <sys/wait.h>
#include <sys/event.h>
#include <sys/socket.h>
#include <sys/sockio.h>
#include <net/route.h>
#include <net/if.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/ip_mroute.h>
'
includes='
......
......@@ -130,7 +130,7 @@ const (
EIO = 0x5
EISCONN = 0x38
EISDIR = 0x15
ELAST = 0x5c
ELAST = 0x5d
ELOOP = 0x3e
EMFILE = 0x18
EMLINK = 0x1f
......@@ -155,6 +155,7 @@ const (
ENOSPC = 0x1c
ENOSYS = 0x4e
ENOTBLK = 0xf
ENOTCAPABLE = 0x5d
ENOTCONN = 0x39
ENOTDIR = 0x14
ENOTEMPTY = 0x42
......@@ -190,23 +191,25 @@ const (
EVFILT_AIO = -0x3
EVFILT_FS = -0x9
EVFILT_LIO = -0xa
EVFILT_NETDEV = -0x8
EVFILT_PROC = -0x5
EVFILT_READ = -0x1
EVFILT_SIGNAL = -0x6
EVFILT_SYSCOUNT = 0xa
EVFILT_SYSCOUNT = 0xb
EVFILT_TIMER = -0x7
EVFILT_USER = -0xb
EVFILT_VNODE = -0x4
EVFILT_WRITE = -0x2
EV_ADD = 0x1
EV_CLEAR = 0x20
EV_DELETE = 0x2
EV_DISABLE = 0x8
EV_DISPATCH = 0x80
EV_ENABLE = 0x4
EV_EOF = 0x8000
EV_ERROR = 0x4000
EV_FLAG1 = 0x2000
EV_ONESHOT = 0x10
EV_RECEIPT = 0x40
EV_SYSFLAGS = 0xf000
EWOULDBLOCK = 0x23
EXDEV = 0x12
......@@ -222,7 +225,9 @@ const (
F_OGETLK = 0x7
F_OSETLK = 0x8
F_OSETLKW = 0x9
F_RDAHEAD = 0x10
F_RDLCK = 0x1
F_READAHEAD = 0xf
F_SETFD = 0x2
F_SETFL = 0x4
F_SETLK = 0xc
......@@ -232,6 +237,47 @@ const (
F_UNLCK = 0x2
F_UNLCKSYS = 0x4
F_WRLCK = 0x3
IFF_ALLMULTI = 0x200
IFF_ALTPHYS = 0x4000
IFF_BROADCAST = 0x2
IFF_CANTCHANGE = 0x208f72
IFF_DEBUG = 0x4
IFF_DRV_OACTIVE = 0x400
IFF_DRV_RUNNING = 0x40
IFF_DYING = 0x200000
IFF_LINK0 = 0x1000
IFF_LINK1 = 0x2000
IFF_LINK2 = 0x4000
IFF_LOOPBACK = 0x8
IFF_MONITOR = 0x40000
IFF_MULTICAST = 0x8000
IFF_NOARP = 0x80
IFF_OACTIVE = 0x400
IFF_POINTOPOINT = 0x10
IFF_PPROMISC = 0x20000
IFF_PROMISC = 0x100
IFF_RENAMING = 0x400000
IFF_RUNNING = 0x40
IFF_SIMPLEX = 0x800
IFF_SMART = 0x20
IFF_STATICARP = 0x80000
IFF_UP = 0x1
IFNAMSIZ = 0x10
IN_CLASSA_HOST = 0xffffff
IN_CLASSA_MAX = 0x80
IN_CLASSA_NET = 0xff000000
IN_CLASSA_NSHIFT = 0x18
IN_CLASSB_HOST = 0xffff
IN_CLASSB_MAX = 0x10000
IN_CLASSB_NET = 0xffff0000
IN_CLASSB_NSHIFT = 0x10
IN_CLASSC_HOST = 0xff
IN_CLASSC_NET = 0xffffff00
IN_CLASSC_NSHIFT = 0x8
IN_CLASSD_HOST = 0xfffffff
IN_CLASSD_NET = 0xf0000000
IN_CLASSD_NSHIFT = 0x1c
IN_LOOPBACKNET = 0x7f
IPPROTO_3PC = 0x22
IPPROTO_ADFS = 0x44
IPPROTO_AH = 0x33
......@@ -348,6 +394,7 @@ const (
IPPROTO_XNET = 0xf
IPPROTO_XTP = 0x24
IPV6_AUTOFLOWLABEL = 0x3b
IPV6_BINDANY = 0x40
IPV6_BINDV6ONLY = 0x1b
IPV6_CHECKSUM = 0x1a
IPV6_DEFAULT_MULTICAST_HOPS = 0x1
......@@ -373,6 +420,10 @@ const (
IPV6_MAXHLIM = 0xff
IPV6_MAXOPTHDR = 0x800
IPV6_MAXPACKET = 0xffff
IPV6_MAX_GROUP_SRC_FILTER = 0x200
IPV6_MAX_MEMBERSHIPS = 0xfff
IPV6_MAX_SOCK_SRC_FILTER = 0x80
IPV6_MIN_MEMBERSHIPS = 0x1f
IPV6_MMTU = 0x500
IPV6_MSFILTER = 0x4a
IPV6_MULTICAST_HOPS = 0xa
......@@ -407,6 +458,7 @@ const (
IPV6_VERSION_MASK = 0xf0
IP_ADD_MEMBERSHIP = 0xc
IP_ADD_SOURCE_MEMBERSHIP = 0x46
IP_BINDANY = 0x18
IP_BLOCK_SOURCE = 0x48
IP_DEFAULT_MULTICAST_LOOP = 0x1
IP_DEFAULT_MULTICAST_TTL = 0x1
......@@ -439,7 +491,10 @@ const (
IP_HDRINCL = 0x2
IP_IPSEC_POLICY = 0x15
IP_MAXPACKET = 0xffff
IP_MAX_GROUP_SRC_FILTER = 0x200
IP_MAX_MEMBERSHIPS = 0xfff
IP_MAX_SOCK_MUTE_FILTER = 0x80
IP_MAX_SOCK_SRC_FILTER = 0x80
IP_MAX_SOURCE_FILTER = 0x400
IP_MF = 0x2000
IP_MINTTL = 0x42
......@@ -472,12 +527,27 @@ const (
IP_TOS = 0x3
IP_TTL = 0x4
IP_UNBLOCK_SOURCE = 0x49
MSG_COMPAT = 0x8000
MSG_CTRUNC = 0x20
MSG_DONTROUTE = 0x4
MSG_DONTWAIT = 0x80
MSG_EOF = 0x100
MSG_EOR = 0x8
MSG_NBIO = 0x4000
MSG_NOSIGNAL = 0x20000
MSG_NOTIFICATION = 0x2000
MSG_OOB = 0x1
MSG_PEEK = 0x2
MSG_TRUNC = 0x10
MSG_WAITALL = 0x40
O_ACCMODE = 0x3
O_APPEND = 0x8
O_ASYNC = 0x40
O_CREAT = 0x200
O_DIRECT = 0x10000
O_DIRECTORY = 0x20000
O_EXCL = 0x800
O_EXEC = 0x40000
O_EXLOCK = 0x20
O_FSYNC = 0x80
O_NDELAY = 0x4
......@@ -489,7 +559,12 @@ const (
O_SHLOCK = 0x10
O_SYNC = 0x80
O_TRUNC = 0x400
O_TTY_INIT = 0x80000
O_WRONLY = 0x1
SCM_BINTIME = 0x4
SCM_CREDS = 0x3
SCM_RIGHTS = 0x1
SCM_TIMESTAMP = 0x2
SHUT_RD = 0
SHUT_RDWR = 0x2
SHUT_WR = 0x1
......@@ -527,6 +602,75 @@ const (
SIGWINCH = 0x1c
SIGXCPU = 0x18
SIGXFSZ = 0x19
SIOCADDMULTI = 0x80206931
SIOCADDRT = 0x8030720a
SIOCAIFADDR = 0x8040691a
SIOCAIFGROUP = 0x80246987
SIOCALIFADDR = 0x8118691b
SIOCATMARK = 0x40047307
SIOCDELMULTI = 0x80206932
SIOCDELRT = 0x8030720b
SIOCDIFADDR = 0x80206919
SIOCDIFGROUP = 0x80246989
SIOCDIFPHYADDR = 0x80206949
SIOCDLIFADDR = 0x8118691d
SIOCGDRVSPEC = 0xc01c697b
SIOCGETSGCNT = 0xc0147210
SIOCGETVIFCNT = 0xc014720f
SIOCGHIWAT = 0x40047301
SIOCGIFADDR = 0xc0206921
SIOCGIFBRDADDR = 0xc0206923
SIOCGIFCAP = 0xc020691f
SIOCGIFCONF = 0xc0086924
SIOCGIFDESCR = 0xc020692a
SIOCGIFDSTADDR = 0xc0206922
SIOCGIFFLAGS = 0xc0206911
SIOCGIFGENERIC = 0xc020693a
SIOCGIFGMEMB = 0xc024698a
SIOCGIFGROUP = 0xc0246988
SIOCGIFINDEX = 0xc0206920
SIOCGIFMAC = 0xc0206926
SIOCGIFMEDIA = 0xc0286938
SIOCGIFMETRIC = 0xc0206917
SIOCGIFMTU = 0xc0206933
SIOCGIFNETMASK = 0xc0206925
SIOCGIFPDSTADDR = 0xc0206948
SIOCGIFPHYS = 0xc0206935
SIOCGIFPSRCADDR = 0xc0206947
SIOCGIFSTATUS = 0xc331693b
SIOCGLIFADDR = 0xc118691c
SIOCGLIFPHYADDR = 0xc118694b
SIOCGLOWAT = 0x40047303
SIOCGPGRP = 0x40047309
SIOCGPRIVATE_0 = 0xc0206950
SIOCGPRIVATE_1 = 0xc0206951
SIOCIFCREATE = 0xc020697a
SIOCIFCREATE2 = 0xc020697c
SIOCIFDESTROY = 0x80206979
SIOCIFGCLONERS = 0xc00c6978
SIOCSDRVSPEC = 0x801c697b
SIOCSHIWAT = 0x80047300
SIOCSIFADDR = 0x8020690c
SIOCSIFBRDADDR = 0x80206913
SIOCSIFCAP = 0x8020691e
SIOCSIFDESCR = 0x80206929
SIOCSIFDSTADDR = 0x8020690e
SIOCSIFFLAGS = 0x80206910
SIOCSIFGENERIC = 0x80206939
SIOCSIFLLADDR = 0x8020693c
SIOCSIFMAC = 0x80206927
SIOCSIFMEDIA = 0xc0206937
SIOCSIFMETRIC = 0x80206918
SIOCSIFMTU = 0x80206934
SIOCSIFNAME = 0x80206928
SIOCSIFNETMASK = 0x80206916
SIOCSIFPHYADDR = 0x80406946
SIOCSIFPHYS = 0x80206936
SIOCSIFRVNET = 0xc020695b
SIOCSIFVNET = 0xc020695a
SIOCSLIFPHYADDR = 0x8118694a
SIOCSLOWAT = 0x80047302
SIOCSPGRP = 0x80047308
SOCK_DGRAM = 0x2
SOCK_MAXADDRLEN = 0xff
SOCK_RAW = 0x3
......@@ -687,4 +831,5 @@ var errors = [...]string{
90: "multihop attempted",
91: "link has been severed",
92: "protocol error",
93: "capabilities insufficient",
}
......@@ -130,7 +130,7 @@ const (
EIO = 0x5
EISCONN = 0x38
EISDIR = 0x15
ELAST = 0x5c
ELAST = 0x5d
ELOOP = 0x3e
EMFILE = 0x18
EMLINK = 0x1f
......@@ -155,6 +155,7 @@ const (
ENOSPC = 0x1c
ENOSYS = 0x4e
ENOTBLK = 0xf
ENOTCAPABLE = 0x5d
ENOTCONN = 0x39
ENOTDIR = 0x14
ENOTEMPTY = 0x42
......@@ -190,23 +191,25 @@ const (
EVFILT_AIO = -0x3
EVFILT_FS = -0x9
EVFILT_LIO = -0xa
EVFILT_NETDEV = -0x8
EVFILT_PROC = -0x5
EVFILT_READ = -0x1
EVFILT_SIGNAL = -0x6
EVFILT_SYSCOUNT = 0xa
EVFILT_SYSCOUNT = 0xb
EVFILT_TIMER = -0x7
EVFILT_USER = -0xb
EVFILT_VNODE = -0x4
EVFILT_WRITE = -0x2
EV_ADD = 0x1
EV_CLEAR = 0x20
EV_DELETE = 0x2
EV_DISABLE = 0x8
EV_DISPATCH = 0x80
EV_ENABLE = 0x4
EV_EOF = 0x8000
EV_ERROR = 0x4000
EV_FLAG1 = 0x2000
EV_ONESHOT = 0x10
EV_RECEIPT = 0x40
EV_SYSFLAGS = 0xf000
EWOULDBLOCK = 0x23
EXDEV = 0x12
......@@ -222,7 +225,9 @@ const (
F_OGETLK = 0x7
F_OSETLK = 0x8
F_OSETLKW = 0x9
F_RDAHEAD = 0x10
F_RDLCK = 0x1
F_READAHEAD = 0xf
F_SETFD = 0x2
F_SETFL = 0x4
F_SETLK = 0xc
......@@ -232,6 +237,47 @@ const (
F_UNLCK = 0x2
F_UNLCKSYS = 0x4
F_WRLCK = 0x3
IFF_ALLMULTI = 0x200
IFF_ALTPHYS = 0x4000
IFF_BROADCAST = 0x2
IFF_CANTCHANGE = 0x208f72
IFF_DEBUG = 0x4
IFF_DRV_OACTIVE = 0x400
IFF_DRV_RUNNING = 0x40
IFF_DYING = 0x200000
IFF_LINK0 = 0x1000
IFF_LINK1 = 0x2000
IFF_LINK2 = 0x4000
IFF_LOOPBACK = 0x8
IFF_MONITOR = 0x40000
IFF_MULTICAST = 0x8000
IFF_NOARP = 0x80
IFF_OACTIVE = 0x400
IFF_POINTOPOINT = 0x10
IFF_PPROMISC = 0x20000
IFF_PROMISC = 0x100
IFF_RENAMING = 0x400000
IFF_RUNNING = 0x40
IFF_SIMPLEX = 0x800
IFF_SMART = 0x20
IFF_STATICARP = 0x80000
IFF_UP = 0x1
IFNAMSIZ = 0x10
IN_CLASSA_HOST = 0xffffff
IN_CLASSA_MAX = 0x80
IN_CLASSA_NET = 0xff000000
IN_CLASSA_NSHIFT = 0x18
IN_CLASSB_HOST = 0xffff
IN_CLASSB_MAX = 0x10000
IN_CLASSB_NET = 0xffff0000
IN_CLASSB_NSHIFT = 0x10
IN_CLASSC_HOST = 0xff
IN_CLASSC_NET = 0xffffff00
IN_CLASSC_NSHIFT = 0x8
IN_CLASSD_HOST = 0xfffffff
IN_CLASSD_NET = 0xf0000000
IN_CLASSD_NSHIFT = 0x1c
IN_LOOPBACKNET = 0x7f
IPPROTO_3PC = 0x22
IPPROTO_ADFS = 0x44
IPPROTO_AH = 0x33
......@@ -420,11 +466,13 @@ const (
IP_DONTFRAG = 0x43
IP_DROP_MEMBERSHIP = 0xd
IP_DROP_SOURCE_MEMBERSHIP = 0x47
IP_DUMMYNET3 = 0x31
IP_DUMMYNET_CONFIGURE = 0x3c
IP_DUMMYNET_DEL = 0x3d
IP_DUMMYNET_FLUSH = 0x3e
IP_DUMMYNET_GET = 0x40
IP_FAITH = 0x16
IP_FW3 = 0x30
IP_FW_ADD = 0x32
IP_FW_DEL = 0x33
IP_FW_FLUSH = 0x34
......@@ -479,6 +527,19 @@ const (
IP_TOS = 0x3
IP_TTL = 0x4
IP_UNBLOCK_SOURCE = 0x49
MSG_COMPAT = 0x8000
MSG_CTRUNC = 0x20
MSG_DONTROUTE = 0x4
MSG_DONTWAIT = 0x80
MSG_EOF = 0x100
MSG_EOR = 0x8
MSG_NBIO = 0x4000
MSG_NOSIGNAL = 0x20000
MSG_NOTIFICATION = 0x2000
MSG_OOB = 0x1
MSG_PEEK = 0x2
MSG_TRUNC = 0x10
MSG_WAITALL = 0x40
O_ACCMODE = 0x3
O_APPEND = 0x8
O_ASYNC = 0x40
......@@ -500,6 +561,10 @@ const (
O_TRUNC = 0x400
O_TTY_INIT = 0x80000
O_WRONLY = 0x1
SCM_BINTIME = 0x4
SCM_CREDS = 0x3
SCM_RIGHTS = 0x1
SCM_TIMESTAMP = 0x2
SHUT_RD = 0
SHUT_RDWR = 0x2
SHUT_WR = 0x1
......@@ -537,6 +602,76 @@ const (
SIGWINCH = 0x1c
SIGXCPU = 0x18
SIGXFSZ = 0x19
SIOCADDMULTI = 0x80206931
SIOCADDRT = 0x8040720a
SIOCAIFADDR = 0x8040691a
SIOCAIFGROUP = 0x80286987
SIOCALIFADDR = 0x8118691b
SIOCATMARK = 0x40047307
SIOCDELMULTI = 0x80206932
SIOCDELRT = 0x8040720b
SIOCDIFADDR = 0x80206919
SIOCDIFGROUP = 0x80286989
SIOCDIFPHYADDR = 0x80206949
SIOCDLIFADDR = 0x8118691d
SIOCGDRVSPEC = 0xc028697b
SIOCGETSGCNT = 0xc0207210
SIOCGETVIFCNT = 0xc028720f
SIOCGHIWAT = 0x40047301
SIOCGIFADDR = 0xc0206921
SIOCGIFBRDADDR = 0xc0206923
SIOCGIFCAP = 0xc020691f
SIOCGIFCONF = 0xc0106924
SIOCGIFCONF32 = 0xc0086924
SIOCGIFDESCR = 0xc020692a
SIOCGIFDSTADDR = 0xc0206922
SIOCGIFFLAGS = 0xc0206911
SIOCGIFGENERIC = 0xc020693a
SIOCGIFGMEMB = 0xc028698a
SIOCGIFGROUP = 0xc0286988
SIOCGIFINDEX = 0xc0206920
SIOCGIFMAC = 0xc0206926
SIOCGIFMEDIA = 0xc0306938
SIOCGIFMETRIC = 0xc0206917
SIOCGIFMTU = 0xc0206933
SIOCGIFNETMASK = 0xc0206925
SIOCGIFPDSTADDR = 0xc0206948
SIOCGIFPHYS = 0xc0206935
SIOCGIFPSRCADDR = 0xc0206947
SIOCGIFSTATUS = 0xc331693b
SIOCGLIFADDR = 0xc118691c
SIOCGLIFPHYADDR = 0xc118694b
SIOCGLOWAT = 0x40047303
SIOCGPGRP = 0x40047309
SIOCGPRIVATE_0 = 0xc0206950
SIOCGPRIVATE_1 = 0xc0206951
SIOCIFCREATE = 0xc020697a
SIOCIFCREATE2 = 0xc020697c
SIOCIFDESTROY = 0x80206979
SIOCIFGCLONERS = 0xc0106978
SIOCSDRVSPEC = 0x8028697b
SIOCSHIWAT = 0x80047300
SIOCSIFADDR = 0x8020690c
SIOCSIFBRDADDR = 0x80206913
SIOCSIFCAP = 0x8020691e
SIOCSIFDESCR = 0x80206929
SIOCSIFDSTADDR = 0x8020690e
SIOCSIFFLAGS = 0x80206910
SIOCSIFGENERIC = 0x80206939
SIOCSIFLLADDR = 0x8020693c
SIOCSIFMAC = 0x80206927
SIOCSIFMEDIA = 0xc0206937
SIOCSIFMETRIC = 0x80206918
SIOCSIFMTU = 0x80206934
SIOCSIFNAME = 0x80206928
SIOCSIFNETMASK = 0x80206916
SIOCSIFPHYADDR = 0x80406946
SIOCSIFPHYS = 0x80206936
SIOCSIFRVNET = 0xc020695b
SIOCSIFVNET = 0xc020695a
SIOCSLIFPHYADDR = 0x8118694a
SIOCSLOWAT = 0x80047302
SIOCSPGRP = 0x80047308
SOCK_DGRAM = 0x2
SOCK_MAXADDRLEN = 0xff
SOCK_RAW = 0x3
......@@ -697,4 +832,5 @@ var errors = [...]string{
90: "multihop attempted",
91: "link has been severed",
92: "protocol error",
93: "capabilities insufficient",
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment