Use in_addr in ip_mreq_source and ip_msfilter.
This adds a new mechanism to say "replace struct S with #include <bits/S.h>".
Also switch epoll_event over to the new mechanism.
Also use the kernel's struct sockaddr_storage directly rather than behind
an unnecessary #define.
This patch also removes some dead code in the header scrubber. This code
still needs rewriting completely. I learned that a "block" isn't necessarily
a single struct definition, say; it might be a run of them. It seems like
a block is a run of preprocessor directives or a run of regular code.
Bug: https://issuetracker.google.com/36987220
Test: new test
Change-Id: Ic6a5c09559766a4babe3cd4c3ea538b885e07308
diff --git a/libc/kernel/uapi/linux/if.h b/libc/kernel/uapi/linux/if.h
index d815ef8..15de690 100644
--- a/libc/kernel/uapi/linux/if.h
+++ b/libc/kernel/uapi/linux/if.h
@@ -31,10 +31,27 @@
#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 || __UAPI_DEF_IF_NET_DEVICE_FLAGS != 0
enum net_device_flags {
#if __UAPI_DEF_IF_NET_DEVICE_FLAGS
- IFF_UP = 1 << 0, IFF_BROADCAST = 1 << 1, IFF_DEBUG = 1 << 2, IFF_LOOPBACK = 1 << 3, IFF_POINTOPOINT = 1 << 4, IFF_NOTRAILERS = 1 << 5, IFF_RUNNING = 1 << 6, IFF_NOARP = 1 << 7, IFF_PROMISC = 1 << 8, IFF_ALLMULTI = 1 << 9, IFF_MASTER = 1 << 10, IFF_SLAVE = 1 << 11, IFF_MULTICAST = 1 << 12, IFF_PORTSEL = 1 << 13, IFF_AUTOMEDIA = 1 << 14, IFF_DYNAMIC = 1 << 15,
+ IFF_UP = 1 << 0,
+ IFF_BROADCAST = 1 << 1,
+ IFF_DEBUG = 1 << 2,
+ IFF_LOOPBACK = 1 << 3,
+ IFF_POINTOPOINT = 1 << 4,
+ IFF_NOTRAILERS = 1 << 5,
+ IFF_RUNNING = 1 << 6,
+ IFF_NOARP = 1 << 7,
+ IFF_PROMISC = 1 << 8,
+ IFF_ALLMULTI = 1 << 9,
+ IFF_MASTER = 1 << 10,
+ IFF_SLAVE = 1 << 11,
+ IFF_MULTICAST = 1 << 12,
+ IFF_PORTSEL = 1 << 13,
+ IFF_AUTOMEDIA = 1 << 14,
+ IFF_DYNAMIC = 1 << 15,
#endif
#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO
- IFF_LOWER_UP = 1 << 16, IFF_DORMANT = 1 << 17, IFF_ECHO = 1 << 18,
+ IFF_LOWER_UP = 1 << 16,
+ IFF_DORMANT = 1 << 17,
+ IFF_ECHO = 1 << 18,
#endif
};
#endif