Module Cf_ip4_proto


module Cf_ip4_proto: sig .. end
The AF_INET address family (for use with TCP and UDP over IPv4).


Modules and Types

module AF: Cf_socket.AF  with
    type tag_t = [ `AF_INET ] and
    type address_t = Cf_ip4_addr.opaque Cf_ip4_addr.t * int
The address family module for IPv4 transports.

type mreq_t = {
   imr_multiaddr : Cf_ip4_addr.multicast Cf_ip4_addr.t;
   imr_interface : Cf_ip4_addr.unicast Cf_ip4_addr.t;
}
The multicast request type

Socket Options

The following socket options are available on sockets of AF_INET family.

val ip_ttl : (int, [ `AF_INET ], 'a) Cf_socket.sockopt_t
Set the unicast hop count for the socket.
val ip_add_membership : (mreq_t, [ `AF_INET ], [ `SOCK_DGRAM ]) Cf_socket.sockopt_t
Add the socket to the membership of a multicast group.
val ip_drop_membership : (mreq_t, [ `AF_INET ], [ `SOCK_DGRAM ]) Cf_socket.sockopt_t
Drop the socket from the membership of a multicast group.
val ip_multicast_if : (Cf_ip4_addr.unicast Cf_ip4_addr.t, [ `AF_INET ], [ `SOCK_DGRAM ])
Cf_socket.sockopt_t
The primary network interface address for sending to multicast destinations.
val ip_multicast_ttl : (int, [ `AF_INET ], [ `SOCK_DGRAM ]) Cf_socket.sockopt_t
The multicast hop count for the socket.
val ip_multicast_loop : (bool, [ `AF_INET ], [ `SOCK_DGRAM ]) Cf_socket.sockopt_t
Enable multicast loopback on the socket.

Other Functions

The following socket options are available on sockets of AF_INET and AF_INET6 address/protocol families.

val siocgifaddr : ([ `AF_INET ], 'a) Cf_socket.t ->
string -> [> Cf_ip4_addr.unicast ] Cf_ip4_addr.t
Use siocgifaddr sock name with any `AF_INET address family socket sock to get the primary IP address for the name interface.