/* automatically generated by rust-bindgen 0.63.0 */

#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct cap_channel {
    _unused: [u8; 0],
}
pub type cap_channel_t = cap_channel;
extern "C" {
    pub fn cap_channel_flags(chan: *const cap_channel_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn cap_init() -> *mut cap_channel_t;
}
extern "C" {
    pub fn cap_service_open(
        chan: *const cap_channel_t,
        name: *const ::std::os::raw::c_char,
    ) -> *mut cap_channel_t;
}
extern "C" {
    pub fn cap_service_limit(
        chan: *const cap_channel_t,
        names: *const *const ::std::os::raw::c_char,
        nnames: usize,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn cap_wrap(
        sock: ::std::os::raw::c_int,
        flags: ::std::os::raw::c_int,
    ) -> *mut cap_channel_t;
}
extern "C" {
    pub fn cap_unwrap(
        chan: *mut cap_channel_t,
        flags: *mut ::std::os::raw::c_int,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn cap_clone(chan: *const cap_channel_t) -> *mut cap_channel_t;
}
extern "C" {
    pub fn cap_close(chan: *mut cap_channel_t);
}
extern "C" {
    pub fn cap_sock(chan: *const cap_channel_t) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn cap_limit_set(
        chan: *const cap_channel_t,
        limits: *mut nvlist_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn cap_limit_get(
        chan: *const cap_channel_t,
        limitsp: *mut *mut nvlist_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn cap_send_nvlist(
        chan: *const cap_channel_t,
        nvl: *const nvlist_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    pub fn cap_recv_nvlist(chan: *const cap_channel_t) -> *mut nvlist_t;
}
extern "C" {
    pub fn cap_xfer_nvlist(chan: *const cap_channel_t, nvl: *mut nvlist_t) -> *mut nvlist_t;
}
pub type service_limit_func_t = ::std::option::Option<
    unsafe extern "C" fn(arg1: *const nvlist_t, arg2: *const nvlist_t) -> ::std::os::raw::c_int,
>;
pub type service_command_func_t = ::std::option::Option<
    unsafe extern "C" fn(
        cmd: *const ::std::os::raw::c_char,
        arg1: *const nvlist_t,
        arg2: *mut nvlist_t,
        arg3: *mut nvlist_t,
    ) -> ::std::os::raw::c_int,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct casper_service {
    _unused: [u8; 0],
}
extern "C" {
    pub fn service_register(
        name: *const ::std::os::raw::c_char,
        limitfunc: service_limit_func_t,
        commandfunc: service_command_func_t,
        flags: u64,
    ) -> *mut casper_service;
}
