in.mh

来自「开放源码的编译器open watcom 1.6.0版的源代码」· MH 代码 · 共 38 行

MH
38
字号
/*
 *  netinet/in.h      IP related definitions
 *
:include crwat.sp
 */
#ifndef _NETINET_IN_H_INCLUDED
#define _NETINET_IN_H_INCLUDED
#include <sys/types.h>
:include readonly.sp
:include cpluspro.sp
:include lnxkpack.sp

/* Internet address. */
struct in_addr {
    uint32_t       s_addr;     /* address in network byte order */
};

struct sockaddr_in {
    sa_family_t    sin_family; /* address family: AF_INET */
    uint16_t       sin_port;   /* port in network byte order */
    struct in_addr sin_addr;   /* internet address */
    char           __pad[ 16 - sizeof( sa_family_t ) - sizeof( uint16_t ) - sizeof( struct in_addr ) ];
};

#define INADDR_ANY              0x00000000UL
#define INADDR_BROADCAST        0xffffffffUL
#define INADDR_NONE             0xffffffffUL

_WCRTLINK unsigned long int htonl(unsigned long int hostlong);
_WCRTLINK unsigned short int htons(unsigned short int hostshort);
_WCRTLINK unsigned long int ntohl(unsigned long int netlong);
_WCRTLINK unsigned short int ntohs(unsigned short int netshort);

:include poppack.sp
:include cplusepi.sp
#endif /* !_NETINET_IN_H_INCLUDED */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?