1b2732e9dSimaromvoid zmq_version(int *major, int *minor, int *patch);
2b2732e9dSimarom
3b2732e9dSimaromvoid* zmq_socket(void *context, int type);
4b2732e9dSimaromint zmq_close(void *socket);
5b2732e9dSimarom
6b2732e9dSimaromint zmq_bind(void *socket, const char *endpoint);
7b2732e9dSimaromint zmq_connect(void *socket, const char *endpoint);
8b2732e9dSimarom
9b2732e9dSimaromint zmq_errno(void);
10b2732e9dSimaromconst char * zmq_strerror(int errnum);
11b2732e9dSimarom
12b2732e9dSimaromvoid* zmq_stopwatch_start(void);
13b2732e9dSimaromunsigned long zmq_stopwatch_stop(void *watch);
14b2732e9dSimaromvoid zmq_sleep(int seconds_);
15b2732e9dSimaromint zmq_device(int device, void *frontend, void *backend);
16b2732e9dSimarom
17b2732e9dSimaromint zmq_unbind(void *socket, const char *endpoint);
18b2732e9dSimaromint zmq_disconnect(void *socket, const char *endpoint);
19b2732e9dSimaromvoid* zmq_ctx_new();
20b2732e9dSimaromint zmq_ctx_destroy(void *context);
21b2732e9dSimaromint zmq_ctx_get(void *context, int opt);
22b2732e9dSimaromint zmq_ctx_set(void *context, int opt, int optval);
23b2732e9dSimaromint zmq_proxy(void *frontend, void *backend, void *capture);
24b2732e9dSimaromint zmq_socket_monitor(void *socket, const char *addr, int events);
25b2732e9dSimarom
26b2732e9dSimaromint zmq_curve_keypair (char *z85_public_key, char *z85_secret_key);
27b2732e9dSimaromint zmq_has (const char *capability);
28b2732e9dSimarom
29b2732e9dSimaromtypedef struct { ...; } zmq_msg_t;
30b2732e9dSimaromtypedef ... zmq_free_fn;
31b2732e9dSimarom
32b2732e9dSimaromint zmq_msg_init(zmq_msg_t *msg);
33b2732e9dSimaromint zmq_msg_init_size(zmq_msg_t *msg, size_t size);
34b2732e9dSimaromint zmq_msg_init_data(zmq_msg_t *msg,
35b2732e9dSimarom                      void *data,
36b2732e9dSimarom                      size_t size,
37b2732e9dSimarom                      zmq_free_fn *ffn,
38b2732e9dSimarom                      void *hint);
39b2732e9dSimarom
40b2732e9dSimaromsize_t zmq_msg_size(zmq_msg_t *msg);
41b2732e9dSimaromvoid *zmq_msg_data(zmq_msg_t *msg);
42b2732e9dSimaromint zmq_msg_close(zmq_msg_t *msg);
43b2732e9dSimarom
44b2732e9dSimaromint zmq_msg_send(zmq_msg_t *msg, void *socket, int flags);
45b2732e9dSimaromint zmq_msg_recv(zmq_msg_t *msg, void *socket, int flags);
46b2732e9dSimarom
47b2732e9dSimaromint zmq_getsockopt(void *socket,
48b2732e9dSimarom                   int option_name,
49b2732e9dSimarom                   void *option_value,
50b2732e9dSimarom                   size_t *option_len);
51b2732e9dSimarom
52b2732e9dSimaromint zmq_setsockopt(void *socket,
53b2732e9dSimarom                   int option_name,
54b2732e9dSimarom                   const void *option_value,
55b2732e9dSimarom                   size_t option_len);
56b2732e9dSimaromtypedef struct
57b2732e9dSimarom{
58b2732e9dSimarom    void *socket;
59b2732e9dSimarom    int fd;
60b2732e9dSimarom    short events;
61b2732e9dSimarom    short revents;
62b2732e9dSimarom} zmq_pollitem_t;
63b2732e9dSimarom
64b2732e9dSimaromint zmq_poll(zmq_pollitem_t *items, int nitems, long timeout);
65b2732e9dSimarom
66b2732e9dSimarom// miscellany
67b2732e9dSimaromvoid * memcpy(void *restrict s1, const void *restrict s2, size_t n);
68b2732e9dSimaromint get_ipc_path_max_len(void);
69