当前位置: 首页 > news >正文

美食网站建设合同范例一键网站提交

美食网站建设合同范例,一键网站提交,一般做网站所使用的字体,泰达人才网招聘网文章目录 目的关于ICMPsocket 编程实现ICMP编译error代码参考博客扩展了解目的 通过C++编程实现ping, 也算是对于SOCKET编程初步了解掌握。 了解ICMP协议了解对应socket编程关于ICMP 请参考我的博客Ping工作原理 socket 编程实现ICMP Ping 使用 Internet 控制消息协议(IC… 文章目录 目的关于ICMPsocket 编程实现ICMP编译error代码 参考博客扩展了解 目的 通过C++编程实现ping, 也算是对于SOCKET编程初步了解掌握。 了解ICMP协议了解对应socket编程关于ICMP 请参考我的博客Ping工作原理 socket 编程实现ICMP Ping 使用 Internet 控制消息协议(ICMP)来测试主机之间的连通性。当用客户端发送一个 ping 请求时,则对应的发送一个 ICMP Echo 请求消息到目标主机,并等待目标主机回复一个 ICMP Echo 回应消息。如果目标主机接收到请求并且网络连接正常,则会返回一个回应消息,表示主机之间的网络连接是正常的。如果目标主机没有收到请求消息或网络连接不正常,则不会有回应消息返回。 编译error winsock2.h 与 windows.h 先后顺序导致编译错误 在Windows环境下编程不可避免的会用到windows.h和winsock.h头文件,在默认情况下windows.h头文件会包含winsock.h,此时当尝试包含winsock.h时就会出现头文件定义冲突的情况。解决这个冲突的方式有两种,第一种,在头部定义#define WIN32_LEAN_AND_MEAN来主动去除winsock.h头文件包含。第二种是将#include winsock2.h头文件,放在#includewindows.h之前。两种方式均可,这些方法在进行Windows套接字编程时非常重要,可以防止头文件冲突,确保编译顺利进行。 IPExport.h导致编译错误 还有一种是我遇到的 OptionsData 未知重写说明符, Data 未知重写说明符 需要将如下注释掉就行, 具体原因后续有时间整理下。 //#include iphlpapi.h //#include icmpapi.h代码 ICMPDataHeader.h相关头文件声明 与 数据定义 #pragma once#define WIN32_LEAN_AND_MEAN #include iostream #include vector #include cmath #include chrono #include ctime //#include iphlpapi.h //#include icmpapi.h #include winsock2.h #include ws2tcpip.h #include stdio.h #include stdlib.h#pragma comment(lib, "ws2_32.lib") //#pragma comment(lib, "iphlpapi.lib")#define IP_RECORD_ROUTE 0x7// IP header structure typedef struct _iphdr {//Suppose the BYTE_ORDER is LITTLE_ENDIANunsigned int h_len:4; // Length of the headerunsigned int version:4; // Version of IPunsigned char tos; // Type of serviceunsigned short total_len; // Total length of the packetunsigned short id; // Unique identificationunsigned short frag_offset; // Fragment offsetunsigned char ttl; // Time to liveunsigned char protocol; // Protocol (TCP, UDP etc)unsigned short checksum; // IP checksumunsigned int sourceIP; // Source IPunsigned int destIP; // Destination IP } IpHeader;#define ICMP_ECHO 8 #define ICMP_ECHOREPLY 0 #define ICMP_MIN 8 // Minimum 8-byte ICMP packet (header)// ICMP header structure // This is not the standard header, but we reserve space for time typedef struct _icmphdr {BYTE i_type;BYTE i_code; // Type sub codeUSHORT i_cksum;USHORT i_id;USHORT i_seq;ULONG timestamp; } IcmpHeader;// IP option header - use with socket option IP_OPTIONS typedef struct _ipoptionhdr {unsigned char code; // Option typeunsigned char len; // Length of option hdrunsigned char ptr; // Offset into optionsunsigned long addr[9]; // List of IP addrs } IpOptionHeader;#define DEF_PACKET_SIZE 32 // Default packet size #define MAX_PACKET 1024 // Max ICMP packet size #define MAX_IP_HDR_SIZE 60 // Max IP header size w/options 关键核心代码 cpp校验函数 #include "icmppacketprocessor.h"ICMPPacketProcessor::ICMPPacketProcessor(QObject* parent):QObject{parent} {}ICMPPacketProcessor::~ICMPPacketProcessor() {if(lpdest){delete lpdest;} }unsigned short ICMPPacketProcessor::checksum(unsigned short *buffer, int size) {unsigned long cksum=0;while(size 1){cksum += *buffer++;size -= sizeof(unsigned short);}if(size){cksum += *(UCHAR*)buffer;}cksum = (cksum 16) + (cksum 0xffff);cksum += (cksum 16);return (unsigned short)(~cksum); }// Function: FillICMPData // Description: // Helper function to fill in various fields for our ICMP request void ICMPPacketProcessor::fillICMPData(char *icmp_data, int datasize) {IcmpHeader *icmp_hdr = NULL;char *datapart = NULL;icmp_hdr = (IcmpHeader*)icmp_data;icmp_hdr-i_type = ICMP_ECHO; // Request an ICMP echo, type is 8icmp_hdr-i_code = 0; // code is 0icmp_hdr-i_id = (USHORT)GetCurrentProcessId();icmp_hdr-i_cksum = 0;icmp_hdr-i_seq = 0;datapart = icmp_data + sizeof(IcmpHeader);// Place some junk in the buffermemset(datapart, 'E' , datasize - sizeof(IcmpHeader)); } // Function: DecodeIPOptions // Description: // If the IP option header is present, find the IP options // within the IP header and print the record route option values void ICMPPacketProcessor::decodeIPOptions(char *buf, int bytes) {IpOptionHeader *ipopt = NULL;IN_ADDR inaddr;int i;HOSTENT *host = NULL;ipopt = (IpOptionHeader *)(buf + 20);printf("Record Route: ");for(i = 0; i (ipopt-ptr / 4) - 1; i++){inaddr.S_un.S_addr = ipopt-addr[i];if (i != 0) printf(" ");host = gethostbyaddr(
http://www.pierceye.com/news/751725/

相关文章:

  • 黑龙江建设网官方网站特种作业电脑网站策划书
  • 系统开发和网站开发厦门专业网站营销
  • 网站在线交谈wordpress信息填写
  • 服饰网站建设微网站建设 合同
  • dede网站 远程生成wordpress后台不能登陆
  • word如何做网站链接湖南省绿色建筑信息平台
  • v9网站模板网站建设六道
  • php网站开发原理企业门户网站费用
  • 白银市建设管理处网站定制网站建设和运营
  • 免费音乐网站建设新闻资讯建站服务商
  • 佛山市建设企业网站服务机构普通网站建设计入什么科目
  • 阿里虚拟机建设网站网络科技有限公司营业执照
  • 如何申请建设网站首页培训机构怎么做线上推广
  • 网站维护升级访问中做网站工单
  • 如何用ae做模板下载网站电脑网站建设规划
  • 北京京水建设集团有限公司网站西青做网站
  • 自己建的网站可以用笔记本做服务器吗网站建设后台系统有哪些
  • 做的asp网站手机号码网站开发软件手机版
  • android 做电子书下载网站网络热词作文
  • 网络网站销售龙岩建筑网
  • 专门找事做的网站iis7 wordpress伪静态规则
  • 做字体的网站济宁网站建设 济宁智雅
  • 工程门户网站建设怎样制作表白网站
  • 手机如何创建个人网站上海 .net网站建设
  • 小程序app软件定制开发首页排名优化公司
  • 红酒 专业 网站建设视频网站后台
  • 宁波网站建设58同城百度突然搜不到网站
  • 网站开发技术和seo的联系wordpress发邮件卡主
  • 网站开发安全模块方案网站运营方案怎么写?
  • 章丘网站制作手机网站 微信平台