- 博客(6)
- 收藏
- 关注
原创 iptables-restore、iptables-save
iptables的配置文件 /etc/sysconfig/iptablesiptables-save > /etc/sysconfig/iptables 。iptables-save是将规则追加到一个文件,主要是配合iptables-restore命令测试操作:iptables -I INPUT -p tcp --dport 1000 -j ACCEPTiptables-sa...
2018-09-06 00:16:49 11780
原创 编译quagga-1.2.2时出现 No package 'libcares' found 问题
./configure --prefix=/usr/src/quagga (默认的安装路径是/usr/local/)编译过程出现的问题:configure: error: Package requirements (libcares) were not met:No package 'libcares' found Consider adjusting the PKG_CONF...
2018-09-04 00:31:03 3522 1
原创 关于inet_addr()函数陷阱
#include #include #include #include #include #include #include #include #include #include #include struct tokenID{ struct in_addr subnet_addr; struct in_addr outnet
2017-03-26 11:02:30 1167
原创 关于c++ 线程创建的线程运行函数和线程运行函数的参数(即pthread_creat()第3,4个参数)
pthread_create(&Threadid,NULL, ThreadProc,this);ThreadProc的声明:staticvoid*ThreadProc(void*pParam);在函数前面加static的原因:所有的非静态的成员函数的第一个参数都是一个隐式的this指针,因此void AcdSocket::startListen(vo
2016-12-01 19:20:27 980
转载 sockaddr_in
struct sockaddr {unsigned short sa_family; // address family, AF_xxxchar sa_data[14]; // 14 bytes of protocol address};sa_family是地址家族,是“AF_xxx”的形式。常设为“AF_INET”,代表Internet(TCP/IP)地址族。sa
2016-10-21 19:35:57 220
原创 setsockopt 与 SO_RCVBUF,SO_SNDBUF
在send()的时候,返回的是实际发送出去的字节(同步)或发送到socket缓冲区的字节(异步);系统默认的状态发送和接收一次为8688字节(约为8.5K);在实际的过程中发送数据和接收数据量比较大,可以设置socket缓冲区,而避免了send(),recv()不断的循环收发:
2016-10-21 18:59:03 2258
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人