1#[repr(C)]
4#[derive(Debug, Copy, Clone)]
5pub struct cap_channel {
6 _unused: [u8; 0],
7}
8pub type cap_channel_t = cap_channel;
9extern "C" {
10 pub fn cap_channel_flags(chan: *const cap_channel_t) -> ::std::os::raw::c_int;
11}
12extern "C" {
13 pub fn cap_init() -> *mut cap_channel_t;
14}
15extern "C" {
16 pub fn cap_service_open(
17 chan: *const cap_channel_t,
18 name: *const ::std::os::raw::c_char,
19 ) -> *mut cap_channel_t;
20}
21extern "C" {
22 pub fn cap_service_limit(
23 chan: *const cap_channel_t,
24 names: *const *const ::std::os::raw::c_char,
25 nnames: usize,
26 ) -> ::std::os::raw::c_int;
27}
28extern "C" {
29 pub fn cap_wrap(
30 sock: ::std::os::raw::c_int,
31 flags: ::std::os::raw::c_int,
32 ) -> *mut cap_channel_t;
33}
34extern "C" {
35 pub fn cap_unwrap(
36 chan: *mut cap_channel_t,
37 flags: *mut ::std::os::raw::c_int,
38 ) -> ::std::os::raw::c_int;
39}
40extern "C" {
41 pub fn cap_clone(chan: *const cap_channel_t) -> *mut cap_channel_t;
42}
43extern "C" {
44 pub fn cap_close(chan: *mut cap_channel_t);
45}
46extern "C" {
47 pub fn cap_sock(chan: *const cap_channel_t) -> ::std::os::raw::c_int;
48}
49extern "C" {
50 pub fn cap_limit_set(
51 chan: *const cap_channel_t,
52 limits: *mut nvlist_t,
53 ) -> ::std::os::raw::c_int;
54}
55extern "C" {
56 pub fn cap_limit_get(
57 chan: *const cap_channel_t,
58 limitsp: *mut *mut nvlist_t,
59 ) -> ::std::os::raw::c_int;
60}
61extern "C" {
62 pub fn cap_send_nvlist(
63 chan: *const cap_channel_t,
64 nvl: *const nvlist_t,
65 ) -> ::std::os::raw::c_int;
66}
67extern "C" {
68 pub fn cap_recv_nvlist(chan: *const cap_channel_t) -> *mut nvlist_t;
69}
70extern "C" {
71 pub fn cap_xfer_nvlist(chan: *const cap_channel_t, nvl: *mut nvlist_t) -> *mut nvlist_t;
72}
73pub type service_limit_func_t = ::std::option::Option<
74 unsafe extern "C" fn(arg1: *const nvlist_t, arg2: *const nvlist_t) -> ::std::os::raw::c_int,
75>;
76pub type service_command_func_t = ::std::option::Option<
77 unsafe extern "C" fn(
78 cmd: *const ::std::os::raw::c_char,
79 arg1: *const nvlist_t,
80 arg2: *mut nvlist_t,
81 arg3: *mut nvlist_t,
82 ) -> ::std::os::raw::c_int,
83>;
84#[repr(C)]
85#[derive(Debug, Copy, Clone)]
86pub struct casper_service {
87 _unused: [u8; 0],
88}
89extern "C" {
90 pub fn service_register(
91 name: *const ::std::os::raw::c_char,
92 limitfunc: service_limit_func_t,
93 commandfunc: service_command_func_t,
94 flags: u64,
95 ) -> *mut casper_service;
96}