Chinaunix首页 | 论坛 | 博客
  • 博客访问: 345140
  • 博文数量: 214
  • 博客积分: 4258
  • 博客等级: 上校
  • 技术积分: 2021
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-02 09:16
个人简介

http://blog.csdn.net/ly21st http://ly21st.blog.chinaunix.net

文章分类

全部博文(214)

文章存档

2018年(16)

2015年(1)

2014年(2)

2012年(22)

2011年(173)

发布时间:2011-09-24 09:49:47

11.2 getaddrinfo函数 int getaddrinfo(const char * hostname, const  char * service,  const struct addrinfo * hints,  struct  addrinfo  ** result);返回:成功返回0,出错返回非零       这个函数通过result返回一个指向addrinfo结构.........【阅读全文】

阅读(352) | 评论(0) | 转发(0)

发布时间:2011-09-22 19:00:05

9.1 概述        gethostname和gethostbyaddr在主机名字和ip地址间进行转换;       getservbyname和getservbyport在服务名和端口号间进行转换。9.2 域名系统        严格来说,FQDN也称为绝对名字(ab.........【阅读全文】

阅读(571) | 评论(0) | 转发(0)

发布时间:2011-09-21 11:48:56

/* include readline */#include "unp.h"static int read_cnt;static char *read_ptr;static char read_buf[MAXLINE];static ssize_tmy_read(int fd, char *ptr){ if (read_cnt <= 0) {again:  if ( (read_cnt = read(fd, read_buf, sizeof(read_buf))) < 0) {&n.........【阅读全文】

阅读(307) | 评论(0) | 转发(0)

发布时间:2011-09-21 10:34:04

#include <stdio.h>#include <stdlib.h>#include <errno.h>#include <netdb.h>#include <sys/types.h>#include <netinet/in.h>#include <sys/socket.h>    //added by liyuan#include <netinet/in.h>    //added by liyuan#include <arpa/inet.h>     //added.........【阅读全文】

阅读(222) | 评论(0) | 转发(0)

发布时间:2011-09-21 10:21:39

/* tcp4_10localip.c */#include <stdio.h> #include <string.h> #include <netdb.h> #include <arpa/inet.h> #include <netinet/in.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/ioctl.h> #include <net/if.h> #include <net/if_arp.h> #include <net/ethernet.h> #include <signal.h.........【阅读全文】

阅读(299) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册