⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 config.h

📁 计算机网络与通信的知识
💻 H
字号:
/* config.h.  Generated by configure.  *//* config.h.in.  Generated from configure.in by autoheader.  *//* Define to 1 if you have the <dlfcn.h> header file. */#define HAVE_DLFCN_H 1/* Define to 1 if you have the <inttypes.h> header file. */#define HAVE_INTTYPES_H 1/* Define to 1 if you have the <memory.h> header file. */#define HAVE_MEMORY_H 1/* Define to 1 if you have the <stdint.h> header file. */#define HAVE_STDINT_H 1/* Define to 1 if you have the <stdlib.h> header file. */#define HAVE_STDLIB_H 1/* Define to 1 if you have the <strings.h> header file. */#define HAVE_STRINGS_H 1/* Define to 1 if you have the <string.h> header file. */#define HAVE_STRING_H 1/* Define to 1 if you have the <sys/stat.h> header file. */#define HAVE_SYS_STAT_H 1/* Define to 1 if you have the <sys/types.h> header file. */#define HAVE_SYS_TYPES_H 1/* C++ compiler supports template repository */#define HAVE_TEMPLATE_REPOSITORY 1/* Define to 1 if you have the <unistd.h> header file. */#define HAVE_UNISTD_H 1/* Name of package */#define PACKAGE "ping"/* Define to the address where bug reports for this package should be sent. */#define PACKAGE_BUGREPORT ""/* Define to the full name of this package. */#define PACKAGE_NAME ""/* Define to the full name and version of this package. */#define PACKAGE_STRING ""/* Define to the one symbol short name of this package. */#define PACKAGE_TARNAME ""/* Define to the version of this package. */#define PACKAGE_VERSION ""/* Define to 1 if you have the ANSI C header files. */#define STDC_HEADERS 1/* Version number of package */#define VERSION "0.1"#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <sys/socket.h>#include <sys/socketvar.h>#include <sys/types.h>#include <netinet/in.h>#include <netdb.h>#include <arpa/inet.h>#include <time.h>#include <string.h>#define IP_RECORD_ROUTE  0x7#define DEF_PACKET_SIZE  32#define MAX_PACKET       1024      // Max ICMP packet size#define MAX_IP_HDR_SIZE  60        // Max IP header size w/options#define ICMP_ECHO        8#define ICMP_ECHOREPLY   0#define ICMP_MIN         8 // Minimum 8-byte ICMP packet (header)typedef struct _iphdr{    unsigned int   h_len:4;        // Length of the header    unsigned int   version:4;      // Version of IP    unsigned char  tos;            // Type of service    unsigned short total_len;      // Total length of the packet    unsigned short ident;          // Unique identifier    unsigned short frag_and_flags; // Flags    unsigned char  ttl;            // Time to live    unsigned char  proto;          // Protocol (TCP, UDP etc)    unsigned short checksum;       // IP checksum    unsigned int   sourceIP;    unsigned int   destIP;}IpHeader;/*     ***** Initial definition of IcmpHeader  *****typedef struct _icmphdr{    BYTE   i_type;    BYTE   i_code;                 // Type sub code    USHORT i_cksum;    USHORT i_id;    USHORT i_seq;    // This is not the standard header, but we reserve space for time    ULONG  timestamp;} IcmpHeader;*/typedef struct _icmphdr{    unsigned char   i_type;    unsigned char   i_code;                 // Type sub code    unsigned short i_cksum;    unsigned short i_id;    unsigned short i_seq;    // This is not the standard header, but we reserve space for time    unsigned long  timestamp;}IcmpHeader;//// IP option header - use with socket option IP_OPTIONS//typedef struct _ipoptionhdr{    unsigned char        code;        // Option type    unsigned char        len;         // Length of option hdr    unsigned char        ptr;         // Offset into options    unsigned long        addr[9];     // List of IP addrs}IpOptionHeader;typedef struct sockaddr_in  SOCKADDR_IN;typedef struct in_addr IN_ADDR;typedef struct hostent HOSTENT;int m_hSocket;IpOptionHeader  m_ipopt;struct sockaddr_in  m_addrDest;struct sockaddr_in  m_addrFrom;char      *icmp_data;char      *recvbuf;unsigned short    seq_no;char  *lpdest;int  m_bRecordRout;int   datasize;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -