go.net/ipv4: add platform-dependent code
The syscall package of standard library is now locked down
and go.sys/unix is under curation. Also go.sys/unix doesn't
help supporting go1.3 and earlier users. There's no way to
extend this package without holding the platform adaptation
code.
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/146740043
diff --git a/ipv4/zsys_dragonfly.go b/ipv4/zsys_dragonfly.go
new file mode 100644
index 0000000..2c15bf4
--- /dev/null
+++ b/ipv4/zsys_dragonfly.go
@@ -0,0 +1,31 @@
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs defs_dragonfly.go
+
+package ipv4
+
+const (
+ sysIP_OPTIONS = 0x1
+ sysIP_HDRINCL = 0x2
+ sysIP_TOS = 0x3
+ sysIP_TTL = 0x4
+ sysIP_RECVOPTS = 0x5
+ sysIP_RECVRETOPTS = 0x6
+ sysIP_RECVDSTADDR = 0x7
+ sysIP_RETOPTS = 0x8
+ sysIP_RECVIF = 0x14
+ sysIP_RECVTTL = 0x41
+
+ sysIP_MULTICAST_IF = 0x9
+ sysIP_MULTICAST_TTL = 0xa
+ sysIP_MULTICAST_LOOP = 0xb
+ sysIP_MULTICAST_VIF = 0xe
+ sysIP_ADD_MEMBERSHIP = 0xc
+ sysIP_DROP_MEMBERSHIP = 0xd
+
+ sysSizeofIPMreq = 0x8
+)
+
+type sysIPMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}