aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/socket_pppox.txt
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-03-02 16:28:00 +0100
committerDmitry Vyukov <dvyukov@google.com>2018-03-05 12:10:27 +0100
commitf027f1a3f7c45bafd7f99776548ef73ba3cc22ec (patch)
treea004cfeb34c34ae36ef5b2dbfd65f7947c980c61 /sys/linux/socket_pppox.txt
parent002cecf2022de3ab01c87f905477aa3b063d73fc (diff)
sys/linux: use size attributes on structs
1. Add size attribte on sockaddr. 2. Remove sockaddr's that are larger than 16 bytes from sockaddr. 3. Add size attribute on sockaddr_storage which wasn't actually 128 bytes. 4. Add size attribute to ifreq. 5. Fix ifmap field types as uncovered by the size attributes. 6. Fix sockaddr_storage_tcp from struct to union which is should be. 7. Make sockaddr_un_file fixed size as it should be. 8. Fix some explicit paddings that were only correct for 64 bits.
Diffstat (limited to 'sys/linux/socket_pppox.txt')
-rw-r--r--sys/linux/socket_pppox.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/linux/socket_pppox.txt b/sys/linux/socket_pppox.txt
index 3fd0cac5f..eeda7bf39 100644
--- a/sys/linux/socket_pppox.txt
+++ b/sys/linux/socket_pppox.txt
@@ -44,11 +44,13 @@ ioctl$PPPIOCSFLAGS(fd sock_pppox, cmd const[PPPIOCSFLAGS], arg ptr[in, flags[ppp
ioctl$PPPIOCGMRU(fd sock_pppox, cmd const[PPPIOCGMRU], arg ptr[out, int32])
ioctl$PPPIOCSMRU(fd sock_pppox, cmd const[PPPIOCSMRU], arg ptr[in, int32])
+define SOCKADDR_PPPOX_SIZE sizeof(struct sockaddr_pppox)
+
sockaddr_pppoe {
sa_family const[AF_PPPOX, int16]
sa_protocol const[PX_PROTO_OE, int32]
pppoe pppoe_addr
-} [packed]
+} [packed, size[SOCKADDR_PPPOX_SIZE]]
pppoe_addr {
sid sid_t
@@ -118,9 +120,7 @@ sockaddr_pptp {
sa_family const[AF_PPPOX, int16]
sa_protocol const[PX_PROTO_PPTP, int32]
pptp pptp_addr
-# To account for pppoe field in the union.
- pad array[const[0, int8], 18]
-} [packed]
+} [packed, size[SOCKADDR_PPPOX_SIZE]]
pptp_addr {
call_id pptp_call_id