原创 linux c語言檢查源端口被佔用
int socket_fd; struct sockaddr_in sin; socket_fd = socket(AF_INET,SOCK_STREAM,0); if(socket_fd ==-1) {
原创 libldap.so: undefined reference to `RAND_egd'
RAND_egd does not exist because OpenSSL was built with the default settingswhich, as of 1.1, has "EGD" disabled by defau
原创 MASQUERADE --random 端口不隨機
iptables -t nat -A POSTROUTING -o xxxx -j MASQUERADE --random發現源端口並不是隨機的而是有規律遞增,經過Google的搜索查找,發現新的版本有--random-full 這個參數i
原创 Forces DHCP serving
當把路由器的LAN口接到openwrt的LAN口時,openwrt 的LAN口DHCP功能異常,無法分配地址。處理方法:添加一行 option force 1 關閉client功能。 config dhcp lan opti
原创 TCP和UDP的最完整的區別
TCP UDPTCP與UDP基本區別 1.基於連接與無連接 2.TCP要求系統資源較多,UDP較少; 3.UDP程序結構較簡單 4.流模式(TCP)與數據報模式(UDP); 5.TCP保證數據正確性,UDP可能丟包 6.
原创 TCP三次握手和四次揮手過程
位碼即TCP標誌位S=SYN 發起連接標誌P=PUSH 傳送數據標誌F=FIN 關閉連接標誌R=RESET 異常關閉連接,鏈接重置. 表示沒有任何標誌,表示返回ack第一次握手:客戶端發送一個TCP的SYN標誌位置1的包,ACK=0,TCP
原创 Couldn't load match `state':No such file or direct
iptables -R OUTPUT 1 -m state --state ESTABLISHED -j ACCEPT iptables v1.6.1: Couldn't load match `state':No such file o
原创 fix feeds/telephony/net/freeswitch/Makefile
vim feeds/packages/lang/perl/perlmod.mk修改 include ../perl/perlver.mk爲 include ./perlver.mk
原创 OpenWRT flash分區、文件系統
1、瞭解分區在路由器的flash上時有分區的。openwrt首次刷機完成後,再過一段時間會有以下提示jffs2: notice: (246) jffs2_build_xattr_subsystem: complete building xa
原创 學習patch命令打補丁,diff命令製作補丁
patch:通過補丁文件,來對原文件打補丁diff: 比較兩個文件,然後生成一個補丁文件1.patch用法 patch -p[剝離層級] <[補丁文件]2.patch命令示例cd u-boot-1.1.6/ //進入原文件
原创 關閉dnsmasq的client功能
當把路由器的LAN口接到openwrt的LAN口時,openwrt 的LAN口DHCP功能異常,無法分配地址。處理方法:添加一行 option force 1 關閉client功能。 config dhcp lan option i
原创 physdev-in、physdev-out 不起作用
當開啓時:sysctl -w net.bridge.bridge-nf-call-iptables=1skb中存在physin和physout的接口信息,此時iptables規則可以使用-m physdev --physdev-in 和-m
原创 patch: **** malformed patch at line
patch: malformed patch at line 129出現這中錯誤,一般是 patch 生成後被手工修改了,如下的patch:數字6,表示記錄了6行原始文件,數字13表示記錄了13行目標文件如果你這時手工加了一行:這是你應用
原创 TCP三次握手和四次揮手過程
位碼即TCP標誌位S=SYN 發起連接標誌P=PUSH 傳送數據標誌F=FIN 關閉連接標誌R=RESET 異常關閉連接,鏈接重置. 表示沒有任何標誌,表示返回ack第一次握手:客戶端發送一個TCP的SYN標誌位置1的包,ACK=0,TCP
原创 config_get
docs/config.tex describes the configuration system as follows:"You can access already processed options with the config_