1、由文件描述符打印IP地址及端口。(参考)#include<stdio.h>
#include<netdb.h>
#include<sys/socket.h>
#include<arpa/inet.h>
//由文件描述符打印对应IP地址和端口
voidPrintAddrByFd(intsockfd)
{
structsockaddr_inaddr_in;
socklen_tlen=siz..
分类:
系统相关 时间:
2016-02-04 19:14:31
阅读次数:
602
Redhat7配置DNS安装bind软件(略)#cp/etc/named.rfc1912.zones/etc/named.rfc1912.zones.bak#vi/etc/named.rfc1912.zones(将现有模板改下内容,其余可全删)zone“ming.com”IN{typemaster;file“ming.com.zone”;allow-update{none};};Zone“2.0.0.10.in-addr.arpa”IN{type..
分类:
其他好文 时间:
2015-12-02 01:09:00
阅读次数:
662
yuminstallbindbind-chroot[root@wnamed]#cat/etc/named.confoptions{directory"/var/named";};zone"."IN{typehint;file"named.ca";};zone"localhost"IN{typemaster;file"named.localhost";};zone"0.0.127.in-addr.arpa"IN{typemaster;file"named.loopback";};zone"sxlfxx.cn"I..
分类:
其他好文 时间:
2015-10-29 13:31:27
阅读次数:
103
安装bind[root@46/]#yum-yinstallbindbind-chrootbind-libsbind-utils目录说明/var/named/chroot/etc#存放named.conf/var/named/chroot/var/named#存放zone&arpa文件/var/log/messages#查看配置过程中出错信息[root@46etc]#pwd/var/named/chroot/etc[root@46etc]#cp-pnamed..
分类:
其他好文 时间:
2015-09-10 17:44:11
阅读次数:
264
“船载电子海图系统”是一套船用综合导航系统,集成了电子海图、GPS、AIS(Auto Identification System)、雷达/ARPA、电罗经、计程仪、自动舵、CDMA/GSM/GPRS等多种导航通讯设备,能够综合处理海上地理信息、本船航行状态信息、多种目标船动态信息、雷达图像信息、航行...
分类:
其他好文 时间:
2015-07-20 18:38:45
阅读次数:
665
#include<stdio.h>
#include<stdlib.h>
#include<netdb.h>
#include<arpa/inet.h>
int?main(int?argc,char?*argv[])
{
char?**pp;?/*指向字符串的指针*/
struct?in_addr?addr;?/*存储IP地址的结构体*/
...
分类:
其他好文 时间:
2015-07-07 00:59:28
阅读次数:
140
套接字的特性由三个属性确定 : 域, 类型, 协议.
1.域
AF_UNIX UNIX域协议 ( 文件系统套接字)
AF_INET ARPA因特网协议 (UNIX网络套接字)
...省略
2.类型
1) 流套接字: SOCK_STREAM
2) 数据报套接字 : SOCK_DGRAM
3. 协议
一般由套接...
分类:
系统相关 时间:
2015-06-15 23:58:28
阅读次数:
332
#include<stdlib.h>
#include<dirent.h>
#include<time.h>
#include<unistd.h>
#include<dirent.h>
#include<sys/types.h>
#include<errno.h>
#include<sys/socket.h>
#include<netinet/in.h>
#include<arpa/inet.h&..
分类:
其他好文 时间:
2015-05-21 19:59:33
阅读次数:
145
#include<stdlib.h>
#include<dirent.h>
#include<time.h>
#include<unistd.h>
#include<dirent.h>
#include<sys/types.h>
#include<errno.h>
#include<sys/socket.h>
#include<netinet/in.h>
#include<arpa/inet.h..
分类:
其他好文 时间:
2015-05-21 19:58:26
阅读次数:
229