/* automatically generated by rust-bindgen */

#[repr(C)]
#[derive(Copy)]
pub struct Struct_zmq_msg_t {
    pub unnamed_field1: [::std::os::raw::c_uchar; 64usize],
}
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);
}
