use integrations::osx::ffi::consts::*;
use integrations::osx::ffi::types::*;
use libc::*;
#[repr(C)]
#[derive(Copy, Clone)]
pub union __u6_addr_t {
pub __u6_addr8: [uint8_t; 16],
pub __u6_addr16: [uint16_t; 8],
pub __u6_addr32: [uint32_t; 4],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct inp_depend4_t {
pub inp4_ip_tos: c_uchar,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct inp_depend6_t {
pub inp6_hlim: uint8_t,
pub inp6_cksum: c_int,
pub inp6_ifindex: c_ushort,
pub inp6_hops: c_short,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct in_addr_4in6 {
pub ia46_pad32: [uint32_t; 3],
pub ia46_addr4: in_addr,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union inp_dependfaddr_t {
pub inp46_foreign: in_addr_4in6,
pub inp6_foreign: in6_addr,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union inp_dependladdr_t {
pub inp46_local: in_addr_4in6,
pub inp6_local: in6_addr,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct xinpcb_n {
pub xi_len: uint32_t,
pub xi_kind: uint32_t,
pub xi_inpp: uint64_t,
pub inp_fport: c_ushort,
pub inp_lport: c_ushort,
pub inp_ppcb: uint64_t,
pub inp_gencnt: inp_gen_t,
pub inp_flags: c_int,
pub inp_flow: uint32_t,
pub inp_vflag: c_uchar,
pub inp_ip_ttl: c_uchar,
pub inp_ip_p: c_uchar,
pub inp_dependfaddr: inp_dependfaddr_t,
pub inp_dependladdr: inp_dependladdr_t,
pub inp_depend4: inp_depend4_t,
pub inp_depend6: inp_depend6_t,
pub inp_flowhash: uint32_t,
pub inp_flags2: uint32_t,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct xinpgen {
pub xig_len: uint32_t,
pub xig_count: c_uint,
pub xig_gen: inp_gen_t,
pub xig_sogen: so_gen_t,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct xgen_n {
pub xgn_len: uint32_t,
pub xgn_kind: uint32_t,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct xsocket_n {
pub xso_len: uint32_t,
pub xso_kind: uint32_t,
pub xso_so: uint64_t,
pub so_type: c_short,
pub so_options: uint32_t,
pub so_linger: c_short,
pub so_state: c_short,
pub so_pcb: uint64_t,
pub xso_protocol: c_int,
pub xso_family: c_int,
pub so_qlen: c_short,
pub so_incqlen: c_short,
pub so_qlimit: c_short,
pub so_timeo: c_short,
pub so_error: c_ushort,
pub so_pgid: pid_t,
pub so_oobmark: uint32_t,
pub so_uid: uid_t,
pub so_last_pid: pid_t,
pub so_e_pid: pid_t,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct xsockbuf_n {
pub xsb_len: uint32_t,
pub xsb_kind: uint32_t,
pub sb_cc: uint32_t,
pub sb_hiwat: uint32_t,
pub sb_mbcnt: uint32_t,
pub sb_mbmax: uint32_t,
pub sb_lowat: int32_t,
pub sb_flags: c_short,
pub sb_timeo: c_short,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct xsockstat_n {
pub xst_len: uint32_t,
pub xst_kind: uint32_t,
pub xst_tc_stats: [data_stats; SO_TC_STATS_MAX],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct data_stats {
pub rxpackets: uint64_t,
pub rxbytes: uint64_t,
pub txpackets: uint64_t,
pub txbytes: uint64_t,
}
pub struct xtcpcb_n {
pub xt_len: uint32_t,
pub xt_kind: uint32_t,
pub t_segq: uint64_t,
pub t_dupacks: c_int,
pub t_timer: [c_int; TCPT_NTIMERS_EXT],
pub t_state: c_int,
pub t_flags: c_uint,
pub t_force: c_int,
pub snd_una: tcp_seq,
pub snd_max: tcp_seq,
pub snd_nxt: tcp_seq,
pub snd_up: tcp_seq,
pub snd_wl1: tcp_seq,
pub snd_wl2: tcp_seq,
pub iss: tcp_seq,
pub irs: tcp_seq,
pub rcv_nxt: tcp_seq,
pub rcv_adv: tcp_seq,
pub rcv_wnd: uint32_t,
pub rcv_up: tcp_seq,
pub snd_wnd: uint32_t,
pub snd_cwnd: uint32_t,
pub snd_ssthresh: uint32_t,
pub t_maxopd: c_uint,
pub t_rcvtime: uint32_t,
pub t_starttime: uint32_t,
pub t_rtttime: c_int,
pub t_rtseq: tcp_seq,
pub t_rxtcur: c_int,
pub t_maxseg: c_uint,
pub t_srtt: c_int,
pub t_rttvar: c_int,
pub t_rxtshift: c_int,
pub t_rttmin: c_uint,
pub t_rttupdated: uint32_t,
pub max_sndwnd: uint32_t,
pub t_softerror: c_int,
pub t_oobflags: char,
pub t_iobc: char,
pub snd_scale: c_uchar,
pub rcv_scale: c_uchar,
pub request_r_scale: c_uchar,
pub requested_s_scale: c_uchar,
pub ts_recent: uint32_t,
pub ts_recent_age: uint32_t,
pub last_ack_sent: tcp_seq,
pub cc_send: tcp_cc,
pub cc_recv: tcp_cc,
pub snd_recover: tcp_seq,
pub snd_cwnd_prev: uint32_t,
pub snd_ssthresh_prev: uint32_t,
}