Expand description
This crate provides a (mostly) safe and ergonomic Rust API for the
libcsp
C library on top of the
libcsp-sys
crate.
You can find some more high-level information and examples in the main repository.
Re-exports§
pub use libcsp_sys as ffi;
Modules§
Structs§
- Connect
Opts - CspConn
Guard - CspConn
Ref - CspInterface
- CspPacket
- CspPacket
Mut - CspPacket
Ref - CspPacket
RefGuard - CspSocket
- CspUdp
Conf - Ping
Error - Socket
Flags
Enums§
Constants§
- CSP_ANY
- Listen on all ports, primarily used with csp_bind
- CSP_
LOOPBACK
Functions§
- csp_
accept - Rust wrapper for ffi::csp_accept.
- csp_
accept_ guarded - csp_
bind - Rust wrapper for ffi::csp_bind.
- csp_
buffer_ free - Rust wrapper for ffi::csp_buffer_free.
- csp_
buffer_ get - Rust wrapper for ffi::csp_buffer_get.
- csp_
close - Rust wrapper for ffi::csp_close.
- csp_
conn_ dport - Rust wrapper for ffi::csp_conn_dport.
- csp_
conn_ dst - Rust wrapper for ffi::csp_conn_dst.
- csp_
conn_ flags - Rust wrapper for ffi::csp_conn_src.
- csp_
conn_ flags_ typed - Rust wrapper for ffi::csp_conn_src which also tries to convert the options to a ConnectOpts bitfield.
- csp_
conn_ print_ table - Rust wrapper for ffi::csp_conn_print_table.
- csp_
conn_ sport - Rust wrapper for ffi::csp_conn_sport.
- csp_
conn_ src - Rust wrapper for ffi::csp_conn_src.
- csp_
connect - Rust wrapper for ffi::csp_connect.
- csp_
connect_ guarded - Rust wrapper for ffi::csp_connect which returns a guard structure. The connection will be be closed automatically when the guard structure is dropped.
- csp_
init ⚠ - Rust wrapper for ffi::csp_init. Initialize the CSP stack.
- csp_
listen - Rust wrapper for ffi::csp_listen.
- csp_
ping - Rust wrapper for ffi::csp_ping.
- csp_
ping_ raw - Rust wrapper for ffi::csp_ping, returns the result code directly.
- csp_
read - Rust wrapper for ffi::csp_read.
- csp_
read_ guarded - Rust wrapper for ffi::csp_read which returns a guarded packet reference. This packet will cleaned up automatically with csp_buffer_free on drop.
- csp_
reboot - Rust wrapper for ffi::csp_reboot.
- csp_
recvfrom - Rust wrapper for ffi::csp_recvfrom.
- csp_
recvfrom_ guarded - Rust wrapper for ffi::csp_recvfrom which returns a guarded packet reference. This packet will cleaned up automatically with csp_buffer_free on drop.
- csp_
route_ work - Rust wrapper for ffi::csp_route_work which also converts errors to the CspError type. This function will panic if the returned error type is not among the known values of CspError.
- csp_
route_ work_ raw - Rust wrapper for ffi::csp_route_work.
- csp_
send - Rust wrapper for ffi::csp_send.
- csp_
service_ handler - csp_
transaction - Calls csp_transaction_w_opts with ConnectOpts::NONE.
- csp_
transaction_ persistent - Rust wrapper for ffi::csp_transaction_persistent.
- csp_
transaction_ w_ opts - Rust wrapper for ffi::csp_transaction_w_opts.