summaryrefslogtreecommitdiff
path: root/tests/netinet_in_test.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2017-08-30 16:10:24 -0700
committerElliott Hughes <enh@google.com>2017-12-14 10:07:27 -0800
commit64f355ffbd715a3c8b467c3b37701ad404b566b4 (patch)
tree04e1e9ddac688de976ae427ece327ee1c68afeb5 /tests/netinet_in_test.cpp
parent3ba327198a42eecd2fbc2556d7d0fa41f8d6b17b (diff)
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
Diffstat (limited to 'tests/netinet_in_test.cpp')
-rw-r--r--tests/netinet_in_test.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/netinet_in_test.cpp b/tests/netinet_in_test.cpp
index c0d3bc80a..260608210 100644
--- a/tests/netinet_in_test.cpp
+++ b/tests/netinet_in_test.cpp
@@ -76,3 +76,11 @@ TEST(netinet_in, ntohq_macro) {
UNUSED(le64);
#endif
}
+
+TEST(netinet_in, ip_mreq_source_fields) {
+ // https://issuetracker.google.com/36987220
+ ip_mreq_source mreq;
+ mreq.imr_interface.s_addr = htonl(INADDR_ANY);
+ mreq.imr_multiaddr.s_addr = htonl(INADDR_ANY);
+ mreq.imr_sourceaddr.s_addr = htonl(INADDR_ANY);
+}