Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PF_ROUTE-related structures on Apple systems #3206

Merged
merged 1 commit into from May 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
74 changes: 74 additions & 0 deletions src/unix/bsd/apple/mod.rs
Expand Up @@ -435,6 +435,80 @@ s! {
pub ifm_data: if_data,
}

pub struct ifa_msghdr {
pub ifam_msglen: ::c_ushort,
pub ifam_version: ::c_uchar,
pub ifam_type: ::c_uchar,
pub ifam_addrs: ::c_int,
pub ifam_flags: ::c_int,
pub ifam_index: ::c_ushort,
pub ifam_metric: ::c_int,
}

pub struct ifma_msghdr {
pub ifmam_msglen: ::c_ushort,
pub ifmam_version: ::c_uchar,
pub ifmam_type: ::c_uchar,
pub ifmam_addrs: ::c_int,
pub ifmam_flags: ::c_int,
pub ifmam_index: ::c_ushort,
}

pub struct ifma_msghdr2 {
pub ifmam_msglen: ::c_ushort,
pub ifmam_version: ::c_uchar,
pub ifmam_type: ::c_uchar,
pub ifmam_addrs: ::c_int,
pub ifmam_flags: ::c_int,
pub ifmam_index: ::c_ushort,
pub ifmam_refcount: i32,
}

pub struct rt_metrics {
pub rmx_locks: u32,
pub rmx_mtu: u32,
pub rmx_hopcount: u32,
pub rmx_expire: i32,
pub rmx_recvpipe: u32,
pub rmx_sendpipe: u32,
pub rmx_ssthresh: u32,
pub rmx_rtt: u32,
pub rmx_rttvar: u32,
pub rmx_pksent: u32,
pub rmx_state: u32,
pub rmx_filler: [u32; 3],
}

pub struct rt_msghdr {
pub rtm_msglen: ::c_ushort,
pub rtm_version: ::c_uchar,
pub rtm_type: ::c_uchar,
pub rtm_index: ::c_ushort,
pub rtm_flags: ::c_int,
pub rtm_addrs: ::c_int,
pub rtm_pid: ::pid_t,
pub rtm_seq: ::c_int,
pub rtm_errno: ::c_int,
pub rtm_use: ::c_int,
pub rtm_inits: u32,
pub rtm_rmx: rt_metrics,
}

pub struct rt_msghdr2 {
pub rtm_msglen: ::c_ushort,
pub rtm_version: ::c_uchar,
pub rtm_type: ::c_uchar,
pub rtm_index: ::c_ushort,
pub rtm_flags: ::c_int,
pub rtm_addrs: ::c_int,
pub rtm_refcnt: i32,
pub rtm_parentflags: ::c_int,
pub rtm_reserved: ::c_int,
pub rtm_use: ::c_int,
pub rtm_inits: u32,
pub rtm_rmx: rt_metrics,
}

pub struct termios {
pub c_iflag: ::tcflag_t,
pub c_oflag: ::tcflag_t,
Expand Down