sctp_sys/
lib.rs

1// Copyright 2019 sctp-sys Developers
2//
3// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
4// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
5// http://opensource.org/licenses/MIT>, at your option. This file may not be
6// copied, modified, or distributed except according to those terms.
7
8//! This crate provides a binding to SCTP libraries.
9//!
10//! Under Linux, the crate is bound to libsctp provided by lksctp-tools,
11//! and under Windows, it is bound to libsctpsp provided by SctpDrv. However,
12//! SctpDrv is unstable in Windows 7 and can cause BSOD.
13//!
14//! # Note
15//! When using sctp-sys in Windows, `sctp_sys::win::winsock::init()` must be called
16//! before doing anything, in order to startup winsock (with `WSAStartup` system call)
17
18extern crate libc;
19extern crate winapi;
20
21#[cfg(target_os = "windows")]
22pub mod win;
23#[cfg(target_os = "windows")]
24pub use crate::win::*;
25
26#[cfg(target_os = "linux")]
27pub mod linux;
28#[cfg(target_os = "linux")]
29pub use crate::linux::*;
30
31pub mod common;
32pub use crate::common::*;