darwin: add in6_aliasreq, ifaliasreq structs
Open
Nobody has claimed this yet.
C-API-request
- Dominant language
- Rust
- Stars
- 2.6k
- Forks
- 1.3k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 69
Description
Structs such as in6_aliasreq, ifaliasreq are missing in libc. We should consider adding them.
Custom bindings that I use right now.
#[allow(non_camel_case_types)]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct in6_aliasreq {
pub ifra_name: [c_char; IFNAMSIZ],
pub ifra_addr: sockaddr_in6,
pub ifra_dstaddr: sockaddr_in6,
pub ifra_prefixmask: sockaddr_in6,
pub ifra_flags: c_int,
pub ifra_lifetime: in6_addrlifetime,
}
#[allow(non_camel_case_types)]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ifaliasreq {
pub ifra_name: [c_char; IFNAMSIZ],
pub ifra_addr: sockaddr,
pub ifra_broadaddr: sockaddr,
pub ifra_mask: sockaddr,
}
Contributor 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.
Research direction
Compare the XNU definitions in bsd/netinet6/in6_var.h and bsd/net/if.h with the custom Rust bindings shown in the issue, then inspect the existing Darwin libc bindings for placement and conventions. Done means both structs are exposed with the required C-compatible fields and types, with the relevant bindings checks passing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100