freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

網(wǎng)絡(luò)協(xié)議編程課程設(shè)計(jì)(編輯修改稿)

2024-10-08 10:09 本頁面
 

【文章內(nèi)容簡(jiǎn)介】 //8 位協(xié)議 (TCP, UDP 或其他 ) unsigned short checksum。 //16 位 IP 首部校驗(yàn)和 unsigned int sourceIP。 //32 位源 IP 地址 unsigned int destIP。 //32 位目的 IP 地址 }IP_HEADER。 typedef struct icmp_hdr { 第 頁 (共 15 頁) 8 BYTE i_type。 // ICMP 報(bào)文類型 BYTE i_code。 // ICMP 代碼 USHORT i_cksum。 // 校驗(yàn)和 USHORT i_id。 // 標(biāo)志符 USHORT i_seq。 // 序號(hào) ULONG timestamp。 // 時(shí)間戳 } ICMP_HEADER。 void CPingDlg::OnPing() //初始化 { // TODO: Add your control notification handler code here int rect。 WSADATA WSAData。 if (WSAStartup(MAKEWORD(2,2), amp。WSAData) != 0 ) { printf (WSAStartup Error!\n)。 //如果初始化不成功則報(bào)錯(cuò) exit(0)。 } SOCKET sock[4]。 for(int i=0。 i4。 i++) { CString ip。 GetDlgItemText(IDC_IP,ip)。 hostent *hp=gethostbyname(ip)。//域名轉(zhuǎn)換成 IP if(hp!=NULL) ip=i_ntoa(*(struct in_addr*)hp h_addr_list[0])。 ICMP_HEADER icmpHeader。 SOCKADDR_IN addr_in,addr_from。 char recvbuf[1024]。 sock[i]= socket(AF_INET, SOCK_RAW, IPPROTO_ICMP)。 int nTimeOut = 1000。 //超時(shí)毫秒 //設(shè)置發(fā)送超時(shí)和接收超時(shí) setsockopt(sock[i], SOL_SOCKET, SO_SNDTIMEO, (char*)amp。nTimeOut, sizeof(nTimeOut))。 setsockopt(sock[i], SOL_SOCKET, SO_RCVTIMEO, (char*)amp。nTimeOut, sizeof(nTimeOut))。 memset(amp。addr_in, 0, sizeof(addr_in))。 = AF_INET。 //為網(wǎng)絡(luò)地址類型 ,一般為 AF_INET 第 頁 (共 15 頁) 9 = i_addr(ip)。 //IP //設(shè)置數(shù)據(jù)報(bào)頭 memset(amp。icmpHeader, 0, sizeof(icmpHeader))。 = 8。 = 0。 = 0。 = (USHORT)GetCurrentProcessId()。 = 0。 = GetTickCount()。 = checksum((USHORT*)amp。icmpHeader, sizeof(icmpHeader))。 //發(fā)送一個(gè) icmpHea
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1