Module Posix_socket.SockaddrInet

IPv4 socket address structure.

type in_addr = Unsigned.uint32

IPv4 address type (32-bit).

val in_addr_t : in_addr Ctypes.typ

Ctypes representation of in_addr_t.

val in_addr : in_addr Ctypes.structure Ctypes.typ

Ctypes representation of struct in_addr.

val s_addr : (in_addr, in_addr Ctypes.structure) Ctypes.field

The s_addr field containing the IPv4 address.

type t

Abstract sockaddr_in type.

val t : t Ctypes.structure Ctypes.typ

Ctypes structure type.

val sin_family : (sa_family_t, t Ctypes.structure) Ctypes.field

Address family (always AF_INET).

val sin_port : (in_port, t Ctypes.structure) Ctypes.field

Port number in network byte order.

val sin_addr : (in_addr Ctypes.structure, t Ctypes.structure) Ctypes.field

IPv4 address.

val from_sockaddr_storage : sockaddr_storage Ctypes.ptr -> t Ctypes.structure Ctypes.ptr

Convert from sockaddr_storage to sockaddr_in.