Expand description
§socket9 extended untilities for the networking/unix sockets and raw network sockets.
Socket9 provides an additional functionality to the provided in std socket and/or to the user defined.
§Implementations
There are traits which implements:
-
SOL_SOCKET - trait
Socket9ExtSo -
SOL_IP - trait
Socket9ExtSoIp -
SOL_IPV6 - trait
Socket9ExtSoIp6 -
IPPROTO_IP - trait
Socket9ExtIp -
IPPROTO_IPV6 - trait
Socket9ExtIp6 -
IPPROTO_TCP - trait
Socket9ExtIpTcp+Socket9ExtIpTcpExt
Thise traits are implemented for
| Socket | Socket9ExtSo | Socket9ExtSoIp | Socket9ExtSoIp6 | Socket9ExtIp | Socket9ExtIp6 | Socket9ExtIpTcp |
|---|---|---|---|---|---|---|
| TcpListener | yes | yes | yes | yes | yes | no |
| TcpStream | yes | yes | yes | yes | yes | yes |
| UdpSocket | yes | no | no | yes | yes | no |
| UnixDatagram | yes | no | no | no | no | no |
| UnixStream | yes | no | no | no | no | no |
| UnixSeqpacketConn | yes | no | no | no | no | no |
| UnixSeqpacketListener | yes | no | no | no | no | no |
Re-exports§
pub extern crate libc;pub extern crate uds_fork;pub use address::So9DomainUnix;pub use address::So9DomainInets;pub use socket::*;
Modules§
- address
- A adress interface.
- common
- A common trait for the implementations in the dirs “unix”, “windows”.
- op_
sol_ socket - sock_
domain - sock_
msg_ flags - sock_
opts - sock_
protocol - sock_
type - socket
- A common implementation for the socket.
- socket_
impls - socket_
split - A common implementation for the splitted socket into r/w.
Structs§
- Dum
- A dummy struct which is set as default for the Socket9Ext*.
- So9Msg
Flags - A flags which are received with libc::recvmsg
- So9Sock
Domain - So9Sock
DwFlags - A flags which are an addition to the argument
typefor func libc::socket - So9Sock
Protocol - A socket
protocol. Is optional on some OSes like OSX. In this case it should be set to [SockProtocol::NONE]. - So9Sock
Type - A socket
type. - Unix
Socket Addr - A unix domain socket address.
- in6_
addr - in_addr
- ip_
mreq_ source - ip_
mreqn - ipv6_
mreq - linger
- msghdr
- sockaddr
- sockaddr_
in - sockaddr_
in6 - sockaddr_
storage - sockaddr_
un - timeval
Enums§
- Credentials
- So9Domain
Range - Determins the socket’s possible range of domains i.e
AF_INETandAF_INET6andAF_UNIX. - So9If
Inder - A IPv4 IP address or interface numer wrapper.
Constants§
- AF_INET
- AF_
INET6 - AF_UNIX
- IP6T_
SO_ ORIGINAL_ DST - IPPROTO_
ICMP - IPPROTO_
ICMP V6 - IPPROTO_
IP - IPPROTO_
IPV6 - IPPROTO_
SCTP - SCTP
- IPPROTO_
TCP - IPPROTO_
UDP - IPV6_
ADD_ MEMBERSHIP - IPV6_
DROP_ MEMBERSHIP - IPV6_
MULTICAST_ ALL - IPV6_
MULTICAST_ HOPS - IPV6_
MULTICAST_ IF - IPV6_
MULTICAST_ LOOP - IPV6_
RECVHOPLIMIT - IPV6_
RECVTCLASS - IPV6_
UNICAST_ HOPS - IPV6_
V6ONLY - IP_
ADD_ MEMBERSHIP - IP_
ADD_ SOURCE_ MEMBERSHIP - IP_
DROP_ MEMBERSHIP - IP_
DROP_ SOURCE_ MEMBERSHIP - IP_
HDRINCL - IP_
MULTICAST_ ALL - IP_
MULTICAST_ IF - IP_
MULTICAST_ LOOP - IP_
MULTICAST_ TTL - IP_
RECVTOS - IP_TOS
- IP_
TRANSPARENT - IP_TTL
- POLLIN
- SOCK_
DGRAM - SOCK_
RAW - SOCK_
SEQPACKET - SOCK_
STREAM - SOL_IP
- SOL_
IPV6 - SOL_
SOCKET - SO_
ACCEPTCONN - SO_
BROADCAST - SO_
DOMAIN - SO_
DONTROUTE - SO_
ERROR - SO_
INCOMING_ CPU - SO_
KEEPALIVE - SO_
LINGER - SO_
OOBINLINE - SO_
ORIGINAL_ DST - SO_
PASSCRED - SO_
PRIORITY - SO_
PROTOCOL - SO_
RCVBUF - SO_
RCVLOWAT - SO_
RCVTIMEO - SO_
REUSEADDR - SO_
REUSEPORT - SO_
SNDBUF - SO_
SNDLOWAT - SO_
SNDTIMEO - SO_
TIMESTAMP - SO_TYPE
- TCP_
KEEPCNT - TCP_
KEEPIDLE - TCP_
KEEPINTVL - TCP_
NODELAY - TCP_
NOTSENT_ LOWAT - TCP_
THIN_ LINEAR_ TIMEOUTS
Traits§
- AsOs
Descr - A trait which standartisize the
rawandborrowedsocket file descriptor across the different OSes. Also this can be used as a marker. - Local
From - A local implementation of converter From.
- OptR
Marker - A ‘read’ marker for
getsockoptoperaion. - OptW
Marker - A
writemarker forsetsockoptoperation. - Sock
OptMarker - A
socketgetsockoptandsetsockoptrecs for the specificlevelandtype. A [getsockopt] and [setsockopt] uses this trait as to read and write value. - Socket9
ExtIp - A collection of the socket operations of level libc::IPPROTO_TCP.
- Socket9
ExtIp6 - A collection of the socket operations of level libc::IPPROTO_IPV6.
- Socket9
ExtIp6 Raw - A collection of the socket operations of level libc::IPPROTO_IPV6. A raw sockets only.
- Socket9
ExtIp Raw - A collection of the socket operations of level libc::IPPROTO_IP. A raw sockets only.
- Socket9
ExtIp Tcp - Socket9
ExtIp TcpExt - A collection of the socket operations of level libc::IPPROTO_TCP. Extended.
- Socket9
ExtSo - A collection of the socket operations on the level libc::SOL_SOCKET.
- Socket9
ExtSo Ip - Socket9
ExtSo Ip6 - A collection of the socket operations of level libc::SOL_IP.