最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 正文

netinet详细介绍

来源:动视网 责编:小OO 时间:2025-09-29 06:21:29
文档

netinet详细介绍

netinet/in.h详细介绍名称netinet/in.h-Internetaddressfamilynetinet/in.h-互联网地址族SYNOPSIS故事大纲#include#包括DESCRIPTION描述Theheadershalldefinethefollowingtypes:该头应确定以下类型:in_port_tin_port_tEquivalenttothetypeuint16_tasdefinedin.等价的类型uint16_t在定义。in_addr_tin_addr_tEq
推荐度:
导读netinet/in.h详细介绍名称netinet/in.h-Internetaddressfamilynetinet/in.h-互联网地址族SYNOPSIS故事大纲#include#包括DESCRIPTION描述Theheadershalldefinethefollowingtypes:该头应确定以下类型:in_port_tin_port_tEquivalenttothetypeuint16_tasdefinedin.等价的类型uint16_t在定义。in_addr_tin_addr_tEq
netinet/in.h详细介绍

名称

    netinet/in.h - Internet address family netinet / in.h - 互联网地址族 

SYNOPSIS故事大纲

#include #包括

DESCRIPTION描述

The header shall define the following types:该头应确定以下类型:

    in_port_t in_port_t

Equivalent to the type uint16_t as defined in .等价的类型uint16_t在定义 。 

    in_addr_t in_addr_t

Equivalent to the type uint32_t as defined in .等价的类型uint32_t在定义 。 

The sa_family_t type shall be defined as described in .该sa_family_t类型应被定义为描述

The uint8_t and uint32_t type shall be defined as described in .该uint8_t和uint32_t类型应被定义为描述 。 Inclusion of the header may also make visible all symbols from and .标题包含的也可从所有可见的符号

The header shall define the in_addr structure that includes at least the following member:该头应确定in_addr结构,至少包括以下成员:

    in_addr_t  s_addr in_addr_t s_addr 

The header shall define the sockaddr_in structure that includes at least the following members:该头应确定SOCKADDR_IN结构,其中包括至少下列成员:

    sa_family_t     sin_family AF_INET. in_port_t       sin_port Port number. struct in_addr  sin_addr IP address. sa_family_t sin_family是AF_INET。in_port_t sin_port端口号。 结构in_addr sin_addr的IP地址。 

    The sin_port and sin_addr members shall be in network byte order.该sin_port和sin_addr成员应在网络字节顺序。

    The sockaddr_in structure is used to store addresses for the Internet address family.该SOCKADDR_IN结构是用来存储家庭地址的Internet地址。 Values of this type shall be cast by applications to struct sockaddr for use with socket functions.值类型转换插座职能,应由申请与使用结构sockaddr的。

    [ IP6 ] [ 肌醇 ] [备选案文开始] The header shall define the in6_addr structure that contains at least the following member:该头应确定in6_addr结构,至少包含以下成员:

    uint8_t s6_addr[16] uint8_t s6_addr [16] 

    This array is used to contain a 128-bit IPv6 address, stored in network byte order.这个数组用来包含一个128位的IPv6地址,在网络存储字节顺序。

The header shall define the sockaddr_in6 structure that includes at least the following members:该头应确定sockaddr_in6结构,至少包括以下成员:

    sa_family_t      sin6_family AF_INET6. sa_family_t sin6_family AF_INET6。 

     in_port_t        sin6_port Port number. in_port_t sin6_port端口号。 

     uint32_t         sin6_flowinfo IPv6 traffic class and flow information. uint32_t sin6_flowinfo IPv6通信类和信息流。 

     struct in6_addr  sin6_addr IPv6 address. 结构in6_addr sin6_addr IPv6地址。 

     uint32_t         sin6_scope_id Set of interfaces for a scope. uint32_t sin6_scope_id范围一套接口。 

    The sin6_port and sin6_addr members shall be in network byte order.该sin6_port和sin6_addr成员应在网络字节顺序。

    The sockaddr_in6 structure shall be set to zero by an application prior to using it, since implementations are free to have additional, implementation-defined fields in sockaddr_in6 .该sockaddr_in6结构应被设置为应用零一前使用它,因为可以自由的实现有执行定义的领域sockaddr_in6增加。

    The sin6_scope_id field is a 32-bit integer that identifies a set of interfaces as appropriate for the scope of the address carried in the sin6_addr field.该sin6_scope_id字段是一个32位整数,在该领域的sin6_addr标识一组接口的地址进行适当的范围。 For a link scope sin6_addr , the application shall ensure that sin6_scope_id is a link index.对于一个链接范围sin6_addr的,应当确保sin6_scope_id是一个环比价格指数。 For a site scope sin6_addr , the application shall ensure that sin6_scope_id is a site index.对于一个场址范围sin6_addr的,应当确保sin6_scope_id是一个网站的索引。 The mapping of sin6_scope_id to an interface or set of interfaces is implementation-defined.该接口映射到一个或接口sin6_scope_id集是实现定义。

The header shall declare the following external variable:该头应宣布下列外部变量:

    const struct in6_addr in6addr_any 常量结构in6_addr in6addr_any 

    This variable is initialized by the system to contain the wildcard IPv6 address.这个变量是由系统初始化包含通配符的IPv6地址。 The header also defines the IN6ADDR_ANY_INIT macro.该头还定义IN6ADDR_ANY_INIT宏。 This macro must be constant at compile time and can be used to initialize a variable of type struct in6_addr to the IPv6 wildcard address.这个宏必须保持在编译时,可以用来初始化一个类型变量的结构in6_addr到IPv6的通配符地址。

The header shall declare the following external variable:该头应宣布下列外部变量:

    const struct in6_addr in6addr_loopback 常量结构in6_addr in6addr_loopback 

    This variable is initialized by the system to contain the loopback IPv6 address.这个变量是由系统初始化,控制回路的IPv6地址。 The header also defines the IN6ADDR_LOOPBACK_INIT macro.该头还定义IN6ADDR_LOOPBACK_INIT宏。 This macro must be constant at compile time and can be used to initialize a variable of type struct in6_addr to the IPv6 loopback address.这个宏必须保持在编译时,可以用来初始化一个类型变量的结构in6_addr到IPv6的环回地址。

The header shall define the ipv6_mreq structure that includes at least the following members:该头应确定ipv6_mreq结构,至少包括以下成员:

    struct in6_addr  ipv6mr_multiaddr IPv6 multicast address. 结构in6_addr ipv6mr_multiaddr IPv6组播地址。 

     unsigned         ipv6mr_interface Interface index. 未签名的ipv6mr_interface接口索引。 

    [备选案文完]

The header shall define the following macros for use as values of the level argument of getsockopt () and setsockopt () :该头应确定水平的论点如下宏作为值使用getsockopt()和使用setsockopt() :

    IPPROTO_IP IPPROTO_IP

        Internet protocol.互联网协议。 

    IPPROTO_IPV6 IPPROTO_IPV6

        [ IP6 ] [ 肌醇 ] [备选案文开始] Internet Protocol Version 6. Internet协议版本6。 [备选案文完]

    IPPROTO_ICMP IPPROTO_ICMP

        Control message protocol.控制消息协议。 

    IPPROTO_RAW IPPROTO_RAW

        [ RS ] [ 遥感 ] [备选案文开始] Raw IP Packets Protocol.原始IP数据包协议。 [备选案文完]

    IPPROTO_TCP IPPROTO_TCP

        Transmission control protocol.传输控制协议。 

    IPPROTO_UDP IPPROTO_UDP

        User datagram protocol.用户数据报协议。 

The header shall define the following macros for use as destination addresses for connect () , sendmsg () , and sendto () :该头应确定目标地址为使用如下宏连接 () , sendmsg() ,和SendTo文件 () :

    INADDR_ANY INADDR_ANY

        IPv4 local host address. IPv4的本地主机地址。 

    INADDR_BROADCAST INADDR_BROADCAST

        IPv4 broadcast address. IPv4的广播地址。 

The header shall define the following macro to help applications declare buffers of the proper size to store IPv4 addresses in string form:该头应当载明下列事项,以帮助申请申报宏大小适当的缓冲区来存储的字符串形式的IPv4地址:

    INET_ADDRSTRLEN INET_ADDRSTRLEN

        16. 16。 Length of the string form for IP.长度为IP字符串形式。 

The htonl () , htons () , ntohl () , and ntohs () functions shall be available as defined in .该htonl() , htons() , ntohl() ,和ntohs()函数应可在定义 。 Inclusion of the header may also make visible all symbols from .标题包含的也可从所有可见的符号

    [ IP6 ] [ 肌醇 ] [备选案文开始] The header shall define the following macro to help applications declare buffers of the proper size to store IPv6 addresses in string form:该头应当载明下列事项,以帮助申请申报宏缓冲区的大小适当的形式存储的IPv6地址的字符串:

    INET6_ADDRSTRLEN INET6_ADDRSTRLEN

        46. 46。 Length of the string form for IPv6.长度为IPv6的字符串形式。 

The header shall define the following macros, with distinct integer values, for use in the option_name argument in the getsockopt () or setsockopt () functions at protocol level IPPROTO_IPV6:该头应当载明下列事项宏,有明显的整数值,在参数的使用在option_name getsockopt()或使用setsockopt() IPPROTO_IPV6功能在协议级别:

    IPV6_JOIN_GROUP IPV6_JOIN_GROUP

        Join a multicast group.加入一个多播组。 

    IPV6_LEAVE_GROUP IPV6_LEAVE_GROUP

        Quit a multicast group.退出一个多播组。 

    IPV6_MULTICAST_HOPS IPV6_MULTICAST_HOPS

        Multicast hop limit.组播跳的。 

    IPV6_MULTICAST_IF IPV6_MULTICAST_IF

        Interface to use for outgoing multicast packets.即将离任的接口用于多播数据包。 

    IPV6_MULTICAST_LOOP IPV6_MULTICAST_LOOP

        Multicast packets are delivered back to the local application.多播数据包被传递回本地应用程序。 

    IPV6_UNICAST_HOPS IPV6_UNICAST_HOPS

        Unicast hop limit.单播跳的。 

    IPV6_V6ONLY IPV6_V6ONLY

        Restrict AF_INET6 socket to IPv6 communications only.AF_INET6到IPv6通讯插座只。 

The header shall define the following macros that test for special IPv6 addresses.该头应当载明下列事项宏测试特殊的IPv6地址。 Each macro is of type int and takes a single argument of type const struct in6_addr * :每个宏是int 类型的常量 ,而所需的类型单一参数的结构in6_addr *:

    IN6_IS_ADDR_UNSPECIFIED IN6_IS_ADDR_UNSPECIFIED

        Unspecified address.未指定地址。 

    IN6_IS_ADDR_LOOPBACK IN6_IS_ADDR_LOOPBACK

        Loopback address.环回地址。 

    IN6_IS_ADDR_MULTICAST IN6_IS_ADDR_MULTICAST

        Multicast address.组播地址。 

    IN6_IS_ADDR_LINKLOCAL IN6_IS_ADDR_LINKLOCAL

        Unicast link-local address.单播链路本地地址。 

    IN6_IS_ADDR_SITELOCAL IN6_IS_ADDR_SITELOCAL

        Unicast site-local address.单播站点本地地址。 

    IN6_IS_ADDR_V4MAPPED IN6_IS_ADDR_V4MAPPED

        IPv4 mapped address.映射的IPv4地址。 

    IN6_IS_ADDR_V4COMPAT IN6_IS_ADDR_V4COMPAT

        IPv4-compatible address. IPv4兼容地址。 

    IN6_IS_ADDR_MC_NODELOCAL IN6_IS_ADDR_MC_NODELOCAL

        Multicast node-local address.组播节点本地地址。 

    IN6_IS_ADDR_MC_LINKLOCAL IN6_IS_ADDR_MC_LINKLOCAL

        Multicast link-local address.组播链路本地地址。 

    IN6_IS_ADDR_MC_SITELOCAL IN6_IS_ADDR_MC_SITELOCAL

        Multicast site-local address.组播站点本地地址。 

    IN6_IS_ADDR_MC_ORGLOCAL IN6_IS_ADDR_MC_ORGLOCAL

        Multicast organization-local address.组播组织本地地址。 

    IN6_IS_ADDR_MC_GLOBAL IN6_IS_ADDR_MC_GLOBAL

        Multicast global address.全球多播地址。 [备选案文完]

文档

netinet详细介绍

netinet/in.h详细介绍名称netinet/in.h-Internetaddressfamilynetinet/in.h-互联网地址族SYNOPSIS故事大纲#include#包括DESCRIPTION描述Theheadershalldefinethefollowingtypes:该头应确定以下类型:in_port_tin_port_tEquivalenttothetypeuint16_tasdefinedin.等价的类型uint16_t在定义。in_addr_tin_addr_tEq
推荐度:
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top