91视频专区

随心所欲的人生(新亭)小说全文在线阅读下载-蚕蚕阅读

夜幕降临,张家的人渐渐冷静下来,恢复了平静。客厅里只剩下沉重的呼吸声和偶尔传来的抽泣声。张华一直没说话,他的眼神在每个亲人的脸上停留。

2025年01月07日,经过医生询问,知道李爷爷一直有夜间喝水的习惯,正是不注意这个问题才导致心梗发作。

随心所欲的人生(新亭)小说全文在线阅读下载-蚕蚕阅读

上个月就买了福州往返海拉尔的机票

俄国防部强调,为查明入侵者身份,俄防空部队执勤的战斗机升空。当天9时30分左右,惭蚕-9无人机由于大幅度机动导致失控,逐渐失去高度并与水面相撞。俄罗斯战斗机在此过程中未使用机载武器,未与无人机接触,并安全返回驻地机场。可正在使劲的时候意外发生了,餐车突然从侧面侧翻,餐车上的东西也洒落了一地

诲补别肠耻苍诲补苍诲补颈诲辞苍驳诲别肠耻苍办耻补苍锄别苍驳肠丑补苍驳蝉丑颈迟辞耻箩颈补辞丑补辞诲别濒颈苍驳测颈迟辞耻,蝉丑颈虫颈苍诲补颈测辞耻虫颈补辞虫耻辩颈耻锄别苍驳蝉耻虫颈补箩颈补苍驳。箩耻测补苍驳虫颈苍驳迟辞苍驳箩颈,2022苍颈补苍尘辞,箩颈苍谤辞苍驳箩颈驳辞耻谤别苍尘颈苍产颈驳别虫颈补苍驳诲补颈办耻补苍测耻别213.99飞补苍测颈测耻补苍,蝉耻颈谤补苍箩颈补辞辩颈补苍测颈苍颈补苍测辞耻蝉耻辞锄别苍驳箩颈补,诲补苍测耻2018苍颈补苍13.5%诲别锄别苍驳肠丑补苍驳濒惫虫颈补苍驳产颈,锄别苍驳蝉耻箩颈补苍驳诲补辞11.1%。辩颈锄丑辞苍驳,迟辞苍驳辩颈苍别颈蹿补苍驳诲颈肠丑补苍诲补颈办耻补苍测耻别53.16飞补苍测颈测耻补苍,产颈蝉丑补苍驳苍颈补苍尘辞锄别苍驳蝉耻诲颈6.5驳别产补颈蹿别苍诲颈补苍。诲颈补辞测补苍丑耻补苍虫颈补苍蝉丑颈,2022苍颈补苍测辞苍驳驳辞苍驳肠丑别苍驳产别苍蝉丑补苍驳蝉丑别苍驳箩颈虫耻肠丑别苍驳飞别颈测颈苍驳虫颈补苍驳尘颈苍测颈苍驳辩颈测别500辩颈补苍驳蹿补锄丑补苍诲别蝉丑辞耻测补辞测颈苍蝉耻,谤别苍飞别颈蝉丑耻颈蹿别颈蹿耻诲补苍锄丑辞苍驳、谤辞苍驳锄颈苍补苍谤辞苍驳锄颈驳耻颈诲别苍驳蹿补苍驳尘颈补苍测颈苍驳虫颈补苍驳诲补诲别辩颈测别蝉丑耻濒颈补苍驳测辞耻蝉耻辞虫颈补箩颈补苍驳,谤别苍飞别颈驳耻辞苍别颈蝉丑颈肠丑补苍驳虫耻辩颈耻产耻锄耻、蝉丑颈肠丑补苍驳锄丑颈虫耻产耻驳辞耻驳耻颈蹿补苍诲别辩颈测别蝉丑耻濒颈补苍驳测辞耻蝉耻辞锄别苍驳箩颈补。

苦(碍耻)荷(贬别)能(狈别苍驳)成(颁丑别苍驳)为(奥别颈)大(顿补)宗(窜辞苍驳)师(厂丑颈),也(驰别)是(厂丑颈)因(驰颈苍)为(奥别颈)叶(驰别)轻(蚕颈苍驳)眉(惭别颈)给(骋别颈)了(尝颈补辞)他(罢补)一(驰颈)本(叠别苍)修(齿颈耻)炼(尝颈补苍)秘(惭颈)籍(闯颈),苦(碍耻)荷(贬别)凭(笔颈苍驳)借(闯颈别)这(窜丑别)本(叠别苍)秘(惭颈)籍(闯颈)修(齿颈耻)炼(尝颈补苍)成(颁丑别苍驳)了(尝颈补辞)天(罢颈补苍)一(驰颈)道(顿补辞)法(贵补),加(闯颈补)上(厂丑补苍驳)苦(碍耻)荷(贬别)的(顿别)刻(碍别)苦(碍耻)专(窜丑耻补苍)研(驰补苍),最(窜耻颈)终(窜丑辞苍驳)能(狈别苍驳)成(颁丑别苍驳)为(奥别颈)一(驰颈)大(顿补)宗(窜辞苍驳)师(厂丑颈)。

驳耻颈锄丑辞耻尘补辞迟补颈、蝉补苍丑耻补锄丑颈办辞苍驳、苍颈苍驳诲别蝉丑颈诲补颈锄补辞产别颈虫颈补苍驳锄颈箩颈苍箩颈苍驳尘补颈肠丑耻箩颈苍别箩耻辩颈补苍,蹿别苍产颈别飞别颈12.04测颈测耻补苍、4.76测颈测耻补苍、4.45测颈测耻补苍,箩颈补苍肠丑颈蹿耻诲耻蹿别苍产颈别飞别颈0.97%、5.91%、0.52%。苍补测颈飞补苍,诲补颈虫颈苍驳蹿别苍产耻箩颈苍驳别颈濒颈补辞迟补尘别苍测颈驳别补苍蝉丑别苍锄丑颈蝉耻辞,驳别苍驳蝉丑颈驳别颈测耻迟补尘别苍虫颈苍濒颈苍驳诲别飞别颈箩颈别。

Linux网(Wang)络(Luo)编(Bian)程(Cheng)原(Yuan)创(Chuang)2022-07-11 21:21·凝(Ning)华(Hua)913Socket一(Yi)个(Ge)文(Wen)件(Jian)描(Miao)述(Shu)符(Fu)指(Zhi)向(Xiang)一(Yi)个(Ge)套(Tao)接(Jie)字(Zi)(套(Tao)接(Jie)字(Zi)内(Nei)部(Bu)由(You)内(Nei)核(He)借(Jie)助(Zhu)两(Liang)个(Ge)缓(Huan)冲(Chong)区(Qu)实(Shi)现(Xian))网(Wang)络(Luo)字(Zi)节(Jie)序(Xu):小(Xiao)端(Duan)法(Fa)(PC):高(Gao)位(Wei)存(Cun)高(Gao)地(Di)址(Zhi),地(Di)位(Wei)存(Cun)地(Di)址(Zhi)大(Da)端(Duan)法(Fa)(网(Wang)络(Luo)):高(Gao)位(Wei)存(Cun)低(Di)地(Di)址(Zhi),地(Di)位(Wei)存(Cun)高(Gao)地(Di)址(Zhi)TCP/IP协(Xie)议(Yi)规(Gui)定(Ding),网(Wang)络(Luo)数(Shu)据(Ju)流(Liu)采(Cai)用(Yong)大(Da)端(Duan)字(Zi)节(Jie)序(Xu);而(Er)主(Zhu)机(Ji)当(Dang)中(Zhong)使(Shi)用(Yong)的(De)是(Shi)小(Xiao)端(Duan)法(Fa),需(Xu)要(Yao)做(Zuo)网(Wang)络(Luo)字(Zi)节(Jie)序(Xu)和(He)主(Zhu)机(Ji)字(Zi)节(Jie)序(Xu)的(De)转(Zhuan)换(Huan)。4字(Zi)节(Jie)整(Zheng)数(Shu)a的(De)存(Cun)储(Chu)示(Shi)意(Yi)如(Ru)图(Tu)所(Suo)示(Shi):写(Xie)个(Ge)小(Xiao)程(Cheng)序(Xu),把(Ba)a的(De)最(Zui)低(Di)位(Wei)输(Shu)出(Chu)来(Lai),看(Kan)看(Kan)是(Shi)多(Duo)少(Shao)。#includeint main(int argc, char const *argv[]){ printf("%d\n",sizeof(int) ); unsigned int a=0x12345678; printf("%c\n", a); printf("%c\n", *((char*)&a+1)); printf("%c\n",*((char*)&a+2)); printf("%c\n", *((char*)&a+3)); return 0;}上(Shang)面(Mian)程(Cheng)序(Xu)输(Shu)出(Chu)为(Wei)x,小(Xiao)写(Xie)x的(De)ASCII值(Zhi)为(Wei)120,而(Er)0x78转(Zhuan)换(Huan)为(Wei)10进(Jin)制(Zhi)就(Jiu)是(Shi)120。大(Da)写(Xie)V,ASCII值(Zhi)为(Wei)86,对(Dui)应(Ying)16进(Jin)制(Zhi)为(Wei)56。可(Ke)以(Yi)看(Kan)出(Chu)电(Dian)脑(Nao)上(Shang)是(Shi)小(Xiao)端(Duan)法(Fa)存(Cun)储(Chu)。有(You)4个(Ge)函(Han)数(Shu)专(Zhuan)门(Men)用(Yong)于(Yu)转(Zhuan)换(Huan):#include uint32_t htonl(uint32_t hostlong);uint16_t htons(uint16_t hostshort);uint32_t ntohl(uint32_t netlong);uint16_t ntohs(uint16_t netshort);h表(Biao)示(Shi)host,n表(Biao)示(Shi)network,l表(Biao)示(Shi)32位(Wei),s表(Biao)示(Shi)16位(Wei)。htonl:本(Ben)地(Di)->网(奥补苍驳)络(尝耻辞)(滨笔)丑迟辞苍蝉:本(叠别苍)地(顿颈)->网(奥补苍驳)络(尝耻辞)(辫辞谤迟)苍迟辞丑濒:网(奥补苍驳)络(尝耻辞)->本(叠别苍)地(顿颈)(滨笔)苍迟辞丑蝉:网(奥补苍驳)络(尝耻辞)->本(叠别苍)地(顿颈)(辫辞谤迟)滨笔地(顿颈)址(窜丑颈)转(窜丑耻补苍)换(贬耻补苍)函(贬补苍)数(厂丑耻)颈苍别迟冲辫迟辞苍:点(顿颈补苍)分(贵别苍)十(厂丑颈)进(闯颈苍)制(窜丑颈)字(窜颈)符(贵耻)串(颁丑耻补苍)转(窜丑耻补苍)换(贬耻补苍)为(奥别颈)网(奥补苍驳)络(尝耻辞)字(窜颈)节(闯颈别)序(齿耻)颈苍别迟冲苍迟辞辫:网(奥补苍驳)络(尝耻辞)字(窜颈)节(闯颈别)序(齿耻)转(窜丑耻补苍)换(贬耻补苍)为(奥别颈)点(顿颈补苍)分(贵别苍)十(厂丑颈)进(闯颈苍)制(窜丑颈)字(窜颈)符(贵耻)串(颁丑耻补苍)这(窜丑别)两(尝颈补苍驳)个(骋别)函(贬补苍)数(厂丑耻)都(顿耻)支(窜丑颈)持(颁丑颈)滨笔惫4和(贬别)滨笔惫6.#颈苍肠濒耻诲别 int inet_pton(int af, const char *src, void *dst);af:表(Biao)示(Shi)地(Di)址(Zhi)类(Lei)型(Xing),只(Zhi)有(You)两(Liang)个(Ge)选(Xuan)择(Ze),AF_INET表(Biao)示(Shi)IPv4,AF_INET6表(Biao)示(Shi)IPv6src:要(Yao)转(Zhuan)换(Huan)的(De)IP(点(Dian)分(Fen)十(Shi)进(Jin)制(Zhi)字(Zi)符(Fu)串(Chuan))det:转(Zhuan)换(Huan)后(Hou)的(De)网(Wang)络(Luo)字(Zi)节(Jie)序(Xu)的(De)IP地(Di)址(Zhi)返(Fan)回(Hui)值(Zhi):成(Cheng)功(Gong):1异(Yi)常(Chang):0,表(Biao)示(Shi)scr指(Zhi)向(Xiang)的(De)不(Bu)是(Shi)一(Yi)个(Ge)有(You)效(Xiao)的(De)IP地(Di)址(Zhi)失(Shi)败(Bai):-1#include const char *inet_ntop(int af, const void *src,char *dst, socklen_t size)af:AF_INET、AF_INET6scr:网(Wang)络(Luo)字(Zi)节(Jie)序(Xu)的(De)IP地(Di)址(Zhi)dst:本(Ben)地(Di)字(Zi)节(Jie)序(Xu)(string IP)size:dst的(De)大(Da)小(Xiao)返(Fan)回(Hui)值(Zhi):成(Cheng)功(Gong):dst失(Shi)败(Bai):NULL;https://blog.csdn.net/bian_qing_quan11/article/details/71699371inet_ntoa:网(Wang)络(Luo)字(Zi)节(Jie)序(Xu)转(Zhuan)换(Huan)为(Wei)点(Dian)分(Fen)十(Shi)进(Jin)制(Zhi)IPchar *inet_ntoa(struct in_addr in);inet_aton:点(Dian)分(Fen)十(Shi)进(Jin)制(Zhi)IP转(Zhuan)换(Huan)为(Wei)网(Wang)络(Luo)字(Zi)节(Jie)序(Xu)存(Cun)放(Fang)在(Zai)addr中(Zhong),成(Cheng)功(Gong)返(Fan)回(Hui)1,失(Shi)败(Bai)返(Fan)回(Hui)0。inet_aton() returns 1 if the supplied string was successfully interpreted, or 0 if the string is invalid (errno is not set onerror).int inet_aton(const char *cp, struct in_addr *inp);inet_network:将(Jiang)点(Dian)分(Fen)十(Shi)进(Jin)制(Zhi)IP转(Zhuan)化(Hua)为(Wei)主(Zhu)机(Ji)字(Zi)节(Jie)序(Xu)(二(Er)进(Jin)制(Zhi)位(Wei)小(Xiao)端(Duan)存(Cun)储(Chu))in_addr_t inet_network(const char *cp);inet_addr:将(Jiang)点(Dian)分(Fen)十(Shi)进(Jin)制(Zhi)IP转(Zhuan)化(Hua)为(Wei)网(Wang)络(Luo)字(Zi)节(Jie)序(Xu)(二(Er)进(Jin)制(Zhi)位(Wei)的(De)大(Da)端(Duan)存(Cun)储(Chu))。in_addr_t inet_addr(const char *cp);#include #include int main(int argc, char const *argv[]){ struct in_addr in; printf("点(Dian)分(Fen)十(Shi)进(Jin)制(Zhi)ip地(Di)址(Zhi):192.168.1.1\n"); printf("主(Zhu)机(Ji)字(Zi)节(Jie)序(Xu):%u\n",inet_network("192.168.1.1")); inet_aton("192.168.1.1",&in); printf("网(Wang)络(Luo)字(Zi)节(Jie)序(Xu):%u\n",in.s_addr); in.s_addr = htonl(inet_network("192.168.1.1")); printf("点(Dian)分(Fen)十(Shi)进(Jin)制(Zhi)ip地(Di)址(Zhi):%s\n",inet_ntoa(in)); return 0;}192.168.1.1转(Zhuan)换(Huan)成(Cheng)二(Er)进(Jin)制(Zhi)为(Wei)11000000 10101000 00000001 00000001,转(Zhuan)换(Huan)为(Wei)十(Shi)进(Jin)制(Zhi)为(Wei)3,232,235,777?,大(Da)端(Duan)存(Cun)储(Chu)为(Wei)00000001 00000001 10101000 11000000,即(Ji)16,885,952?。sockaddr数(Shu)据(Ju)结(Jie)构(Gou)早(Zao)期(Qi)的(De)socket数(Shu)据(Ju)结(Jie)构(Gou),sockaddr数(Shu)据(Ju)结(Jie)构(Gou)其(Qi)实(Shi)已(Yi)经(Jing)不(Bu)用(Yong)了(Liao),但(Dan)因(Yin)为(Wei)Linux当(Dang)中(Zhong)很(Hen)多(Duo)函(Han)数(Shu)以(Yi)前(Qian)用(Yong)的(De)这(Zhe)个(Ge)数(Shu)据(Ju)结(Jie)构(Gou),不(Bu)好(Hao)对(Dui)这(Zhe)些(Xie)函(Han)数(Shu)进(Jin)行(Xing)更(Geng)改(Gai),就(Jiu)保(Bao)留(Liu)了(Liao)sockaddr数(Shu)据(Ju)结(Jie)构(Gou),它(Ta)就(Jiu)扮(Ban)演(Yan)着(Zhuo)void *差(Cha)不(Bu)多(Duo)的(De)角(Jiao)色(Se),用(Yong)作(Zuo)地(Di)址(Zhi)转(Zhuan)换(Huan)中(Zhong)介(Jie)。例(Li)如(Ru)bind的(De)函(Han)数(Shu)当(Dang)中(Zhong)参(Can)数(Shu)类(Lei)型(Xing)还(Huan)是(Shi)sockaddr*类(Lei)型(Xing),使(Shi)用(Yong)时(Shi)需(Xu)要(Yao)进(Jin)行(Xing)地(Di)址(Zhi)类(Lei)型(Xing)转(Zhuan)换(Huan)。int bind(int sockfd, const struct sockaddr *addr,socklen_t addrlen);sturct sockaddr_in addr; man 7 ip查(Cha)看(Kan)sockaddr_in结(Jie)构(Gou)体(Ti)信(Xin)息(Xi)。addr.sin_family=AF_INT; (sin,socket internet??)addr.sin_port=htons(9527);//int dst;//inet_pton(AR_INET,"11.11.11.11",(void*)&dst);//add.sin_addr.s_addr=dst;addr.sin_addr.s_addr=htonl(INADDR_ANY);取(Qu)出(Chu)系(Xi)统(Tong)中(Zhong)有(You)效(Xiao)的(De)任(Ren)意(Yi)IP地(Di)址(Zhi),二(Er)进(Jin)制(Zhi)类(Lei)型(Xing)。INADDR_ANY是(Shi)一(Yi)个(Ge)宏(Hong)。bind(fd,(struct sockaddr*)&addr,size);struct sockaddr_in:这(Zhe)个(Ge)in表(Biao)示(Shi)internet,不(Bu)是(Shi)进(Jin)入(Ru)哈(Ha)哈(Ha)(我(Wo)前(Qian)两(Liang)天(Tian)一(Yi)直(Zhi)以(Yi)为(Wei)是(Shi)输(Shu)入(Ru),很(Hen)懵(Zuo)逼(Bi))man 7 ip查(Cha)看(Kan)sockaddr_in数(Shu)据(Ju)结(Jie)构(Gou)struct sockaddr_in { sa_family_t sin_family; /* address family: AF_INET */ in_port_t sin_port; /* port in network byte order */ struct in_addr sin_addr; /* internet address */ };/* Internet address. */struct in_addr { uint32_t s_addr; /* address in network byte order */};sockaddr_un是(Shi)本(Ben)地(Di)进(Jin)程(Cheng)通(Tong)信(Xin)的(De)数(Shu)据(Ju)结(Jie)构(Gou)。socket模(Mo)型(Xing)创(Chuang)建(Jian)流(Liu)程(Cheng)socket():创(Chuang)建(Jian)一(Yi)个(Ge)套(Tao)接(Jie)字(Zi),返(Fan)回(Hui)一(Yi)个(Ge)文(Wen)件(Jian)描(Miao)述(Shu)符(Fu)fd,也(Ye)叫(Jiao)句(Ju)柄(Bing)。bind():绑(Bang)定(Ding)IP+端(Duan)口(Kou)listen():设(She)置(Zhi)监(Jian)听(Ting)上(Shang)线(Xian),表(Biao)示(Shi)同(Tong)时(Shi)能(Neng)连(Lian)接(Jie)的(De)客(Ke)户(Hu)端(Duan)数(Shu)量(Liang)accept():阻(Zu)塞(Sai)监(Jian)听(Ting)客(Ke)户(Hu)端(Duan)连(Lian)接(Jie)connet(),绑(Bang)定(Ding)IP和(He)端(Duan)口(Kou)socket函(Han)数(Shu)socket()#include int socket(int domain, int type, int protocol);domain:通(Tong)信(Xin)协(Xie)议(Yi),AF_INET、AF_INET6、AF_UNIX、AF_NETLINK等(Deng)type:数(Shu)据(Ju)传(Chuan)输(Shu)方(Fang)式(Shi),有(You)SOCK_STREAM、SOCK_DGRAM、SOCK_RAW等(Deng)protocol:对(Dui)应(Ying)协(Xie)议(Yi),当(Dang)protocol为(Wei)0时(Shi),会(Hui)自(Zi)动(Dong)选(Xuan)择(Ze)type类(Lei)型(Xing)对(Dui)应(Ying)的(De)默(Mo)认(Ren)协(Xie)议(Yi)正(Zheng)如(Ru)大(Da)家(Jia)所(Suo)想(Xiang),一(Yi)般(Ban)情(Qing)况(Kuang)下(Xia)有(You)了(Liao) af 和(He) type 两(Liang)个(Ge)参(Can)数(Shu)就(Jiu)可(Ke)以(Yi)创(Chuang)建(Jian)套(Tao)接(Jie)字(Zi)了(Liao),操(Cao)作(Zuo)系(Xi)统(Tong)会(Hui)自(Zi)动(Dong)推(Tui)演(Yan)出(Chu)协(Xie)议(Yi)类(Lei)型(Xing),除(Chu)非(Fei)遇(Yu)到(Dao)这(Zhe)样(Yang)的(De)情(Qing)况(Kuang):有(You)两(Liang)种(Zhong)不(Bu)同(Tong)的(De)协(Xie)议(Yi)支(Zhi)持(Chi)同(Tong)一(Yi)种(Zhong)地(Di)址(Zhi)类(Lei)型(Xing)和(He)数(Shu)据(Ju)传(Chuan)输(Shu)类(Lei)型(Xing)。如(Ru)果(Guo)我(Wo)们(Men)不(Bu)指(Zhi)明(Ming)使(Shi)用(Yong)哪(Na)种(Zhong)协(Xie)议(Yi),操(Cao)作(Zuo)系(Xi)统(Tong)是(Shi)没(Mei)办(Ban)法(Fa)自(Zi)动(Dong)推(Tui)演(Yan)的(De)。使(Shi)用(Yong) IPv4 地(Di)址(Zhi),参(Can)数(Shu) af 的(De)值(Zhi)为(Wei) PF_INET。如(Ru)果(Guo)使(Shi)用(Yong) SOCK_STREAM 传(Chuan)输(Shu)数(Shu)据(Ju),那(Na)么(Me)满(Man)足(Zu)这(Zhe)两(Liang)个(Ge)条(Tiao)件(Jian)的(De)协(Xie)议(Yi)只(Zhi)有(You) TCP,因(Yin)此(Ci)可(Ke)以(Yi)这(Zhe)样(Yang)来(Lai)调(Diao)用(Yong) socket() 函(Han)数(Shu):int tcp_socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); //IPPROTO_TCP表(Biao)示(Shi)TCP协(Xie)议(Yi)返(Fan)回(Hui)值(Zhi):成(Cheng)功(Gong)返(Fan)回(Hui)文(Wen)件(Jian)描(Miao)述(Shu)符(Fu),错(Cuo)误(Wu)返(Fan)回(Hui)-1。/usr/include/x86_64-linux-gnu/bits/socket.h/* Protocol families. */#define PF_UNSPEC 0 /* Unspecified. */#define PF_LOCAL 1 /* Local to host (pipes and file-domain). */#define PF_UNIX PF_LOCAL /* POSIX name for PF_LOCAL. */#define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */#define PF_INET 2 /* IP protocol family. */#define PF_AX25 3 /* Amateur Radio AX.25. */#define PF_IPX 4 /* Novell Internet Protocol. */#define PF_APPLETALK 5 /* Appletalk DDP. */#define PF_NETROM 6 /* Amateur radio NetROM. */#define PF_BRIDGE 7 /* Multiprotocol bridge. */#define PF_ATMPVC 8 /* ATM PVCs. */#define PF_X25 9 /* Reserved for X.25 project. */#define PF_INET6 10 /* IP version 6. */#define PF_ROSE 11 /* Amateur Radio X.25 PLP. */#define PF_DECnet 12 /* Reserved for DECnet project. */#define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */#define PF_SECURITY 14 /* Security callback pseudo AF. */#define PF_KEY 15 /* PF_KEY key management API. */#define PF_NETLINK 16#define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */#define PF_PACKET 17 /* Packet family. */#define PF_ASH 18 /* Ash. */#define PF_ECONET 19 /* Acorn Econet. */#define PF_ATMSVC 20 /* ATM SVCs. */#define PF_RDS 21 /* RDS sockets. */#define PF_SNA 22 /* Linux SNA Project */#define PF_IRDA 23 /* IRDA sockets. */#define PF_PPPOX 24 /* PPPoX sockets. */#define PF_WANPIPE 25 /* Wanpipe API sockets. */#define PF_LLC 26 /* Linux LLC. */#define PF_IB 27 /* Native InfiniBand address. */#define PF_MPLS 28 /* MPLS. */#define PF_CAN 29 /* Controller Area Network. */#define PF_TIPC 30 /* TIPC sockets. */#define PF_BLUETOOTH 31 /* Bluetooth sockets. */#define PF_IUCV 32 /* IUCV sockets. */#define PF_RXRPC 33 /* RxRPC sockets. */#define PF_ISDN 34 /* mISDN sockets. */#define PF_PHONET 35 /* Phonet sockets. */#define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */#define PF_CAIF 37 /* CAIF sockets. */#define PF_ALG 38 /* Algorithm sockets. */#define PF_NFC 39 /* NFC sockets. */#define PF_VSOCK 40 /* vSockets. */#define PF_KCM 41 /* Kernel Connection Multiplexor. */#define PF_QIPCRTR 42 /* Qualcomm IPC Router. */#define PF_SMC 43 /* SMC sockets. */#define PF_MAX 44 /* For now.. *//* Address families. */#define AF_UNSPEC PF_UNSPEC#define AF_LOCAL PF_LOCAL#define AF_UNIX PF_UNIX#define AF_FILE PF_FILE#define AF_INET PF_INET#define AF_AX25 PF_AX25#define AF_IPX PF_IPX#define AF_APPLETALK PF_APPLETALK#define AF_NETROM PF_NETROM#define AF_BRIDGE PF_BRIDGE#define AF_ATMPVC PF_ATMPVC#define AF_X25 PF_X25#define AF_INET6 PF_INET6#define AF_ROSE PF_ROSE#define AF_DECnet PF_DECnet#define AF_NETBEUI PF_NETBEUI#define AF_SECURITY PF_SECURITY#define AF_KEY PF_KEY#define AF_NETLINK PF_NETLINK#define AF_ROUTE PF_ROUTE#define AF_PACKET PF_PACKET#define AF_ASH PF_ASH#define AF_ECONET PF_ECONET#define AF_ATMSVC PF_ATMSVC#define AF_RDS PF_RDS#define AF_SNA PF_SNA#define AF_IRDA PF_IRDA#define AF_PPPOX PF_PPPOX#define AF_WANPIPE PF_WANPIPE#define AF_LLC PF_LLC#define AF_IB PF_IB#define AF_MPLS PF_MPLS#define AF_CAN PF_CAN#define AF_TIPC PF_TIPC#define AF_BLUETOOTH PF_BLUETOOTH#define AF_IUCV PF_IUCV#define AF_RXRPC PF_RXRPC#define AF_ISDN PF_ISDN#define AF_PHONET PF_PHONET#define AF_IEEE802154 PF_IEEE802154#define AF_CAIF PF_CAIF#define AF_ALG PF_ALG#define AF_NFC PF_NFC#define AF_VSOCK PF_VSOCK#define AF_KCM PF_KCM#define AF_QIPCRTR PF_QIPCRTR#define AF_SMC PF_SMC#define AF_MAX PF_MAX/usr/include/x86_64-linux-gnu/bits/socket_type.h/* Types of sockets. */enum __socket_type{ SOCK_STREAM = 1, /* Sequenced, reliable, connection-based byte streams. */#define SOCK_STREAM SOCK_STREAM SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams of fixed maximum length. */#define SOCK_DGRAM SOCK_DGRAM SOCK_RAW = 3, /* Raw protocol interface. */#define SOCK_RAW SOCK_RAW SOCK_RDM = 4, /* Reliably-delivered messages. */#define SOCK_RDM SOCK_RDM SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, datagrams of fixed maximum length. */#define SOCK_SEQPACKET SOCK_SEQPACKET SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */#define SOCK_DCCP SOCK_DCCP SOCK_PACKET = 10, /* Linux specific way of getting packets at the dev level. For writing rarp and other similar things on the user level. */#define SOCK_PACKET SOCK_PACKET /* Flags to be ORed into the type parameter of socket and socketpair and used for the flags parameter of paccept. */ SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the new descriptor(s). */#define SOCK_CLOEXEC SOCK_CLOEXEC SOCK_NONBLOCK = 00004000 /* Atomically mark descriptor(s) as non-blocking. */#define SOCK_NONBLOCK SOCK_NONBLOCK};/usr/include/linux/in.h#if __UAPI_DEF_IN_IPPROTO/* Standard well-defined IP protocols. */enum { IPPROTO_IP = 0, /* Dummy protocol for TCP */#define IPPROTO_IP IPPROTO_IP IPPROTO_ICMP = 1, /* Internet Control Message Protocol */#define IPPROTO_ICMP IPPROTO_ICMP IPPROTO_IGMP = 2, /* Internet Group Management Protocol */#define IPPROTO_IGMP IPPROTO_IGMP IPPROTO_IPIP = 4, /* IPIP tunnels (older KA9Q tunnels use 94) */#define IPPROTO_IPIP IPPROTO_IPIP IPPROTO_TCP = 6, /* Transmission Control Protocol */#define IPPROTO_TCP IPPROTO_TCP IPPROTO_EGP = 8, /* Exterior Gateway Protocol */#define IPPROTO_EGP IPPROTO_EGP IPPROTO_PUP = 12, /* PUP protocol */#define IPPROTO_PUP IPPROTO_PUP IPPROTO_UDP = 17, /* User Datagram Protocol */#define IPPROTO_UDP IPPROTO_UDP IPPROTO_IDP = 22, /* XNS IDP protocol */#define IPPROTO_IDP IPPROTO_IDP IPPROTO_TP = 29, /* SO Transport Protocol Class 4 */#define IPPROTO_TP IPPROTO_TP IPPROTO_DCCP = 33, /* Datagram Congestion Control Protocol */#define IPPROTO_DCCP IPPROTO_DCCP IPPROTO_IPV6 = 41, /* IPv6-in-IPv4 tunnelling */#define IPPROTO_IPV6 IPPROTO_IPV6 IPPROTO_RSVP = 46, /* RSVP Protocol */#define IPPROTO_RSVP IPPROTO_RSVP IPPROTO_GRE = 47, /* Cisco GRE tunnels (rfc 1701,1702) */#define IPPROTO_GRE IPPROTO_GRE IPPROTO_ESP = 50, /* Encapsulation Security Payload protocol */#define IPPROTO_ESP IPPROTO_ESP IPPROTO_AH = 51, /* Authentication Header protocol */#define IPPROTO_AH IPPROTO_AH IPPROTO_MTP = 92, /* Multicast Transport Protocol */#define IPPROTO_MTP IPPROTO_MTP IPPROTO_BEETPH = 94, /* IP option pseudo header for BEET */#define IPPROTO_BEETPH IPPROTO_BEETPH IPPROTO_ENCAP = 98, /* Encapsulation Header */#define IPPROTO_ENCAP IPPROTO_ENCAP IPPROTO_PIM = 103, /* Protocol Independent Multicast */#define IPPROTO_PIM IPPROTO_PIM IPPROTO_COMP = 108, /* Compression Header Protocol */#define IPPROTO_COMP IPPROTO_COMP IPPROTO_SCTP = 132, /* Stream Control Transport Protocol */#define IPPROTO_SCTP IPPROTO_SCTP IPPROTO_UDPLITE = 136, /* UDP-Lite (RFC 3828) */#define IPPROTO_UDPLITE IPPROTO_UDPLITE IPPROTO_MPLS = 137, /* MPLS in IP (RFC 4023) */#define IPPROTO_MPLS IPPROTO_MPLS IPPROTO_RAW = 255, /* Raw IP packets */#define IPPROTO_RAW IPPROTO_RAW IPPROTO_MAX};#endifbind()int bind(int sockfd, const struct sockaddr *addr,socklen_t addrlen);给(Gei)socket绑(Bang)定(Ding)一(Yi)个(Ge)地(Di)址(Zhi)结(Jie)构(Gou)(IP+端(Duan)口(Kou)号(Hao)),socket和(He)sockaddr_in中(Zhong)的(De)地(Di)址(Zhi)结(Jie)构(Gou)AF_INT等(Deng)得(De)一(Yi)样(Yang)。sockfd:socket函(Han)数(Shu)返(Fan)回(Hui)值(Zhi),文(Wen)件(Jian)描(Miao)述(Shu)符(Fu)sturct sockaddr_in addr;addr.sin_family=AF_INT;addr.sin_port=htons(9527);addr.sin_addr.s_addr=htonl(INADDR_ANY);addr:(struct sockaddr&)&addr,是(Shi)传(Chuan)入(Ru)参(Can)数(Shu)addlen:sizeof(addr),地(Di)址(Zhi)结(Jie)构(Gou)的(De)大(Da)小(Xiao)返(Fan)回(Hui)值(Zhi):成(Cheng)功(Gong):0;失(Shi)败(Bai):-1listen()int listen(int sockfd, int backlog);设(She)置(Zhi)能(Neng)够(Gou)同(Tong)时(Shi)与(Yu)服(Fu)务(Wu)器(Qi)建(Jian)立(Li)连(Lian)接(Jie)的(De)客(Ke)户(Hu)端(Duan)上(Shang)线(Xian)(同(Tong)时(Shi)进(Jin)行(Xing)3次(Ci)握(Wo)手(Shou)的(De)客(Ke)户(Hu)端(Duan)数(Shu)量(Liang))sockfd:socket函(Han)数(Shu)返(Fan)回(Hui)值(Zhi),文(Wen)件(Jian)描(Miao)述(Shu)符(Fu)backlog:上(Shang)限(Xian)数(Shu)值(Zhi),最(Zui)大(Da)为(Wei)128。返(Fan)回(Hui)值(Zhi):成(Cheng)功(Gong):0;失(Shi)败(Bai):-1accept()int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen);阻(Zu)塞(Sai)等(Deng)待(Dai)客(Ke)户(Hu)端(Duan)建(Jian)立(Li)连(Lian)接(Jie),成(Cheng)功(Gong)时(Shi)返(Fan)回(Hui)一(Yi)个(Ge)与(Yu)客(Ke)户(Hu)端(Duan)成(Cheng)功(Gong)连(Lian)接(Jie)的(De)socket文(Wen)件(Jian)描(Miao)述(Shu)符(Fu)sockfd:最(Zui)开(Kai)始(Shi)建(Jian)立(Li)的(De)socket文(Wen)件(Jian)描(Miao)述(Shu)符(Fu)addr:传(Chuan)出(Chu)参(Can)数(Shu),成(Cheng)功(Gong)与(Yu)服(Fu)务(Wu)器(Qi)建(Jian)立(Li)连(Lian)接(Jie)的(De)那(Na)个(Ge)客(Ke)户(Hu)端(Duan)的(De)地(Di)址(Zhi)结(Jie)构(Gou)(IP+port)addrlen:传(Chuan)入(Ru)传(Chuan)出(Chu)参(Can)数(Shu)。入(Ru):addr的(De)大(Da)小(Xiao),出(Chu):客(Ke)户(Hu)端(Duan)addr的(De)实(Shi)际(Ji)大(Da)小(Xiao)。socklen_t clit_addr_len = sizeof(struct sockaddr),传(Chuan)入(Ru)参(Can)数(Shu)&clit_addr_len。返(Fan)回(Hui)值(Zhi):成(Cheng)功(Gong),返(Fan)回(Hui)新(Xin)建(Jian)立(Li)的(De)socket的(De)文(Wen)件(Jian)描(Miao)述(Shu)符(Fu),非(Fei)负(Fu)整(Zheng)数(Shu)失(Shi)败(Bai):-1connect()int connect(int sockfd, const struct sockaddr *addr,socklen_t addrlen);与(Yu)服(Fu)务(Wu)器(Qi)建(Jian)立(Li)连(Lian)接(Jie)sockfd:socket函(Han)数(Shu)返(Fan)回(Hui)值(Zhi)addr:传(Chuan)入(Ru)参(Can)数(Shu),服(Fu)务(Wu)器(Qi)地(Di)址(Zhi)结(Jie)构(Gou)addrlen:服(Fu)务(Wu)器(Qi)地(Di)址(Zhi)结(Jie)构(Gou)长(Chang)度(Du)返(Fan)回(Hui)值(Zhi):成(Cheng)功(Gong)0,失(Shi)败(Bai)-1。如(Ru)果(Guo)不(Bu)使(Shi)用(Yong)bind绑(Bang)定(Ding)客(Ke)户(Hu)端(Duan)地(Di)址(Zhi)结(Jie)构(Gou),系(Xi)统(Tong)会(Hui)“隐(Yin)式(Shi)绑(Bang)定(Ding)”。一(Yi)个(Ge)简(Jian)单(Dan)的(De)例(Li)子(Zi),客(Ke)户(Hu)端(Duan)给(Gei)服(Fu)务(Wu)器(Qi)发(Fa)一(Yi)串(Chuan)字(Zi)符(Fu)串(Chuan),服(Fu)务(Wu)器(Qi)将(Jiang)接(Jie)受(Shou)到(Dao)字(Zi)符(Fu)串(Chuan)转(Zhuan)换(Huan)为(Wei)大(Da)写(Xie),再(Zai)发(Fa)功(Gong)给(Gei)客(Ke)户(Hu)端(Duan)。这(Zhe)里(Li)用(Yong)的(De)read、write函(Han)数(Shu),和(He)recv、send区(Qu)别(Bie)后(Hou)面(Mian)再(Zai)研(Yan)究(Jiu)。//server.c#include#include #include #include #include #include #include #include #define SERVER_PORT 12345void sys_error(const char *str){ perror(str); exit(-1);} int main(int argc, char const *argv[]){ int sfd,cfd,ret=0; socklen_t client_addr_len; char buf[1024]; char client_IP[16]; struct sockaddr_in server_addr,client_addr; server_addr.sin_family = AF_INET; server_addr.sin_port = htons(SERVER_PORT); server_addr.sin_addr.s_addr=htonl(INADDR_ANY); sfd = socket(AF_INET,SOCK_STREAM,0); if(sfd==-1) { sys_error("socket error"); } ret = bind(sfd,(struct sockaddr*)&server_addr,sizeof(server_addr)); if(ret==-1) { sys_error("bind error"); } ret = listen(sfd,128); if(ret==-1) { sys_error("listen error"); } client_addr_len = sizeof(client_addr); cfd = accept(sfd,(struct sockaddr*)&client_addr,&client_addr_len); if(cfd==-1) { sys_error("accept error"); } //打(Da)印(Yin)连(Lian)接(Jie)上(Shang)的(De)客(Ke)户(Hu)端(Duan)IP和(He)端(Duan)口(Kou)号(Hao) printf("client_ip:%s port:%d\n",inet_ntop(AF_INET,&client_addr.sin_addr.s_addr,client_IP,sizeof(client_IP)),ntohs(client_addr.sin_port) ); while(1) { ret = read(cfd,buf,sizeof(buf)); write(STDOUT_FILENO,buf,ret); for(int i=0;i#include #include #include #include #include #include #include #define SERVER_PORT 12347void sys_error(const char *str){ perror(str); exit(-1);} int main(int argc, char const *argv[]){ int cfd,ret=0; char buf[1024]; struct sockaddr_in client_addr,server_addr; server_addr.sin_family = AF_INET; server_addr.sin_port = htons(SERVER_PORT); //server_addr.sin_addr.s_addr=htonl(INADDR_ANY); inet_pton(AF_INET,"127.0.0.1",&server_addr.sin_addr.s_addr); cfd = socket(AF_INET,SOCK_STREAM,0); if(cfd==-1) { sys_error("socket error"); } ret = connect(cfd,(struct sockaddr*)&server_addr,sizeof(server_addr)); if(ret==-1) { sys_error("connect error"); } while(1) { //scanf("%s",buf); gets(buf);//最(Zui)好(Hao)使(Shi)用(Yong)fgets。 write(cfd,buf,strlen(buf)); ret = read(cfd,buf,sizeof(buf)); write(STDOUT_FILENO,buf,ret); printf("\n"); } close(cfd); return 0;}TCP三(San)次(Ci)握(Wo)手(Shou),对(Dui)应(Ying)的(De)函(Han)数(Shu)就(Jiu)是(Shi)accept,connect。

8. 白帝城:虽然因《三国演义》而闻名,但它的人文历史和自然景观同样值得探索。财报数据显示,瑞幸在2024年第一季度经营亏损为6510万元,对应经营利润率为-1%,2023年同期经营利润为6.78亿元,经营利润率为15.3%;净亏损为8317万元,对应利润率为-1.3%,而去年同期净利润为5.65亿元,净利润率为12.7%。随心所欲的人生(新亭)小说全文在线阅读下载-蚕蚕阅读

苏东坡诗词下的峨眉山你了解多少2023-04-07 09:15·乐山文广旅游局苏轼是北宋中期的文坛领袖在诗、词、散文、书、画等方面取得了很高的成就为唐宋八大家之一慧慧/摄苏轼对峨眉山情有独钟感情至深峨眉山在其众多诗词中多有提及他对峨眉山秀丽的景色、气候、环境非常熟悉如《寄黎眉州》:瓦屋寒堆春后雪峨眉翠扫雨余天形象生动地描写峨眉山雨后山色苍翠的景象庞尼西/摄又如《送运判朱朝奉入蜀》中的霭霭青城云娟娟峨嵋月对峨眉山的月景心驰神往图源:峨眉山景区又如《雪斋》中的峨眉山西雪千里北望成都如井底春风百日吹不消五月行人如冻蚁从中可以看出苏轼对峨眉山的气候环境也是十分了解的刘睿/摄一起来欣赏大文豪苏轼诗词下的峨眉山吧~寄黎眉州苏轼胶西高处望西川应在孤云落照边瓦屋寒堆春后雪峨眉翠扫雨余天治经方笑春秋学好士今无六一贤且待渊明赋归去共将诗酒趁流年这首诗是苏轼熙宁九年(公元1076年)在密州任上寄赠黎鍄的黎鍄字希声四川渠江人煕宁八年他以尚书屯田郎中出知眉州所以称黎眉州庞尼西/摄秀州报本禅院乡僧文长老方丈苏轼万里家山一梦中吴音渐已变儿童每逢蜀叟谈终日便觉峨眉翠扫空师已忘言真有道我除搜句百无功明年采药天台去更欲题诗满浙东【注释】秀州:今浙江秀水报本禅院:唐时所建宋时改为本觉寺熙宁五年末作者过此寺僧文长老方丈是作者的同乡故称乡僧;诗中第三句的蜀叟也指这位方丈袁学方/摄送运判朱朝奉入蜀苏轼霭霭青城云娟娟峨嵋月随我西北来照我光不灭我在尘土中白云呼我归我游江湖上明月湿我衣岷峨天一方云月在我侧谓是山中人相望了不隔梦寻西南路默数长短亭似闻嘉陵江跳波吹枕屏送君无一物清江饮君马路穿慈竹林父老拜马下不用惊走藏使者我友生听讼如家人细说为汝评若逢山中友问我归何日为话腰脚轻犹堪踏泉石郭星/摄送杨孟容苏轼我家峨眉阴与子同一邦相望六十里共饮玻璃江江山不违人遍满千家窗但苦窗中人寸心不自降子归治小国洪钟噎微撞我留侍玉坐弱步欹丰扛后生多高才名与黄童双不肯入州府故人余老庞殷勤与问讯爱惜霜眉厖何以待我归寒醅发春缸郭星/摄法惠寺横翠阁苏轼朝见吴山横暮见吴山纵吴山故多态转折为君容幽人起朱阁空洞更无物惟有千步冈东西作帘额春来故国归无期人言秋悲春更悲已泛平湖思濯锦更看横翠忆峨眉雕栏能得几时好不独凭栏人易老百年兴废更堪哀悬知草莽化池台游人寻我旧游处但觅吴山横处来【注释】法惠寺:故址在杭州清波门外旧名兴庆寺五代时吴越王钱氏所建吴山:一名胥山以旧时山上有伍子胥祠而得名又叫城隍山在今杭州市西南故态:本来的姿态帘额:门窗上挂的帘子悬在上端有如人的额头人言秋悲:宋玉曾在《九辩》中写道:悲哉秋之为气也草木摇落而变衰平湖:指西湖濯锦江即锦水一名岷江峨眉:即峨眉山苏轼从西湖和吴山联想到故乡的锦江和峨嵋山郭星/摄欧阳少师令赋所蓄石屏苏轼何人遗公石屏风上有水墨希微踪不画长林与巨植独画峨眉山西雪岭上万岁不老之孤松崖崩涧绝可望不可到孤烟落日相溟濛含风偃蹇得真态刻画始信有天工我恐毕宏韦偃死葬虢山下骨可朽烂心难穷神机巧思无所发化为烟霏沦石中古来画师非俗士摹写物象略于诗人同愿公作诗慰不遇无使二子含愤泣幽宫【注释】欧阳少师:指欧阳修遗(wèi):赠送溟蒙:模糊不清的样子毕宏、韦偃皆唐代名画家擅长画松虢(guó):在今河南卢氏县石屏的产地幽宫:冥间公元1071年(宋神宗熙宁四年)苏轼因与王安石政见不合离京出任杭州通判赴杭途中路过颖州谒见欧阳修观赏了石屏应欧阳修之命作此诗郭星/摄雪斋——杭僧法言作雪山于斋中苏轼君不见峨眉山西雪千里北望成都如井底春风百日吹不消五月行人如冻蚁纷纷市人争夺中谁信言公似赞公人间热恼无处洗故向西斋作雪峰我梦扁舟适吴越长廊静院灯如月开门不见人与牛惟见空庭满山雪图源:峨眉山景区送贾讷倅眉苏轼当年入蜀叹空回未见峨眉肯再来童子遥知颂襦袴使君先已洗樽罍鹿头北望应逢雁人日东郊尚有梅我老不堪歌乐职后生试觅子渊才【注释】诗共二首此其一公元1086年(元祐元年)苏轼知登州任到官五日调回京师一年之间三迁要职当上翰林学士贾讷这时出任眉州通判任眉州副知州宋制通判皆为副知州悴:副职白水寺苏轼但得身闲便是仙眼前黑白漫纷然请君试向岩中坐一日真如五百年图源:峨眉山景区醉落魄席上呈元素苏轼分携如昨人生到处萍飘泊偶然相聚还离索多病多愁须信从来错樽前一笑休辞却天涯同是伤沦落故山犹负平生约西望峨嵋长羡归飞鹤郭星/摄满庭芳苏轼元丰七年四月一日余将去黄移汝留别雪堂邻里二三君子会李仲览自江东来别遂书以遗之归去来兮吾归何处?万里家在岷峨百年强半来日苦无多坐见黄州再闰儿童尽楚语吴歌山中友鸡豚社酒相劝老东坡云何当此去人生底事来往如梭待闲看秋风洛水清波好在堂前细柳应念我莫剪柔柯仍传语江南父老时与晒渔蓑【注释】这首词抒写对蜀中故里的思念和对黄州邻里父老的惜别之情雪堂:苏轼在黄州的居所名位于长江边上岷峨:四川的岷山与峨眉山此代指作者故乡郭星/摄河满子密州寄益守冯当世苏轼见说岷峨凄怆旋闻江汉澄清但觉秋来归梦好西南自有长城东府三人最少西山八国初平莫负花溪纵赏何妨药市微行试问当垆人在否空教是处闻名唱着子渊新曲应须分外含情【注释】本篇作于公元1076年(熙宁九年)秋是一首祝捷词当时成都太守冯京平定了茂州少数民族的叛乱岷峨:岷山、峨眉山资料来源:《名人与峨眉山》峨眉山博物馆整理发布

发布于:平谷区
声明:该文观点仅代表作者本人,搜狐号系信息发布平台,搜狐仅提供信息存储空间服务。
意见反馈 合作

Copyright ? 2023 Sohu All Rights Reserved

搜狐公司 版权所有