aboutsummaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@google.com>2016-11-28 16:11:15 +0100
committerAndrey Konovalov <andreyknvl@google.com>2016-11-29 16:39:02 +0100
commit86917cc3a79ef74eb06748dc964988f48e6b66a1 (patch)
tree8a693c0b1098299c5d67af9634f4ea340dfd3c7e /sys
parent4278c63e64234425ea1655e3207d85b627fc17f2 (diff)
sys: move in_addr description to templates
Diffstat (limited to 'sys')
-rw-r--r--sys/decl.go1
-rw-r--r--sys/sys.txt46
2 files changed, 29 insertions, 18 deletions
diff --git a/sys/decl.go b/sys/decl.go
index 0533c3770..65dcf4fb5 100644
--- a/sys/decl.go
+++ b/sys/decl.go
@@ -206,7 +206,6 @@ type IntKind int
const (
IntPlain IntKind = iota
IntSignalno
- IntInaddr
IntFileoff // offset within a file
IntRange
)
diff --git a/sys/sys.txt b/sys/sys.txt
index 76920b37e..6e0edada6 100644
--- a/sys/sys.txt
+++ b/sys/sys.txt
@@ -962,7 +962,7 @@ xfrm_userpolicy_info {
xfrm_user_tmpl {
id xfrm_id
fam int16
- saddr in_addr_any
+ saddr xfrm_in_addr
reqid int32
mode int8
share int8
@@ -973,8 +973,8 @@ xfrm_user_tmpl {
}
xfrm_selector {
- daddr in_addr_any
- saddr in_addr_any
+ daddr xfrm_in_addr
+ saddr xfrm_in_addr
dport proc[int16be, 20000, 4]
dmask int16
sport proc[int16be, 20000, 4]
@@ -1006,28 +1006,40 @@ xfrm_lifetime_cur {
}
xfrm_id {
- daddr in_addr_any
+ daddr xfrm_in_addr
spi int32
proto int8
}
-# in_addr or in6_addr
-# prog knows about this struct
-in_addr_any {
- a0 in_addr
- a1 int32
- a2 int32
- a3 int32
+xfrm_in_addr [
+ in in_addr
+ in6 in6_addr
+]
+
+in_addr [
+# 0.0.0.0
+ empty const[0x00000000, int32be]
+# 127.0.0.1
+ loopback const[0x7f000001, int32be]
+# 255.255.255.255
+ broadcast const[0xffffffff, int32be]
+}
+
+in6_addr_empty {
+ a0 const[0, int64be]
+ a1 const[0, int64be]
}
-# prog knows about this struct
-in6_addr {
- a0 int32
- a1 int32
- a2 int32
- a3 int32
+in6_addr_loopback {
+ a0 const[0, int64be]
+ a1 const[1, int64be]
}
+in6_addr [
+ empty in6_addr_empty
+ loopback in6_addr_loopback
+]
+
ipv6_mreq {
multi in6_addr
ifindex int32