亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? packet_types.h

?? 這是有關網絡入侵檢測技術系統的源代碼。使用visual c++編程
?? H
?? 第 1 頁 / 共 2 頁
字號:

// IP packet structures...
// -----------------------
// Note: All of this is hard coded little endian!


typedef long n_long;
typedef short n_short;
typedef long n_time;


struct ip
  {
    unsigned int ip_hl:4;               /* header length */
    unsigned int ip_v:4;                /* version */
    u_char ip_tos;                    /* type of service */
    u_short ip_len;                     /* total length */
    u_short ip_id;                      /* identification */
    u_short ip_off;                     /* fragment offset field */
#define IP_RF 0x8000                    /* reserved fragment flag */
#define IP_DF 0x4000                    /* dont fragment flag */
#define IP_MF 0x2000                    /* more fragments flag */
#define IP_OFFMASK 0x1fff               /* mask for fragmenting bits */
    u_char ip_ttl;                    /* time to live */
    u_char ip_p;                      /* protocol */
    u_short ip_sum;                     /* checksum */
    struct in_addr ip_src, ip_dst;      /* source and dest address */
  };

#define    MAX_IPOPTLEN            40

/*
 *	IEEE 802.3 Ethernet magic constants.  The frame sizes omit the preamble
 *	and FCS/CRC (frame check sequence). 
 */

#define ETH_ALEN	6		/* Octets in one ethernet addr	 */
#define ETH_HLEN	14		/* Total octets in header.	 */
#define ETH_ZLEN	60		/* Min. octets in frame sans FCS */
#define ETH_DATA_LEN	1500		/* Max. octets in payload	 */
#define ETH_FRAME_LEN	1514		/* Max. octets in frame sans FCS */

/*
 *	These are the defined Ethernet Protocol ID's.
 */

#define ETH_P_LOOP	0x0060		/* Ethernet Loopback packet	*/
#define ETH_P_ECHO	0x0200		/* Ethernet Echo packet		*/
#define ETH_P_PUP	0x0400		/* Xerox PUP packet		*/
#define ETH_P_IP	0x0800		/* Internet Protocol packet	*/
#define ETH_P_X25	0x0805		/* CCITT X.25			*/
#define ETH_P_ARP	0x0806		/* Address Resolution packet	*/
#define	ETH_P_BPQ	0x08FF		/* G8BPQ AX.25 Ethernet Packet	[ NOT AN OFFICIALLY REGISTERED ID ] */
#define ETH_P_DEC       0x6000          /* DEC Assigned proto           */
#define ETH_P_DNA_DL    0x6001          /* DEC DNA Dump/Load            */
#define ETH_P_DNA_RC    0x6002          /* DEC DNA Remote Console       */
#define ETH_P_DNA_RT    0x6003          /* DEC DNA Routing              */
#define ETH_P_LAT       0x6004          /* DEC LAT                      */
#define ETH_P_DIAG      0x6005          /* DEC Diagnostics              */
#define ETH_P_CUST      0x6006          /* DEC Customer use             */
#define ETH_P_SCA       0x6007          /* DEC Systems Comms Arch       */
#define ETH_P_RARP      0x8035		/* Reverse Addr Res packet	*/
#define ETH_P_ATALK	0x809B		/* Appletalk DDP		*/
#define ETH_P_AARP	0x80F3		/* Appletalk AARP		*/
#define ETH_P_IPX	0x8137		/* IPX over DIX			*/
#define ETH_P_IPV6	0x86DD		/* IPv6 over bluebook		*/

/*
 *	Non DIX types. Won't clash for 1500 types.
 */
 
#define ETH_P_802_3	0x0001		/* Dummy type for 802.3 frames  */
#define ETH_P_AX25	0x0002		/* Dummy protocol id for AX.25  */
#define ETH_P_ALL	0x0003		/* Every packet (be careful!!!) */
#define ETH_P_802_2	0x0004		/* 802.2 frames 		*/
#define ETH_P_SNAP	0x0005		/* Internal only		*/
#define ETH_P_DDCMP     0x0006          /* DEC DDCMP: Internal only     */
#define ETH_P_WAN_PPP   0x0007          /* Dummy type for WAN PPP frames*/
#define ETH_P_PPP_MP    0x0008          /* Dummy type for PPP MP frames */
#define ETH_P_LOCALTALK 0x0009		/* Localtalk pseudo type 	*/
#define ETH_P_PPPTALK	0x0010		/* Dummy type for Atalk over PPP*/
#define ETH_P_TR_802_2	0x0011		/* 802.2 frames 		*/

struct etherproto {
	char *s;
	u_short p;
};
extern struct etherproto etherproto_db[];

// Ethernet Header
struct ether_header 
{
	unsigned char	h_dest[ETH_ALEN];	/* destination eth addr	*/
	unsigned char	h_source[ETH_ALEN];	/* source ether addr	*/
	unsigned short	h_proto;		/* packet type ID field	*/
};

// ARP/RARP
///////////////////////////////////////////////////////////////////////
static u_char bcastaddr[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };

/*
 *	This structure defines an ethernet arp header.
 */

struct arphdr
{
	unsigned short	ar_hrd;		/* format of hardware address	*/
	unsigned short	ar_pro;		/* format of protocol address	*/
	unsigned char	ar_hln;		/* length of hardware address	*/
	unsigned char	ar_pln;		/* length of protocol address	*/
	unsigned short	ar_op;		/* ARP opcode (command)		*/
};

#define ARPD_UPDATE	0x01
#define ARPD_LOOKUP	0x02
#define ARPD_FLUSH	0x03

/*#define ARPHRD_ETHER	0x01

#define ARPOP_REQUEST	0x01
#define ARPOP_REPLY		0x02
#define ARPOP_REVREQUEST	0x03
#define ARPOP_REVREPLY		0x04
*/
/*
 * Ethernet Address Resolution Protocol.
 *
 * See RFC 826 for protocol description.  Structure below is adapted
 * to resolving internet addresses.  Field names used correspond to
 * RFC 826.
 */
struct	ether_arp {
	struct	arphdr ea_hdr;	/* fixed-size header */
	u_char	arp_sha[ETH_ALEN];	/* sender hardware address */
	u_char	arp_spa[4];	/* sender protocol address */
	u_char	arp_tha[ETH_ALEN];	/* target hardware address */
	u_char	arp_tpa[4];	/* target protocol address */
};
#define	arp_hrd	ea_hdr.ar_hrd
#define	arp_pro	ea_hdr.ar_pro
#define	arp_hln	ea_hdr.ar_hln
#define	arp_pln	ea_hdr.ar_pln
#define	arp_op	ea_hdr.ar_op

// IP Header in Little Endian
//////////////////////////////
struct iphdr {
	u_char	ip_hl:4,		/* header length */
			ip_v:4;			/* version */
	u_char	ip_tos;			/* type of service */
	short	ip_len;			/* total length */
	u_short	ip_id;			/* identification */
	short	ip_off;			/* fragment offset field */
#define	IP_DF 0x4000		/* dont fragment flag */
#define	IP_MF 0x2000		/* more fragments flag */
	u_char	ip_ttl;			/* time to live */
	u_char	ip_p;			/* protocol */
	u_short	ip_sum;			/* checksum */
	struct	in_addr ip_src,ip_dst;	/* source and dest address */
};

#define	IP_MAXPACKET	65535		/* maximum packet size */

// Definitions for options.
#define	IPOPT_COPIED(o)		((o)&0x80)
#define	IPOPT_CLASS(o)		((o)&0x60)
#define	IPOPT_NUMBER(o)		((o)&0x1f)

#define	IPOPT_CONTROL		0x00
#define	IPOPT_RESERVED1		0x20
#define	IPOPT_DEBMEAS		0x40
#define	IPOPT_RESERVED2		0x60

#define	IPOPT_EOL		0		/* end of option list */
#define	IPOPT_NOP		1		/* no operation */

#define	IPOPT_RR		7		/* record packet route */
#define	IPOPT_TS		68		/* timestamp */
#define	IPOPT_SECURITY	130		/* provide s,c,h,tcc */
#define	IPOPT_LSRR		131		/* loose source route */
#define	IPOPT_SATID		136		/* satnet id */
#define	IPOPT_SSRR		137		/* strict source route */


// Time stamp option structure.
struct	ip_timestamp {
	u_char	ipt_code;		/* IPOPT_TS */
	u_char	ipt_len;		/* size of structure (variable) */
	u_char	ipt_ptr;		/* index of current entry */
	u_char	ipt_flg:4,		/* flags, see below */
		ipt_oflw:4;			/* overflow counter */
	union ipt_timestamp {
		n_long	ipt_time[1];
		struct	ipt_ta {
			struct in_addr ipt_addr;
			n_long ipt_time;
		} ipt_ta[1];
	} ipt_timestamp;
};

/* flag bits for ipt_flg */
#define	IPOPT_TS_TSONLY		0		/* timestamps only */
#define	IPOPT_TS_TSANDADDR	1		/* timestamps and addresses */
#define	IPOPT_TS_PRESPEC	2		/* specified modules only */

/* bits for security (not byte swapped) */
#define	IPOPT_SECUR_UNCLASS	0x0000
#define	IPOPT_SECUR_CONFID	0xf135
#define	IPOPT_SECUR_EFTO	0x789a
#define	IPOPT_SECUR_MMMM	0xbc4d
#define	IPOPT_SECUR_RESTR	0xaf13
#define	IPOPT_SECUR_SECRET	0xd788
#define	IPOPT_SECUR_TOPSECRET	0x6bc5

// ICMP Header
////////////////////////////////////////////////////////////////////////
struct icmphdr {
	u_char	icmp_type;		/* type of message, see below */
	u_char	icmp_code;		/* type sub code */
	u_short	icmp_cksum;		/* ones complement cksum of struct */
	union {
		u_char ih_pptr;			/* ICMP_PARAMPROB */
		struct in_addr ih_gwaddr;	/* ICMP_REDIRECT */
		struct ih_idseq {
			n_short	icd_id;
			n_short	icd_seq;
		} ih_idseq;
		int ih_void;
	} icmp_hun;
#define	icmp_pptr	icmp_hun.ih_pptr
#define	icmp_gwaddr	icmp_hun.ih_gwaddr
#define	icmp_id		icmp_hun.ih_idseq.icd_id
#define	icmp_seq	icmp_hun.ih_idseq.icd_seq
#define	icmp_void	icmp_hun.ih_void
	union {
		struct id_ts {
			n_time its_otime;
			n_time its_rtime;
			n_time its_ttime;
		} id_ts;
		struct id_ip  {
			struct iphdr idi_ip;
			/* options and then 64 bits of data */
		} id_ip;
		u_long	id_mask;
		char	id_data[1];
	} icmp_dun;
#define	icmp_otime	icmp_dun.id_ts.its_otime
#define	icmp_rtime	icmp_dun.id_ts.its_rtime
#define	icmp_ttime	icmp_dun.id_ts.its_ttime
#define	icmp_ip		icmp_dun.id_ip.idi_ip
#define	icmp_mask	icmp_dun.id_mask
#define	icmp_data	icmp_dun.id_data
};

/*
 * Lower bounds on packet lengths for various types.
 * For the error advice packets must first insure that the
 * packet is large enought to contain the returned ip header.
 * Only then can we do the check to see if 64 bits of packet
 * data have been returned, since we need to check the returned
 * ip header length.
 */
#define	ICMP_MINLEN	8				/* abs minimum */
#define	ICMP_TSLEN	(8 + 3 * sizeof (n_time))	/* timestamp */
#define	ICMP_MASKLEN	12				/* address mask */
#define	ICMP_ADVLENMIN	(8 + sizeof (struct ip) + 8)	/* min */
#define	ICMP_ADVLEN(p)	(8 + ((p)->icmp_ip.ip_hl << 2) + 8)
	/* N.B.: must separately check that ip_hl >= 5 */

/*
 * Definition of type and code field values.
 */
#define	ICMP_ECHOREPLY		0		/* echo reply */

/* UNREACH codes */
#define ICMP_UNREACH					3       /* dest unreachable, codes: */ 
#define ICMP_UNREACH_NET                0       /* bad net */
#define ICMP_UNREACH_HOST               1       /* bad host */
#define ICMP_UNREACH_PROTOCOL           2       /* bad protocol */
#define ICMP_UNREACH_PORT               3       /* bad port */
#define ICMP_UNREACH_NEEDFRAG           4       /* IP_DF caused drop */
#define ICMP_UNREACH_SRCFAIL            5       /* src route failed */
#define ICMP_UNREACH_NET_UNKNOWN        6       /* unknown net */
#define ICMP_UNREACH_HOST_UNKNOWN       7       /* unknown host */
#define ICMP_UNREACH_ISOLATED           8       /* src host isolated */
#define ICMP_UNREACH_NET_PROHIB         9       /* net denied */
#define ICMP_UNREACH_HOST_PROHIB        10      /* host denied */
#define ICMP_UNREACH_TOSNET             11      /* bad tos for net */
#define ICMP_UNREACH_TOSHOST            12      /* bad tos for host */
#define ICMP_UNREACH_FILTER_PROHIB      13      /* admin prohib */
#define ICMP_UNREACH_HOST_PRECEDENCE    14      /* host prec vio. */
#define ICMP_UNREACH_PRECEDENCE_CUTOFF  15      /* prec cutoff */
   

#define	ICMP_SOURCEQUENCH				4		/* packet lost, slow down */
#define ICMP_ROUTERADVERT				9       /* router advertisement */
#define ICMP_ROUTERSOLICIT				10      /* router solicitation */    
#define	ICMP_REDIRECT					5		/* shorter route, codes: */
#define	ICMP_REDIRECT_NET				0		/* for network */
#define	ICMP_REDIRECT_HOST				1		/* for host */
#define	ICMP_REDIRECT_TOSNET			2		/* for tos and net */
#define	ICMP_REDIRECT_TOSHOST			3		/* for tos and host */
#define	ICMP_ECHO						8		/* echo service */
#define	ICMP_TIMXCEED					11		/* time exceeded, code: */
#define	ICMP_TIMXCEED_INTRANS			0		/* ttl==0 in transit */
#define	ICMP_TIMXCEED_REASS				1		/* ttl==0 in reass */
#define	ICMP_PARAMPROB					12		/* ip header bad */
#define	ICMP_TSTAMP						13		/* timestamp request */
#define	ICMP_TSTAMPREPLY				14		/* timestamp reply */
#define	ICMP_IREQ						15		/* information request */
#define	ICMP_IREQREPLY					16		/* information reply */
#define	ICMP_MASKREQ					17		/* address mask request */
#define	ICMP_MASKREPLY					18		/* address mask reply */

#define	ICMP_MAXTYPE		18

#define	ICMP_INFOTYPE(type) \
	((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || \
	(type) == ICMP_TSTAMP || (type) == ICMP_TSTAMPREPLY || \
	(type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \
	(type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY)

/*** ICMP types ********************************************************/
#define ICMP_TYPE_0     "Echo reply"
#define ICMP_TYPE_3     "Destination unreachable"
#define ICMP_TYPE_4     "Source quench"
#define ICMP_TYPE_5     "Redirect"
#define ICMP_TYPE_8     "Echo"
#define ICMP_TYPE_11    "Time exceeded"
#define ICMP_TYPE_12    "Parameter problem"
#define ICMP_TYPE_13    "Timestamp"
#define ICMP_TYPE_14    "Timestamp reply"
#define ICMP_TYPE_15    "Information request"
#define ICMP_TYPE_16    "Information reply"
#define ICMP_TYPE_17    "Address mask request"
#define ICMP_TYPE_18    "Adress mask reply"

/* pulled token stuff from tcpdump */
struct tok {
	int v;			/* value */
	char *s;		/* string */
};

// TCP
/////////////////////////////////////////////////////////////////////////
typedef	u_long	tcp_seq;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲人吸女人奶水| 国产成人小视频| 国产成人午夜精品5599| 99精品视频在线播放观看| 欧美日韩国产首页| 国产精品成人免费在线| 日韩国产欧美在线播放| 91在线视频免费观看| 欧美刺激午夜性久久久久久久| 中文字幕在线免费不卡| 麻豆中文一区二区| 日本道色综合久久| 中文字幕高清一区| 精品一区免费av| 欧美日韩一区视频| 亚洲同性同志一二三专区| 久久99久久99| 日韩一区二区三区视频在线观看 | 国产福利一区在线| 日韩精品一区二| 天天综合网 天天综合色| 92精品国产成人观看免费| 国产视频亚洲色图| 国内成人自拍视频| 日韩精品一区在线| 美女视频黄免费的久久| 欧美嫩在线观看| 亚洲国产一区二区三区| 91精品办公室少妇高潮对白| 日韩码欧中文字| 成人黄色在线视频| 欧美刺激脚交jootjob| 日韩av在线发布| 在线综合亚洲欧美在线视频| 亚洲伊人色欲综合网| 欧洲av在线精品| 亚洲成人tv网| 91精品国产色综合久久ai换脸| 午夜私人影院久久久久| 欧美男同性恋视频网站| 奇米一区二区三区| 日韩久久免费av| 国产美女精品一区二区三区| 久久精品在线免费观看| 成人三级在线视频| 亚洲欧洲成人精品av97| 91成人免费在线| 亚洲成人一二三| 日韩欧美区一区二| 国产九色精品成人porny| 国产欧美一区二区精品性色 | av在线播放一区二区三区| 国产精品美女久久久久久久久 | 91成人国产精品| 肉肉av福利一精品导航| 日韩三级中文字幕| 国产精品 欧美精品| 亚洲欧美一区二区在线观看| 欧美综合久久久| 免费高清在线一区| 中文字幕不卡在线播放| 欧美在线一区二区| 国内精品伊人久久久久av一坑 | a级精品国产片在线观看| 日韩一区日韩二区| 91精品国产综合久久久久久漫画| 精品一区二区三区在线播放视频| 夜夜爽夜夜爽精品视频| 91精品免费观看| 国产aⅴ综合色| 午夜伊人狠狠久久| 国产情人综合久久777777| 在线精品观看国产| 国产精品影视在线观看| 亚洲一线二线三线视频| 久久精品无码一区二区三区| 欧美一a一片一级一片| 精品一区二区三区久久久| 亚洲免费色视频| 久久久美女毛片| 欧美精选午夜久久久乱码6080| 国产精品一级片| 五月天中文字幕一区二区| 国产精品丝袜黑色高跟| 日韩午夜三级在线| 欧美自拍丝袜亚洲| 国产99久久久国产精品潘金网站| 亚洲成人免费电影| 亚洲男同1069视频| 国产偷国产偷精品高清尤物| 欧美日韩精品一区视频| 99精品欧美一区二区三区小说| 久久er精品视频| 亚洲夂夂婷婷色拍ww47 | 亚洲综合一区二区三区| 国产色91在线| 欧美大片一区二区| 337p亚洲精品色噜噜狠狠| 99视频超级精品| 国产成人免费在线视频| 美女任你摸久久| 亚洲成a人片在线不卡一二三区| 国产精品三级电影| 国产日韩欧美在线一区| 欧美成人a在线| 日韩欧美亚洲一区二区| 欧美视频一区在线| 欧美性大战xxxxx久久久| 91丨porny丨最新| 成人深夜福利app| 成人小视频免费在线观看| 国产精品一卡二卡| 国产成人在线视频网址| 国产高清亚洲一区| 国产乱码精品一区二区三区忘忧草| 日本aⅴ免费视频一区二区三区| 午夜精品久久久久久久蜜桃app| 伊人夜夜躁av伊人久久| 亚洲欧美日韩一区二区| 亚洲伦理在线精品| 一区二区三区免费网站| 一区二区三国产精华液| 亚洲综合色成人| 亚洲在线一区二区三区| 亚洲成人在线观看视频| 水蜜桃久久夜色精品一区的特点| 天天综合色天天| 久久精品国产亚洲aⅴ| 精品一区二区三区不卡| 国产精品一区二区免费不卡| 国产成人综合亚洲网站| 99精品欧美一区二区三区小说| 在线观看视频一区| 欧美二区乱c少妇| 精品日韩在线观看| 中文av一区特黄| 亚洲国产日韩a在线播放| 另类小说一区二区三区| 国模无码大尺度一区二区三区| 国产成人午夜视频| 色欧美88888久久久久久影院| 欧美日韩日本视频| 精品国产伦一区二区三区观看体验| 久久精品这里都是精品| 亚洲最快最全在线视频| 琪琪一区二区三区| 成人黄色av网站在线| 欧美色图免费看| 日韩精品一区二区在线| 国产精品女人毛片| 天天做天天摸天天爽国产一区| 国产一区二区影院| 91精彩视频在线观看| 日韩一区二区中文字幕| 中文字幕一区二区三区在线播放| 亚洲国产综合人成综合网站| 久久精工是国产品牌吗| 99久久久无码国产精品| 欧美人与性动xxxx| 国产精品女同一区二区三区| 日韩av网站免费在线| 99久久精品费精品国产一区二区| 制服丝袜av成人在线看| 日本一区二区在线不卡| 午夜av一区二区三区| www.亚洲人| 精品国产99国产精品| 亚洲影视在线播放| 粉嫩一区二区三区在线看| 欧美日高清视频| 一色屋精品亚洲香蕉网站| 极品少妇xxxx偷拍精品少妇| 欧美伊人久久久久久久久影院| 日本一区二区三区电影| 日韩电影免费在线观看网站| aaa国产一区| 久久婷婷成人综合色| 丝袜美腿亚洲色图| 欧美图区在线视频| 亚洲欧美日韩国产成人精品影院| 免费xxxx性欧美18vr| 欧美亚洲高清一区| 亚洲日本成人在线观看| 国产成人精品影院| 精品国产乱码久久久久久免费| 亚洲电影一区二区| 日本福利一区二区| 亚洲精品久久久久久国产精华液| 成人中文字幕在线| 国产亚洲精品7777| 国产福利一区二区三区| 久久一区二区三区四区| 美女任你摸久久| 日韩欧美中文字幕公布| 麻豆专区一区二区三区四区五区| 欧美日韩一区三区| 午夜免费久久看| 欧美片网站yy| 日本亚洲视频在线| 日韩欧美综合在线|