Skip to main content

Crate socket9

Crate socket9 

Source
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

SocketSocket9ExtSoSocket9ExtSoIpSocket9ExtSoIp6Socket9ExtIpSocket9ExtIp6Socket9ExtIpTcp
TcpListeneryesyesyesyesyesno
TcpStreamyesyesyesyesyesyes
UdpSocketyesnonoyesyesno
UnixDatagramyesnonononono
UnixStreamyesnonononono
UnixSeqpacketConnyesnonononono
UnixSeqpacketListeneryesnonononono

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*.
So9MsgFlags
A flags which are received with libc::recvmsg
So9SockDomain
So9SockDwFlags
A flags which are an addition to the argument type for func libc::socket
So9SockProtocol
A socket protocol. Is optional on some OSes like OSX. In this case it should be set to [SockProtocol::NONE].
So9SockType
A socket type.
UnixSocketAddr
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
So9DomainRange
Determins the socket’s possible range of domains i.e AF_INET and AF_INET6 and AF_UNIX.
So9IfInder
A IPv4 IP address or interface numer wrapper.

Constants§

AF_INET
AF_INET6
AF_UNIX
IP6T_SO_ORIGINAL_DST
IPPROTO_ICMP
IPPROTO_ICMPV6
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§

AsOsDescr
A trait which standartisize the raw and borrowed socket file descriptor across the different OSes. Also this can be used as a marker.
LocalFrom
A local implementation of converter From.
OptRMarker
A ‘read’ marker for getsockopt operaion.
OptWMarker
A write marker for setsockopt operation.
SockOptMarker
A socket getsockopt and setsockopt recs for the specific level and type. A [getsockopt] and [setsockopt] uses this trait as to read and write value.
Socket9ExtIp
A collection of the socket operations of level libc::IPPROTO_TCP.
Socket9ExtIp6
A collection of the socket operations of level libc::IPPROTO_IPV6.
Socket9ExtIp6Raw
A collection of the socket operations of level libc::IPPROTO_IPV6. A raw sockets only.
Socket9ExtIpRaw
A collection of the socket operations of level libc::IPPROTO_IP. A raw sockets only.
Socket9ExtIpTcp
Socket9ExtIpTcpExt
A collection of the socket operations of level libc::IPPROTO_TCP. Extended.
Socket9ExtSo
A collection of the socket operations on the level libc::SOL_SOCKET.
Socket9ExtSoIp
Socket9ExtSoIp6
A collection of the socket operations of level libc::SOL_IP.

Type Aliases§

UnixSocketAddrRef
sa_family_t
socklen_t
suseconds_t
time_t