一江春水向东流

做一个有思想的人,期待与每一位热爱思考的人交流,您的关注是对我最大的支持。

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  44 随笔 :: 139 文章 :: 81 评论 :: 0 Trackbacks
netdb.h:

/* Description of data base entry for a single host. */
struct hostent
{
char *h_name; /* Official name of host. */
char **h_aliases; /* Alias list. */
int h_addrtype; /* Host address type. */
int h_length; /* Length of address. */
char **h_addr_list; /* List of addresses from name server. */
#define h_addr h_addr_list[0] /* Address, for backward compatibility. */
};


struct sockaddr{
        unisgned short  as_family;
        char            sa_data[14];
};

struct sockaddr_in{
        unsigned short          sin_family;     
         unsigned short int      sin_port;
         struct in_addr          sin_addr;
         unsigned char           sin_zero[8];
}

typedef   uint32_t   in_addr_t;  
struct   in_addr   
{  
        in_addr_t   s_addr;   
};


posted on 2008-03-21 19:13 allic 阅读(318) 评论(0)  编辑  收藏 所属分类: C/C++

只有注册用户登录后才能发表评论。


网站导航: