Struct linux_unsafe::sockaddr
source · #[repr(C)]pub struct sockaddr {
pub family: sa_family_t,
/* private fields */
}
Expand description
The type used for representing socket addresses in the raw system calls.
This is a type of unknown length, because the actual length of a socket
address depends on the address family. When reading a socket address of
an unknown address family, use a pointer to a sockaddr_storage
as a
placeholder type and then convert based on the returned family
.
Warning: It is not meaningful to ask the compiler for the size of
this type; it will return an arbitrary placeholder value. If you need
sufficient storage for an arbitrary address, use sockaddr_storage
instead.
Fields§
§family: sa_family_t