in.h¶
Main socket header.
-
IN6_IS_ADDR_UNSPECIFIED( addr)¶ Check if address is the unspecified address (
::).1
((int)(ipv6_addr_is_unspecified((const ipv6_addr_t *)(addr))))
Parameters
addr: address of type const struct in6_addr *Return values
- 0, when an address is not the unspecified address.
- any other value otherwise.
-
IN6_IS_ADDR_LOOPBACK( addr)¶ Check if address is the loopback address (
::1).1
((int)(ipv6_addr_is_loopback((const ipv6_addr_t *)(addr))))
Parameters
addr: address of type const struct in6_addr *Return values
- 0, when an address is not the loopback address.
- any other value otherwise.
-
IN6_IS_ADDR_MULTICAST( addr)¶ Check if address is a multicast address.
1
((int)(ipv6_addr_is_multicast((const ipv6_addr_t *)(addr))))
Parameters
addr: address of type const struct in6_addr *Return values
- 0, when an address is not a multicast address.
- any other value otherwise.
-
IN6_IS_ADDR_LINKLOCAL( addr)¶ Check if address is a link-local address.
1
((int)(ipv6_addr_is_link_local((const ipv6_addr_t *)addr)))
Parameters
addr: address of type const struct in6_addr *Return values
- 0, when an address is not a link-local address.
- any other value otherwise.
-
IN6_IS_ADDR_SITELOCAL( addr)¶ Check if address is a site-local address.
1
((int)(ipv6_addr_is_site_local((const ipv6_addr_t *)addr)))
Parameters
addr: address of type const struct in6_addr *Return values
- 0, when an address is not a site-local address.
- any other value otherwise.
-
IN6_IS_ADDR_V4MAPPED( addr)¶ Check if address is an IPv4 mapped address.
1
((int)(ipv6_addr_is_ipv4_mapped((const ipv6_addr_t *)addr)))
Parameters
addr: address of type const struct in6_addr *Return values
- 0, when an address is not an IPv4 mapped address.
- any other value otherwise.
-
IN6_IS_ADDR_V4COMPAT( addr)¶ Check if address is an IPv4-compatible address.
1
((int)(ipv6_addr_is_ipv4_compat((const ipv6_addr_t *)addr)))
Parameters
addr: address of type const struct in6_addr *Return values
- 0, when an address is not an IPv4-compatible address.
- any other value otherwise.
-
IN6_IS_ADDR_MC_NODELOCAL( addr)¶ Check if address is a multicast node-local address.
1 2
(IN6_IS_ADDR_MULTICAST(addr) && \ (int)((addr->s6_addr[1] & 0x0f) == IPV6_ADDR_MCAST_SCP_IF_LOCAL))
Parameters
addr: address of type const struct in6_addr *Return values
- 0, when an address is not a multicast node-local address.
- any other value otherwise.
-
IN6_IS_ADDR_MC_LINKLOCAL( addr)¶ Check if address is a multicast link-local address.
1 2
(IN6_IS_ADDR_MULTICAST(addr) && \ (int)((addr->s6_addr[1] & 0x0f) == IPV6_ADDR_MCAST_SCP_LINK_LOCAL))
Parameters
addr: address of type const struct in6_addr *Return values
- 0, when an address is not a multicast link-local address.
- any other value otherwise.
-
IN6_IS_ADDR_MC_SITELOCAL( addr)¶ Check if address is a multicast site-local address.
1 2
(IN6_IS_ADDR_MULTICAST(addr) && \ (int)((addr->s6_addr[1] & 0x0f) == IPV6_ADDR_MCAST_SCP_SITE_LOCAL))
Parameters
addr: address of type const struct in6_addr *Return values
- 0, when an address is not a multicast site-local address.
- any other value otherwise.
-
IN6_IS_ADDR_MC_ORGLOCAL( addr)¶ Check if address is a multicast organization-local address.
1 2
(IN6_IS_ADDR_MULTICAST(addr) && \ (int)((addr->s6_addr[1] & 0x0f) == IPV6_ADDR_MCAST_SCP_ORG_LOCAL))
Parameters
addr: address of type const struct in6_addr *Return values
- 0, when an address is not a multicast organization-local address.
- any other value otherwise.
-
IN6_IS_ADDR_MC_GLOBAL( addr)¶ Check if address is a multicast global address.
1 2
(IN6_IS_ADDR_MULTICAST(addr) && \ (int)((addr->s6_addr[1] & 0x0f) == IPV6_ADDR_MCAST_SCP_GLOBAL))
Parameters
addr: address of type const struct in6_addr *Return values
- 0, when an address is not a multicast global address.
- any other value otherwise.
-
IPPROTO_IP¶ Internet Protocol version 4.
1
(PROTNUM_IPV4)
-
IPPROTO_IPV6¶ Internet Protocol version 6.
1
(PROTNUM_IPV6)
-
IPPROTO_ICMP¶ Internet Control Message Protocol.
1
(PROTNUM_ICMP)
-
IPPROTO_ICMPV6¶ ICMP for IPv6.
1
(PROTNUM_ICMPV6)
-
IPPROTO_RAW¶ Raw IP packets protocol.
1
(PROTNUM_RESERVED)
-
IPPROTO_TCP¶ Transmission control protocol.
1
(PROTNUM_TCP)
-
IPPROTO_UDP¶ User datagram protocol.
1
(PROTNUM_UDP)
-
INET_ADDRSTRLEN¶ Length of the string form for IPv4.
1
(16)
-
INET6_ADDRSTRLEN¶ Length of the string form for IPv6.
1
(46)
-
INADDR_ANY¶ IPv4 local host address.
1
((in_addr_t)0x00000000)
-
INADDR_BROADCAST¶ IPv4 broadcast address.
1
((in_addr_t)0xffffffff)
-
IN6ADDR_ANY_INIT¶ IPv6 wildcard address.
1
IPV6_ADDR_UNSPECIFIED
-
IN6ADDR_LOOPBACK_INIT¶ IPv6 loopback address.
1
IPV6_ADDR_LOOPBACK
-
uint16_t
in_port_t¶ Internet port type.
IPv6 option names
-
uint32_t
in_addr_t¶ IPv4 address type.
-
struct
in_addr¶ IPv4 address structure type.
-
in.h::in_addr_ts_addr¶ an IPv4 address
-
-
struct
sockaddr_in¶ IPv4 socket address type.
sockaddr
-
socket.h::sa_family_tsin_family¶ Protocol family, always AF_INET.
-
in.h::in_port_tsin_port¶ Port number.
-
-
struct
sockaddr_in6¶ IPv6 socket address type.
sockaddr
-
socket.h::sa_family_tsin6_family¶ Protocol family, always AF_INET6.
Member of struct sockaddr_in6Protocol family, always AF_INET6
-
in.h::in_port_tsin6_port¶ Port number.
-
uint32_t
sin6_flowinfo¶ IPv6 traffic class and flow information.
-
uint32_t
sin6_scope_id¶ Set of interfaces for a scope.
-