Dmitry V. Levin
7bee462a64
* configure.ac (AC_CHECK_FUNCS): Add inet_pton. * net.c (print_mreq, print_mreq6): New functions. (print_setsockopt): Use them to decode IP_ADD_MEMBERSHIP, IP_DROP_MEMBERSHIP, IPV6_ADD_MEMBERSHIP, IPV6_DROP_MEMBERSHIP, IPV6_JOIN_ANYCAST, and IPV6_LEAVE_ANYCAST. * tests/ip_mreq.c: New file. * tests/ip_mreq.expected: Likewise. * tests/ip_mreq.test: New test. * tests/Makefile.am (check_PROGRAMS): Add ip_mreq. (TESTS): Add ip_mreq.test. (EXTRA_DIST): ip_mreq.expected. * tests/.gitignore: Add ip_mreq. Based on patch by Ben Noordhuis <info@bnoordhuis.nl>.
12 lines
157 B
Bash
Executable File
12 lines
157 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Check {IP,IPV6}_{ADD,DROP}_MEMBERSHIP setsockopt decoding.
|
|
|
|
. "${srcdir=.}/init.sh"
|
|
|
|
run_prog
|
|
run_strace -e setsockopt $args
|
|
match_grep
|
|
|
|
exit 0
|