use libc::{c_char, c_int, size_t, timeval};
use super::scamper_addr::ScamperAddrT;
use super::scamper_list::{ScamperListT, ScamperCycleT};
#[repr(C)]
pub struct ScamperTbitT {
_opaque: [u8; 0],
}
#[repr(C)]
pub struct ScamperTbitPktT {
_opaque: [u8; 0],
}
unsafe extern "C" {
pub fn scamper_tbit_tojson(tbit: *const ScamperTbitT, l: *mut size_t) -> *mut c_char;
pub fn scamper_tbit_totext(tbit: *const ScamperTbitT, l: *mut size_t) -> *mut c_char;
pub fn scamper_tbit_free(tbit: *mut ScamperTbitT);
pub fn scamper_tbit_list_get(tbit: *const ScamperTbitT) -> *mut ScamperListT;
pub fn scamper_tbit_cycle_get(tbit: *const ScamperTbitT) -> *mut ScamperCycleT;
pub fn scamper_tbit_userid_get(tbit: *const ScamperTbitT) -> u32;
pub fn scamper_tbit_src_get(tbit: *const ScamperTbitT) -> *mut ScamperAddrT;
pub fn scamper_tbit_dst_get(tbit: *const ScamperTbitT) -> *mut ScamperAddrT;
pub fn scamper_tbit_sport_get(tbit: *const ScamperTbitT) -> u16;
pub fn scamper_tbit_dport_get(tbit: *const ScamperTbitT) -> u16;
pub fn scamper_tbit_start_get(tbit: *const ScamperTbitT) -> *const timeval;
pub fn scamper_tbit_result_tostr(
tbit: *const ScamperTbitT,
buf: *mut c_char,
len: size_t,
) -> *mut c_char;
pub fn scamper_tbit_pkt_get(tbit: *const ScamperTbitT, i: u32) -> *mut ScamperTbitPktT;
pub fn scamper_tbit_pktc_get(tbit: *const ScamperTbitT) -> u32;
pub fn scamper_tbit_type_get(tbit: *const ScamperTbitT) -> u8;
pub fn scamper_tbit_type_tostr(
tbit: *const ScamperTbitT,
buf: *mut c_char,
len: size_t,
) -> *mut c_char;
pub fn scamper_tbit_errmsg_get(tbit: *const ScamperTbitT) -> *const c_char;
pub fn scamper_tbit_app_proto_get(tbit: *const ScamperTbitT) -> u8;
pub fn scamper_tbit_options_get(tbit: *const ScamperTbitT) -> u32;
pub fn scamper_tbit_client_mss_get(tbit: *const ScamperTbitT) -> u16;
pub fn scamper_tbit_client_fo_cookie_get(tbit: *const ScamperTbitT) -> *const u8;
pub fn scamper_tbit_client_fo_cookielen_get(tbit: *const ScamperTbitT) -> u8;
pub fn scamper_tbit_client_wscale_get(tbit: *const ScamperTbitT) -> u8;
pub fn scamper_tbit_client_ipttl_get(tbit: *const ScamperTbitT) -> u8;
pub fn scamper_tbit_client_syn_retx_get(tbit: *const ScamperTbitT) -> u8;
pub fn scamper_tbit_client_dat_retx_get(tbit: *const ScamperTbitT) -> u8;
pub fn scamper_tbit_server_mss_get(tbit: *const ScamperTbitT) -> u16;
pub fn scamper_tbit_server_fo_cookie_get(
tbit: *mut ScamperTbitT,
cookie: *mut u8,
cookie_len: *mut u8,
) -> c_int;
pub fn scamper_tbit_pkt_use(pkt: *mut ScamperTbitPktT) -> *mut ScamperTbitPktT;
pub fn scamper_tbit_pkt_free(pkt: *mut ScamperTbitPktT);
pub fn scamper_tbit_pkt_tv_get(pkt: *const ScamperTbitPktT) -> *const timeval;
pub fn scamper_tbit_pkt_dir_get(pkt: *const ScamperTbitPktT) -> u8;
pub fn scamper_tbit_pkt_len_get(pkt: *const ScamperTbitPktT) -> u16;
pub fn scamper_tbit_pkt_data_get(pkt: *const ScamperTbitPktT) -> *const u8;
}