Commit f65464c
committed
linux-user: netlink: Add emulation of IP_MULTICAST_IF
Add IP_MULTICAST_IF and share the code with IP_ADD_MEMBERSHIP / IP_DROP_MEMBERSHIP.
Sharing the code makes sense, because the manpage of ip(7) says:
IP_MULTICAST_IF (since Linux 1.2)
Set the local device for a multicast socket. The argument
for setsockopt(2) is an ip_mreqn or (since Linux 3.5)
ip_mreq structure similar to IP_ADD_MEMBERSHIP, or an
in_addr structure. (The kernel determines which structure
is being passed based on the size passed in optlen.) For
getsockopt(2), the argument is an in_addr structure.
Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>1 parent 017fc66 commit f65464c
1 file changed
+14
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2130 | 2130 | | |
2131 | 2131 | | |
2132 | 2132 | | |
| 2133 | + | |
2133 | 2134 | | |
2134 | 2135 | | |
2135 | 2136 | | |
2136 | 2137 | | |
2137 | 2138 | | |
| 2139 | + | |
2138 | 2140 | | |
2139 | 2141 | | |
2140 | 2142 | | |
2141 | 2143 | | |
2142 | | - | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
| 2147 | + | |
| 2148 | + | |
| 2149 | + | |
2143 | 2150 | | |
2144 | 2151 | | |
2145 | 2152 | | |
| |||
2149 | 2156 | | |
2150 | 2157 | | |
2151 | 2158 | | |
2152 | | - | |
2153 | | - | |
2154 | | - | |
2155 | | - | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
2156 | 2165 | | |
2157 | 2166 | | |
2158 | | - | |
2159 | 2167 | | |
2160 | 2168 | | |
2161 | 2169 | | |
| |||
0 commit comments