Set Socket interface using interface index
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- rust
- Domain
- networking
Research direction
Start by reading sockets2's set_multicast_if_v4 function and compare its address-based behavior with the C setsockopt call using ip_mreqn shown in the issue. Done means sockets2 provides a way to select the IPv4 multicast interface by index, with behavior covered by the relevant tests.
Written by the indexing model from the issue text.
Description
In C, one can set a socket's interface using setsockopt(socket, SOL_IP, IP_MULTICAST_IF, &mreqn, sizeof(mreqn)) where mreqn is
struct ip_mreqn {
struct in_addr imr_multiaddr; /* IP multicast group address */
struct in_addr imr_address; /* IP address of local interface */
int imr_ifindex; /* interface index */
};
sockets2 offers the set_multicast_if_v4 function, but only accepts an address as parameter. I would like to set the interface using sockets2 based on an interface index.
- Dominant language
- Rust
- Stars
- 885
- Forks
- 328
- Avg merge
- 6d 12h
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rust-lang/socket2
-
Commit lockfileOpen
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
rust-lang/socket2#703 · 1 comment ·
Maintainers usually reply within 1 day
-
windows-sys 0.101.0Possibly taken @xtqqczze claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
SockAddr::path_len doesn't bound the length by sun_path: as_pathname panics since #691, as_abstract_namespace slices past itPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
`from_timeval` overflows on a non-normalised `tv_usec`Possibly taken @pederbe claimed this 18 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Build fails on 32-bit glibc (i686, armv7) with libc's `--cfg=libc_unstable_time64`: `tv_usec` is cast to `suseconds_t` (i32) for an i64 fieldPossibly taken @omrzk claimed this 28 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
rust-lang/socket2#684 · 1 comment ·
Maintainers usually reply within 1 day
All issues in rust-lang/socket2
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
infra
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
available bug good first issue tooling
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Nixitov/Riptide-Native#817 ·
Maintainers usually reply within 1 day