1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
/* automatically generated by rust-bindgen */

#[repr(C)]
#[derive(Copy)]
pub struct Struct_zmq_msg_t {
    pub unnamed_field1: [i64; 8usize],
}
impl ::std::clone::Clone for Struct_zmq_msg_t {
    fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for Struct_zmq_msg_t {
    fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub type zmq_msg_t = Struct_zmq_msg_t;
pub type zmq_free_fn =
    unsafe extern "C" fn(data: *mut ::std::os::raw::c_void,
                         hint: *mut ::std::os::raw::c_void);
#[repr(C)]
#[derive(Copy)]
pub struct Struct_zmq_pollitem_t {
    pub socket: *mut ::std::os::raw::c_void,
    pub fd: ::std::os::raw::c_int,
    pub events: ::std::os::raw::c_short,
    pub revents: ::std::os::raw::c_short,
}
impl ::std::clone::Clone for Struct_zmq_pollitem_t {
    fn clone(&self) -> Self { *self }
}
impl ::std::default::Default for Struct_zmq_pollitem_t {
    fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
pub type zmq_pollitem_t = Struct_zmq_pollitem_t;
pub enum Struct_iovec { }
pub type zmq_thread_fn =
    unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void);
#[link(name = "zmq")]
extern "C" {
    pub fn zmq_errno() -> ::std::os::raw::c_int;
    pub fn zmq_strerror(errnum: ::std::os::raw::c_int)
     -> *const ::std::os::raw::c_char;
    pub fn zmq_version(major: *mut ::std::os::raw::c_int,
                       minor: *mut ::std::os::raw::c_int,
                       patch: *mut ::std::os::raw::c_int);
    pub fn zmq_ctx_new() -> *mut ::std::os::raw::c_void;
    pub fn zmq_ctx_term(context: *mut ::std::os::raw::c_void)
     -> ::std::os::raw::c_int;
    pub fn zmq_ctx_shutdown(ctx_: *mut ::std::os::raw::c_void)
     -> ::std::os::raw::c_int;
    pub fn zmq_ctx_set(context: *mut ::std::os::raw::c_void,
                       option: ::std::os::raw::c_int,
                       optval: ::std::os::raw::c_int)
     -> ::std::os::raw::c_int;
    pub fn zmq_ctx_get(context: *mut ::std::os::raw::c_void,
                       option: ::std::os::raw::c_int)
     -> ::std::os::raw::c_int;
    pub fn zmq_init(io_threads: ::std::os::raw::c_int)
     -> *mut ::std::os::raw::c_void;
    pub fn zmq_term(context: *mut ::std::os::raw::c_void)
     -> ::std::os::raw::c_int;
    pub fn zmq_ctx_destroy(context: *mut ::std::os::raw::c_void)
     -> ::std::os::raw::c_int;
    pub fn zmq_msg_init(msg: *mut zmq_msg_t) -> ::std::os::raw::c_int;
    pub fn zmq_msg_init_size(msg: *mut zmq_msg_t, size: size_t)
     -> ::std::os::raw::c_int;
    pub fn zmq_msg_init_data(msg: *mut zmq_msg_t,
                             data: *mut ::std::os::raw::c_void, size: size_t,
                             ffn: *mut zmq_free_fn,
                             hint: *mut ::std::os::raw::c_void)
     -> ::std::os::raw::c_int;
    pub fn zmq_msg_send(msg: *mut zmq_msg_t, s: *mut ::std::os::raw::c_void,
                        flags: ::std::os::raw::c_int)
     -> ::std::os::raw::c_int;
    pub fn zmq_msg_recv(msg: *mut zmq_msg_t, s: *mut ::std::os::raw::c_void,
                        flags: ::std::os::raw::c_int)
     -> ::std::os::raw::c_int;
    pub fn zmq_msg_close(msg: *mut zmq_msg_t) -> ::std::os::raw::c_int;
    pub fn zmq_msg_move(dest: *mut zmq_msg_t, src: *mut zmq_msg_t)
     -> ::std::os::raw::c_int;
    pub fn zmq_msg_copy(dest: *mut zmq_msg_t, src: *mut zmq_msg_t)
     -> ::std::os::raw::c_int;
    pub fn zmq_msg_data(msg: *mut zmq_msg_t) -> *mut ::std::os::raw::c_void;
    pub fn zmq_msg_size(msg: *mut zmq_msg_t) -> size_t;
    pub fn zmq_msg_more(msg: *mut zmq_msg_t) -> ::std::os::raw::c_int;
    pub fn zmq_msg_get(msg: *mut zmq_msg_t, property: ::std::os::raw::c_int)
     -> ::std::os::raw::c_int;
    pub fn zmq_msg_set(msg: *mut zmq_msg_t, property: ::std::os::raw::c_int,
                       optval: ::std::os::raw::c_int)
     -> ::std::os::raw::c_int;
    pub fn zmq_msg_gets(msg: *mut zmq_msg_t,
                        property: *const ::std::os::raw::c_char)
     -> *const ::std::os::raw::c_char;
    pub fn zmq_socket(arg1: *mut ::std::os::raw::c_void,
                      _type: ::std::os::raw::c_int)
     -> *mut ::std::os::raw::c_void;
    pub fn zmq_close(s: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int;
    pub fn zmq_setsockopt(s: *mut ::std::os::raw::c_void,
                          option: ::std::os::raw::c_int,
                          optval: *const ::std::os::raw::c_void,
                          optvallen: size_t) -> ::std::os::raw::c_int;
    pub fn zmq_getsockopt(s: *mut ::std::os::raw::c_void,
                          option: ::std::os::raw::c_int,
                          optval: *mut ::std::os::raw::c_void,
                          optvallen: *mut size_t) -> ::std::os::raw::c_int;
    pub fn zmq_bind(s: *mut ::std::os::raw::c_void,
                    addr: *const ::std::os::raw::c_char)
     -> ::std::os::raw::c_int;
    pub fn zmq_connect(s: *mut ::std::os::raw::c_void,
                       addr: *const ::std::os::raw::c_char)
     -> ::std::os::raw::c_int;
    pub fn zmq_unbind(s: *mut ::std::os::raw::c_void,
                      addr: *const ::std::os::raw::c_char)
     -> ::std::os::raw::c_int;
    pub fn zmq_disconnect(s: *mut ::std::os::raw::c_void,
                          addr: *const ::std::os::raw::c_char)
     -> ::std::os::raw::c_int;
    pub fn zmq_send(s: *mut ::std::os::raw::c_void,
                    buf: *const ::std::os::raw::c_void, len: size_t,
                    flags: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
    pub fn zmq_send_const(s: *mut ::std::os::raw::c_void,
                          buf: *const ::std::os::raw::c_void, len: size_t,
                          flags: ::std::os::raw::c_int)
     -> ::std::os::raw::c_int;
    pub fn zmq_recv(s: *mut ::std::os::raw::c_void,
                    buf: *mut ::std::os::raw::c_void, len: size_t,
                    flags: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
    pub fn zmq_socket_monitor(s: *mut ::std::os::raw::c_void,
                              addr: *const ::std::os::raw::c_char,
                              events: ::std::os::raw::c_int)
     -> ::std::os::raw::c_int;
    pub fn zmq_poll(items: *mut zmq_pollitem_t, nitems: ::std::os::raw::c_int,
                    timeout: ::std::os::raw::c_long) -> ::std::os::raw::c_int;
    pub fn zmq_proxy(frontend: *mut ::std::os::raw::c_void,
                     backend: *mut ::std::os::raw::c_void,
                     capture: *mut ::std::os::raw::c_void)
     -> ::std::os::raw::c_int;
    pub fn zmq_proxy_steerable(frontend: *mut ::std::os::raw::c_void,
                               backend: *mut ::std::os::raw::c_void,
                               capture: *mut ::std::os::raw::c_void,
                               control: *mut ::std::os::raw::c_void)
     -> ::std::os::raw::c_int;
    pub fn zmq_has(capability: *const ::std::os::raw::c_char)
     -> ::std::os::raw::c_int;
    pub fn zmq_device(_type: ::std::os::raw::c_int,
                      frontend: *mut ::std::os::raw::c_void,
                      backend: *mut ::std::os::raw::c_void)
     -> ::std::os::raw::c_int;
    pub fn zmq_sendmsg(s: *mut ::std::os::raw::c_void, msg: *mut zmq_msg_t,
                       flags: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
    pub fn zmq_recvmsg(s: *mut ::std::os::raw::c_void, msg: *mut zmq_msg_t,
                       flags: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
    pub fn zmq_z85_encode(dest: *mut ::std::os::raw::c_char,
                          data: *const uint8_t, size: size_t)
     -> *mut ::std::os::raw::c_char;
    pub fn zmq_z85_decode(dest: *mut uint8_t,
                          string: *const ::std::os::raw::c_char)
     -> *mut uint8_t;
    pub fn zmq_curve_keypair(z85_public_key: *mut ::std::os::raw::c_char,
                             z85_secret_key: *mut ::std::os::raw::c_char)
     -> ::std::os::raw::c_int;
    pub fn zmq_sendiov(s: *mut ::std::os::raw::c_void, iov: *mut Struct_iovec,
                       count: size_t, flags: ::std::os::raw::c_int)
     -> ::std::os::raw::c_int;
    pub fn zmq_recviov(s: *mut ::std::os::raw::c_void, iov: *mut Struct_iovec,
                       count: *mut size_t, flags: ::std::os::raw::c_int)
     -> ::std::os::raw::c_int;
    pub fn zmq_stopwatch_start() -> *mut ::std::os::raw::c_void;
    pub fn zmq_stopwatch_stop(watch_: *mut ::std::os::raw::c_void)
     -> ::std::os::raw::c_ulong;
    pub fn zmq_sleep(seconds_: ::std::os::raw::c_int);
    pub fn zmq_threadstart(func: *mut zmq_thread_fn,
                           arg: *mut ::std::os::raw::c_void)
     -> *mut ::std::os::raw::c_void;
    pub fn zmq_threadclose(thread: *mut ::std::os::raw::c_void);
}