zmq-sys-0.11.0/.gitignore010064400017500001750000000000111277132650200134220ustar0000000000000000/target/ zmq-sys-0.11.0/Cargo.toml.orig010064400017500001750000000011211354140202600143140ustar0000000000000000[package] name = "zmq-sys" version = "0.11.0" authors = [ "a.rottmann@gmx.at", "erick.tryzelaar@gmail.com", ] license = "MIT/Apache-2.0" description = "Low-level bindings to the zeromq library" keywords = ["ffi", "bindings"] categories = ["external-ffi-bindings"] repository = "https://github.com/erickt/rust-zmq" build = "build/main.rs" links = "zmq" [features] # Build libzmq from source. vendored = ['zeromq-src'] [dependencies] libc = "0.2.15" [build-dependencies] metadeps = "1" zeromq-src = { version = "0.1.7", optional = true } [package.metadata.pkg-config] libzmq = "4.1" zmq-sys-0.11.0/Cargo.toml0000644000000021230000000000000105710ustar00# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're # editing this file be aware that the upstream Cargo.toml # will likely look very different (and much more reasonable) [package] name = "zmq-sys" version = "0.11.0" authors = ["a.rottmann@gmx.at", "erick.tryzelaar@gmail.com"] build = "build/main.rs" links = "zmq" description = "Low-level bindings to the zeromq library" keywords = ["ffi", "bindings"] categories = ["external-ffi-bindings"] license = "MIT/Apache-2.0" repository = "https://github.com/erickt/rust-zmq" [package.metadata.pkg-config] libzmq = "4.1" [dependencies.libc] version = "0.2.15" [build-dependencies.metadeps] version = "1" [build-dependencies.zeromq-src] version = "0.1.7" optional = true [features] vendored = ["zeromq-src"] zmq-sys-0.11.0/LICENSE-APACHE010064400017500001750000000251371277132650200133760ustar0000000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. zmq-sys-0.11.0/LICENSE-MIT010064400017500001750000000020501277132650200130730ustar0000000000000000Copyright (c) 2011-2014 Erick Tryzelaar Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. zmq-sys-0.11.0/build/main.rs010064400017500001750000000002461347400165600140360ustar0000000000000000#[cfg_attr(feature = "vendored", path = "vendored.rs")] #[cfg_attr(not(feature = "vendored"), path = "pkg_config.rs")] mod find; fn main() { find::configure() } zmq-sys-0.11.0/build/pkg_config.rs010064400017500001750000000020201354137150100152020ustar0000000000000000use std::{env, path::Path}; fn prefix_dir(env_name: &str, dir: &str) -> Option { env::var(env_name).ok().or_else(|| { env::var("LIBZMQ_PREFIX") .ok() .map(|prefix| Path::new(&prefix).join(dir)) .and_then(|path| path.to_str().map(|p| p.to_owned())) }) } pub fn configure() { let lib_path = prefix_dir("LIBZMQ_LIB_DIR", "lib"); let include = prefix_dir("LIBZMQ_INCLUDE_DIR", "include"); match (lib_path, include) { (Some(lib_path), Some(include)) => { println!("cargo:rustc-link-lib=zmq"); println!("cargo:rustc-link-search=native={}", lib_path); println!("cargo:include={}", include); } (Some(_), None) => panic!("Unable to locate libzmq include directory."), (None, Some(_)) => panic!("Unable to locate libzmq library directory."), (None, None) => { if let Err(e) = metadeps::probe() { panic!("Unable to locate libzmq:\n{}", e); } } } } zmq-sys-0.11.0/build/vendored.rs010064400017500001750000000005301354137237500147200ustar0000000000000000use std::env; pub fn configure() { println!("cargo:rerun-if-changed=build/main.rs"); println!("cargo:rerun-if-env-changed=PROFILE"); let wants_debug = env::var("PROFILE").unwrap() == "debug"; let artifacts = zeromq_src::Build::new().link_static(true).build_debug(wants_debug).build(); artifacts.print_cargo_metadata(); } zmq-sys-0.11.0/src/errno.rs010064400017500001750000000053111354137150100137170ustar0000000000000000#[cfg(unix)] use libc as errno; #[cfg(windows)] use windows::errno; const ZMQ_HAUSNUMERO: i32 = 156_384_712; pub const EACCES: i32 = errno::EACCES; pub const EADDRINUSE: i32 = errno::EADDRINUSE; pub const EAGAIN: i32 = errno::EAGAIN; pub const EBUSY: i32 = errno::EBUSY; pub const ECONNREFUSED: i32 = errno::ECONNREFUSED; pub const EFAULT: i32 = errno::EFAULT; pub const EINTR: i32 = errno::EINTR; pub const EHOSTUNREACH: i32 = errno::EHOSTUNREACH; pub const EINPROGRESS: i32 = errno::EINPROGRESS; pub const EINVAL: i32 = errno::EINVAL; pub const EMFILE: i32 = errno::EMFILE; pub const EMSGSIZE: i32 = errno::EMSGSIZE; pub const ENAMETOOLONG: i32 = errno::ENAMETOOLONG; pub const ENODEV: i32 = errno::ENODEV; pub const ENOENT: i32 = errno::ENOENT; pub const ENOMEM: i32 = errno::ENOMEM; pub const ENOTCONN: i32 = errno::ENOTCONN; pub const ENOTSOCK: i32 = errno::ENOTSOCK; pub const EPROTO: i32 = errno::EPROTO; pub const EPROTONOSUPPORT: i32 = errno::EPROTONOSUPPORT; pub const ENOTSUP: i32 = errno::ENOTSUP; pub const ENOBUFS: i32 = errno::ENOBUFS; pub const ENETDOWN: i32 = errno::ENETDOWN; pub const EADDRNOTAVAIL: i32 = errno::EADDRNOTAVAIL; // native zmq error codes pub const EFSM: i32 = (ZMQ_HAUSNUMERO + 51); pub const ENOCOMPATPROTO: i32 = (ZMQ_HAUSNUMERO + 52); pub const ETERM: i32 = (ZMQ_HAUSNUMERO + 53); pub const EMTHREAD: i32 = (ZMQ_HAUSNUMERO + 54); // These may be returned by libzmq if the target platform does not define these // errno codes. pub const ENOTSUP_ALT: i32 = (ZMQ_HAUSNUMERO + 1); pub const EPROTONOSUPPORT_ALT: i32 = (ZMQ_HAUSNUMERO + 2); pub const ENOBUFS_ALT: i32 = (ZMQ_HAUSNUMERO + 3); pub const ENETDOWN_ALT: i32 = (ZMQ_HAUSNUMERO + 4); pub const EADDRINUSE_ALT: i32 = (ZMQ_HAUSNUMERO + 5); pub const EADDRNOTAVAIL_ALT: i32 = (ZMQ_HAUSNUMERO + 6); pub const ECONNREFUSED_ALT: i32 = (ZMQ_HAUSNUMERO + 7); pub const EINPROGRESS_ALT: i32 = (ZMQ_HAUSNUMERO + 8); pub const ENOTSOCK_ALT: i32 = (ZMQ_HAUSNUMERO + 9); pub const EMSGSIZE_ALT: i32 = (ZMQ_HAUSNUMERO + 10); pub const EAFNOSUPPORT_ALT: i32 = (ZMQ_HAUSNUMERO + 11); pub const ENETUNREACH_ALT: i32 = (ZMQ_HAUSNUMERO + 12); pub const ECONNABORTED_ALT: i32 = (ZMQ_HAUSNUMERO + 13); pub const ECONNRESET_ALT: i32 = (ZMQ_HAUSNUMERO + 14); pub const ENOTCONN_ALT: i32 = (ZMQ_HAUSNUMERO + 15); pub const ETIMEDOUT_ALT: i32 = (ZMQ_HAUSNUMERO + 16); pub const EHOSTUNREACH_ALT: i32 = (ZMQ_HAUSNUMERO + 17); pub const ENETRESET_ALT: i32 = (ZMQ_HAUSNUMERO + 18); zmq-sys-0.11.0/src/ffi.rs010064400017500001750000000505271354137150100133470ustar0000000000000000/* automatically generated by rust-bindgen */ pub const ZMQ_VERSION_MAJOR: u32 = 4; pub const ZMQ_VERSION_MINOR: u32 = 3; pub const ZMQ_VERSION_PATCH: u32 = 1; pub const ZMQ_DEFINED_STDINT: u32 = 1; pub const ZMQ_HAUSNUMERO: u32 = 156384712; pub const ZMQ_IO_THREADS: u32 = 1; pub const ZMQ_MAX_SOCKETS: u32 = 2; pub const ZMQ_SOCKET_LIMIT: u32 = 3; pub const ZMQ_THREAD_PRIORITY: u32 = 3; pub const ZMQ_THREAD_SCHED_POLICY: u32 = 4; pub const ZMQ_MAX_MSGSZ: u32 = 5; pub const ZMQ_MSG_T_SIZE: u32 = 6; pub const ZMQ_THREAD_AFFINITY_CPU_ADD: u32 = 7; pub const ZMQ_THREAD_AFFINITY_CPU_REMOVE: u32 = 8; pub const ZMQ_THREAD_NAME_PREFIX: u32 = 9; pub const ZMQ_IO_THREADS_DFLT: u32 = 1; pub const ZMQ_MAX_SOCKETS_DFLT: u32 = 1023; pub const ZMQ_THREAD_PRIORITY_DFLT: i32 = -1; pub const ZMQ_THREAD_SCHED_POLICY_DFLT: i32 = -1; pub const ZMQ_PAIR: u32 = 0; pub const ZMQ_PUB: u32 = 1; pub const ZMQ_SUB: u32 = 2; pub const ZMQ_REQ: u32 = 3; pub const ZMQ_REP: u32 = 4; pub const ZMQ_DEALER: u32 = 5; pub const ZMQ_ROUTER: u32 = 6; pub const ZMQ_PULL: u32 = 7; pub const ZMQ_PUSH: u32 = 8; pub const ZMQ_XPUB: u32 = 9; pub const ZMQ_XSUB: u32 = 10; pub const ZMQ_STREAM: u32 = 11; pub const ZMQ_XREQ: u32 = 5; pub const ZMQ_XREP: u32 = 6; pub const ZMQ_AFFINITY: u32 = 4; pub const ZMQ_ROUTING_ID: u32 = 5; pub const ZMQ_SUBSCRIBE: u32 = 6; pub const ZMQ_UNSUBSCRIBE: u32 = 7; pub const ZMQ_RATE: u32 = 8; pub const ZMQ_RECOVERY_IVL: u32 = 9; pub const ZMQ_SNDBUF: u32 = 11; pub const ZMQ_RCVBUF: u32 = 12; pub const ZMQ_RCVMORE: u32 = 13; pub const ZMQ_FD: u32 = 14; pub const ZMQ_EVENTS: u32 = 15; pub const ZMQ_TYPE: u32 = 16; pub const ZMQ_LINGER: u32 = 17; pub const ZMQ_RECONNECT_IVL: u32 = 18; pub const ZMQ_BACKLOG: u32 = 19; pub const ZMQ_RECONNECT_IVL_MAX: u32 = 21; pub const ZMQ_MAXMSGSIZE: u32 = 22; pub const ZMQ_SNDHWM: u32 = 23; pub const ZMQ_RCVHWM: u32 = 24; pub const ZMQ_MULTICAST_HOPS: u32 = 25; pub const ZMQ_RCVTIMEO: u32 = 27; pub const ZMQ_SNDTIMEO: u32 = 28; pub const ZMQ_LAST_ENDPOINT: u32 = 32; pub const ZMQ_ROUTER_MANDATORY: u32 = 33; pub const ZMQ_TCP_KEEPALIVE: u32 = 34; pub const ZMQ_TCP_KEEPALIVE_CNT: u32 = 35; pub const ZMQ_TCP_KEEPALIVE_IDLE: u32 = 36; pub const ZMQ_TCP_KEEPALIVE_INTVL: u32 = 37; pub const ZMQ_IMMEDIATE: u32 = 39; pub const ZMQ_XPUB_VERBOSE: u32 = 40; pub const ZMQ_ROUTER_RAW: u32 = 41; pub const ZMQ_IPV6: u32 = 42; pub const ZMQ_MECHANISM: u32 = 43; pub const ZMQ_PLAIN_SERVER: u32 = 44; pub const ZMQ_PLAIN_USERNAME: u32 = 45; pub const ZMQ_PLAIN_PASSWORD: u32 = 46; pub const ZMQ_CURVE_SERVER: u32 = 47; pub const ZMQ_CURVE_PUBLICKEY: u32 = 48; pub const ZMQ_CURVE_SECRETKEY: u32 = 49; pub const ZMQ_CURVE_SERVERKEY: u32 = 50; pub const ZMQ_PROBE_ROUTER: u32 = 51; pub const ZMQ_REQ_CORRELATE: u32 = 52; pub const ZMQ_REQ_RELAXED: u32 = 53; pub const ZMQ_CONFLATE: u32 = 54; pub const ZMQ_ZAP_DOMAIN: u32 = 55; pub const ZMQ_ROUTER_HANDOVER: u32 = 56; pub const ZMQ_TOS: u32 = 57; pub const ZMQ_CONNECT_ROUTING_ID: u32 = 61; pub const ZMQ_GSSAPI_SERVER: u32 = 62; pub const ZMQ_GSSAPI_PRINCIPAL: u32 = 63; pub const ZMQ_GSSAPI_SERVICE_PRINCIPAL: u32 = 64; pub const ZMQ_GSSAPI_PLAINTEXT: u32 = 65; pub const ZMQ_HANDSHAKE_IVL: u32 = 66; pub const ZMQ_SOCKS_PROXY: u32 = 68; pub const ZMQ_XPUB_NODROP: u32 = 69; pub const ZMQ_BLOCKY: u32 = 70; pub const ZMQ_XPUB_MANUAL: u32 = 71; pub const ZMQ_XPUB_WELCOME_MSG: u32 = 72; pub const ZMQ_STREAM_NOTIFY: u32 = 73; pub const ZMQ_INVERT_MATCHING: u32 = 74; pub const ZMQ_HEARTBEAT_IVL: u32 = 75; pub const ZMQ_HEARTBEAT_TTL: u32 = 76; pub const ZMQ_HEARTBEAT_TIMEOUT: u32 = 77; pub const ZMQ_XPUB_VERBOSER: u32 = 78; pub const ZMQ_CONNECT_TIMEOUT: u32 = 79; pub const ZMQ_TCP_MAXRT: u32 = 80; pub const ZMQ_THREAD_SAFE: u32 = 81; pub const ZMQ_MULTICAST_MAXTPDU: u32 = 84; pub const ZMQ_VMCI_BUFFER_SIZE: u32 = 85; pub const ZMQ_VMCI_BUFFER_MIN_SIZE: u32 = 86; pub const ZMQ_VMCI_BUFFER_MAX_SIZE: u32 = 87; pub const ZMQ_VMCI_CONNECT_TIMEOUT: u32 = 88; pub const ZMQ_USE_FD: u32 = 89; pub const ZMQ_GSSAPI_PRINCIPAL_NAMETYPE: u32 = 90; pub const ZMQ_GSSAPI_SERVICE_PRINCIPAL_NAMETYPE: u32 = 91; pub const ZMQ_BINDTODEVICE: u32 = 92; pub const ZMQ_MORE: u32 = 1; pub const ZMQ_SHARED: u32 = 3; pub const ZMQ_DONTWAIT: u32 = 1; pub const ZMQ_SNDMORE: u32 = 2; pub const ZMQ_NULL: u32 = 0; pub const ZMQ_PLAIN: u32 = 1; pub const ZMQ_CURVE: u32 = 2; pub const ZMQ_GSSAPI: u32 = 3; pub const ZMQ_GROUP_MAX_LENGTH: u32 = 15; pub const ZMQ_IDENTITY: u32 = 5; pub const ZMQ_CONNECT_RID: u32 = 61; pub const ZMQ_TCP_ACCEPT_FILTER: u32 = 38; pub const ZMQ_IPC_FILTER_PID: u32 = 58; pub const ZMQ_IPC_FILTER_UID: u32 = 59; pub const ZMQ_IPC_FILTER_GID: u32 = 60; pub const ZMQ_IPV4ONLY: u32 = 31; pub const ZMQ_DELAY_ATTACH_ON_CONNECT: u32 = 39; pub const ZMQ_NOBLOCK: u32 = 1; pub const ZMQ_FAIL_UNROUTABLE: u32 = 33; pub const ZMQ_ROUTER_BEHAVIOR: u32 = 33; pub const ZMQ_SRCFD: u32 = 2; pub const ZMQ_GSSAPI_NT_HOSTBASED: u32 = 0; pub const ZMQ_GSSAPI_NT_USER_NAME: u32 = 1; pub const ZMQ_GSSAPI_NT_KRB5_PRINCIPAL: u32 = 2; pub const ZMQ_EVENT_CONNECTED: u32 = 1; pub const ZMQ_EVENT_CONNECT_DELAYED: u32 = 2; pub const ZMQ_EVENT_CONNECT_RETRIED: u32 = 4; pub const ZMQ_EVENT_LISTENING: u32 = 8; pub const ZMQ_EVENT_BIND_FAILED: u32 = 16; pub const ZMQ_EVENT_ACCEPTED: u32 = 32; pub const ZMQ_EVENT_ACCEPT_FAILED: u32 = 64; pub const ZMQ_EVENT_CLOSED: u32 = 128; pub const ZMQ_EVENT_CLOSE_FAILED: u32 = 256; pub const ZMQ_EVENT_DISCONNECTED: u32 = 512; pub const ZMQ_EVENT_MONITOR_STOPPED: u32 = 1024; pub const ZMQ_EVENT_ALL: u32 = 65535; pub const ZMQ_EVENT_HANDSHAKE_FAILED_NO_DETAIL: u32 = 2048; pub const ZMQ_EVENT_HANDSHAKE_SUCCEEDED: u32 = 4096; pub const ZMQ_EVENT_HANDSHAKE_FAILED_PROTOCOL: u32 = 8192; pub const ZMQ_EVENT_HANDSHAKE_FAILED_AUTH: u32 = 16384; pub const ZMQ_PROTOCOL_ERROR_ZMTP_UNSPECIFIED: u32 = 268435456; pub const ZMQ_PROTOCOL_ERROR_ZMTP_UNEXPECTED_COMMAND: u32 = 268435457; pub const ZMQ_PROTOCOL_ERROR_ZMTP_INVALID_SEQUENCE: u32 = 268435458; pub const ZMQ_PROTOCOL_ERROR_ZMTP_KEY_EXCHANGE: u32 = 268435459; pub const ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_UNSPECIFIED: u32 = 268435473; pub const ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_MESSAGE: u32 = 268435474; pub const ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_HELLO: u32 = 268435475; pub const ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_INITIATE: u32 = 268435476; pub const ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_ERROR: u32 = 268435477; pub const ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_READY: u32 = 268435478; pub const ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_WELCOME: u32 = 268435479; pub const ZMQ_PROTOCOL_ERROR_ZMTP_INVALID_METADATA: u32 = 268435480; pub const ZMQ_PROTOCOL_ERROR_ZMTP_CRYPTOGRAPHIC: u32 = 285212673; pub const ZMQ_PROTOCOL_ERROR_ZMTP_MECHANISM_MISMATCH: u32 = 285212674; pub const ZMQ_PROTOCOL_ERROR_ZAP_UNSPECIFIED: u32 = 536870912; pub const ZMQ_PROTOCOL_ERROR_ZAP_MALFORMED_REPLY: u32 = 536870913; pub const ZMQ_PROTOCOL_ERROR_ZAP_BAD_REQUEST_ID: u32 = 536870914; pub const ZMQ_PROTOCOL_ERROR_ZAP_BAD_VERSION: u32 = 536870915; pub const ZMQ_PROTOCOL_ERROR_ZAP_INVALID_STATUS_CODE: u32 = 536870916; pub const ZMQ_PROTOCOL_ERROR_ZAP_INVALID_METADATA: u32 = 536870917; pub const ZMQ_POLLIN: u32 = 1; pub const ZMQ_POLLOUT: u32 = 2; pub const ZMQ_POLLERR: u32 = 4; pub const ZMQ_POLLPRI: u32 = 8; pub const ZMQ_POLLITEMS_DFLT: u32 = 16; pub const ZMQ_HAS_CAPABILITIES: u32 = 1; pub const ZMQ_STREAMER: u32 = 1; pub const ZMQ_FORWARDER: u32 = 2; pub const ZMQ_QUEUE: u32 = 3; pub type __uint8_t = ::std::os::raw::c_uchar; extern "C" { pub fn zmq_errno() -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_strerror(errnum_: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char; } extern "C" { 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, ); } extern "C" { pub fn zmq_ctx_new() -> *mut ::std::os::raw::c_void; } extern "C" { pub fn zmq_ctx_term(context_: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_ctx_shutdown(context_: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int; } extern "C" { 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; } extern "C" { pub fn zmq_ctx_get( context_: *mut ::std::os::raw::c_void, option_: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_init(io_threads_: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_void; } extern "C" { pub fn zmq_term(context_: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_ctx_destroy(context_: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int; } #[repr(C)] #[repr(align(8))] #[derive(Copy, Clone)] pub struct zmq_msg_t { pub __: [::std::os::raw::c_uchar; 64usize], } #[test] fn bindgen_test_layout_zmq_msg_t() { assert_eq!( ::std::mem::size_of::(), 64usize, concat!("Size of: ", stringify!(zmq_msg_t)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(zmq_msg_t)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).__ as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(zmq_msg_t), "::", stringify!(__) ) ); } impl Default for zmq_msg_t { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } pub type zmq_free_fn = ::std::option::Option< unsafe extern "C" fn(data_: *mut ::std::os::raw::c_void, hint_: *mut ::std::os::raw::c_void), >; extern "C" { pub fn zmq_msg_init(msg_: *mut zmq_msg_t) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_msg_init_size(msg_: *mut zmq_msg_t, size_: usize) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_msg_init_data( msg_: *mut zmq_msg_t, data_: *mut ::std::os::raw::c_void, size_: usize, ffn_: zmq_free_fn, hint_: *mut ::std::os::raw::c_void, ) -> ::std::os::raw::c_int; } extern "C" { 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; } extern "C" { 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; } extern "C" { pub fn zmq_msg_close(msg_: *mut zmq_msg_t) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_msg_move(dest_: *mut zmq_msg_t, src_: *mut zmq_msg_t) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_msg_copy(dest_: *mut zmq_msg_t, src_: *mut zmq_msg_t) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_msg_data(msg_: *mut zmq_msg_t) -> *mut ::std::os::raw::c_void; } extern "C" { pub fn zmq_msg_size(msg_: *const zmq_msg_t) -> usize; } extern "C" { pub fn zmq_msg_more(msg_: *const zmq_msg_t) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_msg_get( msg_: *const zmq_msg_t, property_: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { 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; } extern "C" { pub fn zmq_msg_gets( msg_: *const zmq_msg_t, property_: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } extern "C" { pub fn zmq_socket( arg1: *mut ::std::os::raw::c_void, type_: ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_void; } extern "C" { pub fn zmq_close(s_: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int; } extern "C" { 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_: usize, ) -> ::std::os::raw::c_int; } extern "C" { 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 usize, ) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_bind( s_: *mut ::std::os::raw::c_void, addr_: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_connect( s_: *mut ::std::os::raw::c_void, addr_: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_unbind( s_: *mut ::std::os::raw::c_void, addr_: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_disconnect( s_: *mut ::std::os::raw::c_void, addr_: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_send( s_: *mut ::std::os::raw::c_void, buf_: *const ::std::os::raw::c_void, len_: usize, flags_: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_send_const( s_: *mut ::std::os::raw::c_void, buf_: *const ::std::os::raw::c_void, len_: usize, flags_: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_recv( s_: *mut ::std::os::raw::c_void, buf_: *mut ::std::os::raw::c_void, len_: usize, flags_: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { 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; } #[repr(C)] #[derive(Debug, Copy, Clone)] pub 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, } #[test] fn bindgen_test_layout_zmq_pollitem_t() { assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(zmq_pollitem_t)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(zmq_pollitem_t)) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).socket as *const _ as usize }, 0usize, concat!( "Offset of field: ", stringify!(zmq_pollitem_t), "::", stringify!(socket) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).fd as *const _ as usize }, 8usize, concat!( "Offset of field: ", stringify!(zmq_pollitem_t), "::", stringify!(fd) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).events as *const _ as usize }, 12usize, concat!( "Offset of field: ", stringify!(zmq_pollitem_t), "::", stringify!(events) ) ); assert_eq!( unsafe { &(*(::std::ptr::null::())).revents as *const _ as usize }, 14usize, concat!( "Offset of field: ", stringify!(zmq_pollitem_t), "::", stringify!(revents) ) ); } impl Default for zmq_pollitem_t { fn default() -> Self { unsafe { ::std::mem::zeroed() } } } extern "C" { 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; } extern "C" { 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; } extern "C" { 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; } extern "C" { pub fn zmq_has(capability_: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } extern "C" { 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; } extern "C" { 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; } extern "C" { 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; } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct iovec { _unused: [u8; 0], } extern "C" { pub fn zmq_sendiov( s_: *mut ::std::os::raw::c_void, iov_: *mut iovec, count_: usize, flags_: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_recviov( s_: *mut ::std::os::raw::c_void, iov_: *mut iovec, count_: *mut usize, flags_: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_z85_encode( dest_: *mut ::std::os::raw::c_char, data_: *const u8, size_: usize, ) -> *mut ::std::os::raw::c_char; } extern "C" { pub fn zmq_z85_decode(dest_: *mut u8, string_: *const ::std::os::raw::c_char) -> *mut u8; } extern "C" { 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; } extern "C" { pub fn zmq_curve_public( z85_public_key_: *mut ::std::os::raw::c_char, z85_secret_key_: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_atomic_counter_new() -> *mut ::std::os::raw::c_void; } extern "C" { pub fn zmq_atomic_counter_set( counter_: *mut ::std::os::raw::c_void, value_: ::std::os::raw::c_int, ); } extern "C" { pub fn zmq_atomic_counter_inc(counter_: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_atomic_counter_dec(counter_: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_atomic_counter_value(counter_: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_atomic_counter_destroy(counter_p_: *mut *mut ::std::os::raw::c_void); } pub type zmq_timer_fn = ::std::option::Option< unsafe extern "C" fn(timer_id: ::std::os::raw::c_int, arg: *mut ::std::os::raw::c_void), >; extern "C" { pub fn zmq_timers_new() -> *mut ::std::os::raw::c_void; } extern "C" { pub fn zmq_timers_destroy(timers_p: *mut *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_timers_add( timers: *mut ::std::os::raw::c_void, interval: usize, handler: zmq_timer_fn, arg: *mut ::std::os::raw::c_void, ) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_timers_cancel( timers: *mut ::std::os::raw::c_void, timer_id: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_timers_set_interval( timers: *mut ::std::os::raw::c_void, timer_id: ::std::os::raw::c_int, interval: usize, ) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_timers_reset( timers: *mut ::std::os::raw::c_void, timer_id: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_timers_timeout(timers: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_long; } extern "C" { pub fn zmq_timers_execute(timers: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int; } extern "C" { pub fn zmq_stopwatch_start() -> *mut ::std::os::raw::c_void; } extern "C" { pub fn zmq_stopwatch_intermediate( watch_: *mut ::std::os::raw::c_void, ) -> ::std::os::raw::c_ulong; } extern "C" { pub fn zmq_stopwatch_stop(watch_: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_ulong; } extern "C" { pub fn zmq_sleep(seconds_: ::std::os::raw::c_int); } pub type zmq_thread_fn = ::std::option::Option; extern "C" { pub fn zmq_threadstart( func_: zmq_thread_fn, arg_: *mut ::std::os::raw::c_void, ) -> *mut ::std::os::raw::c_void; } extern "C" { pub fn zmq_threadclose(thread_: *mut ::std::os::raw::c_void); } zmq-sys-0.11.0/src/lib.rs010064400017500001750000000136771354137150100133560ustar0000000000000000extern crate libc; #[cfg(unix)] mod unix; #[cfg(unix)] pub use crate::unix::RawFd; #[cfg(windows)] mod windows; #[cfg(windows)] pub use windows::RawFd; pub mod errno; pub use crate::ffi::{ // These are the non-deprecated constants defined in zmq.h. Note that this // list exceeds what is defined by the current minimum required version of // libzmq, but is instead based on the latest stable release. The idea here // is to expose newer API, when it is still compatible with the ABI defined // by the libzmq library. For example, using new socket options will just // result in a runtime error when used with an older libzmq, but // ABI-compatible libzmq, which does not know about them. ZMQ_HAUSNUMERO, ZMQ_IO_THREADS, ZMQ_MAX_SOCKETS, ZMQ_SOCKET_LIMIT, ZMQ_THREAD_PRIORITY, ZMQ_THREAD_SCHED_POLICY, ZMQ_MAX_MSGSZ, ZMQ_MSG_T_SIZE, ZMQ_THREAD_AFFINITY_CPU_ADD, ZMQ_THREAD_AFFINITY_CPU_REMOVE, ZMQ_THREAD_NAME_PREFIX, ZMQ_IO_THREADS_DFLT, ZMQ_MAX_SOCKETS_DFLT, ZMQ_THREAD_PRIORITY_DFLT, ZMQ_THREAD_SCHED_POLICY_DFLT, ZMQ_PAIR, ZMQ_PUB, ZMQ_SUB, ZMQ_REQ, ZMQ_REP, ZMQ_DEALER, ZMQ_ROUTER, ZMQ_PULL, ZMQ_PUSH, ZMQ_XPUB, ZMQ_XSUB, ZMQ_STREAM, ZMQ_AFFINITY, ZMQ_ROUTING_ID, ZMQ_SUBSCRIBE, ZMQ_UNSUBSCRIBE, ZMQ_RATE, ZMQ_RECOVERY_IVL, ZMQ_SNDBUF, ZMQ_RCVBUF, ZMQ_RCVMORE, ZMQ_FD, ZMQ_EVENTS, ZMQ_TYPE, ZMQ_LINGER, ZMQ_RECONNECT_IVL, ZMQ_BACKLOG, ZMQ_RECONNECT_IVL_MAX, ZMQ_MAXMSGSIZE, ZMQ_SNDHWM, ZMQ_RCVHWM, ZMQ_MULTICAST_HOPS, ZMQ_RCVTIMEO, ZMQ_SNDTIMEO, ZMQ_LAST_ENDPOINT, ZMQ_ROUTER_MANDATORY, ZMQ_TCP_KEEPALIVE, ZMQ_TCP_KEEPALIVE_CNT, ZMQ_TCP_KEEPALIVE_IDLE, ZMQ_TCP_KEEPALIVE_INTVL, ZMQ_IMMEDIATE, ZMQ_XPUB_VERBOSE, ZMQ_ROUTER_RAW, ZMQ_IPV6, ZMQ_MECHANISM, ZMQ_PLAIN_SERVER, ZMQ_PLAIN_USERNAME, ZMQ_PLAIN_PASSWORD, ZMQ_CURVE_SERVER, ZMQ_CURVE_PUBLICKEY, ZMQ_CURVE_SECRETKEY, ZMQ_CURVE_SERVERKEY, ZMQ_PROBE_ROUTER, ZMQ_REQ_CORRELATE, ZMQ_REQ_RELAXED, ZMQ_CONFLATE, ZMQ_ZAP_DOMAIN, ZMQ_ROUTER_HANDOVER, ZMQ_TOS, ZMQ_CONNECT_ROUTING_ID, ZMQ_GSSAPI_SERVER, ZMQ_GSSAPI_PRINCIPAL, ZMQ_GSSAPI_SERVICE_PRINCIPAL, ZMQ_GSSAPI_PLAINTEXT, ZMQ_HANDSHAKE_IVL, ZMQ_SOCKS_PROXY, ZMQ_XPUB_NODROP, ZMQ_BLOCKY, ZMQ_XPUB_MANUAL, ZMQ_XPUB_WELCOME_MSG, ZMQ_STREAM_NOTIFY, ZMQ_INVERT_MATCHING, ZMQ_HEARTBEAT_IVL, ZMQ_HEARTBEAT_TTL, ZMQ_HEARTBEAT_TIMEOUT, ZMQ_XPUB_VERBOSER, ZMQ_CONNECT_TIMEOUT, ZMQ_TCP_MAXRT, ZMQ_THREAD_SAFE, ZMQ_MULTICAST_MAXTPDU, ZMQ_VMCI_BUFFER_SIZE, ZMQ_VMCI_BUFFER_MIN_SIZE, ZMQ_VMCI_BUFFER_MAX_SIZE, ZMQ_VMCI_CONNECT_TIMEOUT, ZMQ_USE_FD, ZMQ_GSSAPI_PRINCIPAL_NAMETYPE, ZMQ_GSSAPI_SERVICE_PRINCIPAL_NAMETYPE, ZMQ_BINDTODEVICE, ZMQ_MORE, ZMQ_SHARED, ZMQ_DONTWAIT, ZMQ_SNDMORE, ZMQ_NULL, ZMQ_PLAIN, ZMQ_CURVE, ZMQ_GSSAPI, ZMQ_GROUP_MAX_LENGTH, ZMQ_EVENT_CONNECTED, ZMQ_EVENT_CONNECT_DELAYED, ZMQ_EVENT_CONNECT_RETRIED, ZMQ_EVENT_LISTENING, ZMQ_EVENT_BIND_FAILED, ZMQ_EVENT_ACCEPTED, ZMQ_EVENT_ACCEPT_FAILED, ZMQ_EVENT_CLOSED, ZMQ_EVENT_CLOSE_FAILED, ZMQ_EVENT_DISCONNECTED, ZMQ_EVENT_MONITOR_STOPPED, ZMQ_EVENT_ALL, ZMQ_EVENT_HANDSHAKE_FAILED_NO_DETAIL, ZMQ_EVENT_HANDSHAKE_SUCCEEDED, ZMQ_EVENT_HANDSHAKE_FAILED_PROTOCOL, ZMQ_EVENT_HANDSHAKE_FAILED_AUTH, ZMQ_PROTOCOL_ERROR_ZMTP_UNSPECIFIED, ZMQ_PROTOCOL_ERROR_ZMTP_UNEXPECTED_COMMAND, ZMQ_PROTOCOL_ERROR_ZMTP_INVALID_SEQUENCE, ZMQ_PROTOCOL_ERROR_ZMTP_KEY_EXCHANGE, ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_UNSPECIFIED, ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_MESSAGE, ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_HELLO, ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_INITIATE, ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_ERROR, ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_READY, ZMQ_PROTOCOL_ERROR_ZMTP_MALFORMED_COMMAND_WELCOME, ZMQ_PROTOCOL_ERROR_ZMTP_INVALID_METADATA, ZMQ_PROTOCOL_ERROR_ZMTP_CRYPTOGRAPHIC, ZMQ_PROTOCOL_ERROR_ZMTP_MECHANISM_MISMATCH, ZMQ_PROTOCOL_ERROR_ZAP_UNSPECIFIED, ZMQ_PROTOCOL_ERROR_ZAP_MALFORMED_REPLY, ZMQ_PROTOCOL_ERROR_ZAP_BAD_REQUEST_ID, ZMQ_PROTOCOL_ERROR_ZAP_BAD_VERSION, ZMQ_PROTOCOL_ERROR_ZAP_INVALID_STATUS_CODE, ZMQ_PROTOCOL_ERROR_ZAP_INVALID_METADATA, // These are "deprecated" in favor of the `zmq_poller` API, but are still // used by `zmq`, and the `zmq_poller` API has been introduced only in // 4.2.0, and have not been stabilized at least up until 4.3.1. ZMQ_POLLIN, ZMQ_POLLOUT, ZMQ_POLLERR, ZMQ_POLLPRI, ZMQ_POLLITEMS_DFLT, // Undeprecated types. zmq_msg_t, zmq_free_fn, // Undeprecated and documented functions (or more generally, symbols). These // must exist in the ABI of the oldest supported libzmq version, so // extending this list requires bumping that. zmq_pollitem_t, zmq_version, zmq_errno, zmq_strerror, zmq_ctx_new, zmq_ctx_term, zmq_ctx_shutdown, zmq_ctx_set, zmq_ctx_get, zmq_msg_init, zmq_msg_init_size, zmq_msg_init_data, zmq_msg_send, zmq_msg_recv, zmq_msg_close, zmq_msg_move, zmq_msg_copy, zmq_msg_data, zmq_msg_size, zmq_msg_more, zmq_msg_get, zmq_msg_set, zmq_msg_gets, zmq_socket, zmq_close, zmq_setsockopt, zmq_getsockopt, zmq_bind, zmq_connect, zmq_unbind, zmq_disconnect, zmq_send, zmq_send_const, zmq_recv, zmq_socket_monitor, zmq_sendmsg, zmq_recvmsg, zmq_sendiov, zmq_recviov, zmq_poll, zmq_proxy, zmq_proxy_steerable, zmq_has, zmq_device, zmq_z85_encode, zmq_z85_decode, zmq_curve_keypair, }; #[allow(non_camel_case_types)] #[allow(dead_code)] #[allow(clippy::unreadable_literal)] mod ffi; zmq-sys-0.11.0/src/unix.rs010064400017500001750000000000421347377750000135660ustar0000000000000000pub use std::os::unix::io::RawFd; zmq-sys-0.11.0/src/windows.rs010064400017500001750000000021111303076325200142600ustar0000000000000000pub use std::os::windows::io::RawSocket as RawFd; pub mod errno { use libc::c_int; // Use constants as defined in the windows header errno.h // libzmq should be compiled with VS2010 SDK headers or newer pub const EACCES: c_int = 13; pub const EADDRINUSE: c_int = 100; pub const EADDRNOTAVAIL: c_int = 101; pub const EAGAIN: c_int = 11; pub const EBUSY: c_int = 16; pub const ECONNREFUSED: c_int = 107; pub const EFAULT: c_int = 14; pub const EINTR: c_int = 4; pub const EHOSTUNREACH: c_int = 110; pub const EINPROGRESS: c_int = 112; pub const EINVAL: c_int = 22; pub const EMFILE: c_int = 24; pub const EMSGSIZE: c_int = 115; pub const ENAMETOOLONG: c_int = 38; pub const ENETDOWN: c_int = 116; pub const ENOBUFS: c_int = 119; pub const ENODEV: c_int = 19; pub const ENOENT: c_int = 2; pub const ENOMEM: c_int = 12; pub const ENOTCONN: c_int = 126; pub const ENOTSOCK: c_int = 128; pub const ENOTSUP: c_int = 129; pub const EPROTO: c_int = 134; pub const EPROTONOSUPPORT: c_int = 135; } zmq-sys-0.11.0/.cargo_vcs_info.json0000644000000001120000000000000125670ustar00{ "git": { "sha1": "e620859bb66a85a2fcf63c75b63682262e74441c" } }