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

📄 const.cs

📁 一个抓包工具
💻 CS
📖 第 1 页 / 共 5 页
字号:
using System;

namespace MyClasses
{

	public class Const
	{
		public const int LIST_VIEW_PACKET_NO_INDEX = 0;
		public const int LIST_VIEW_TIME_INDEX = 1;
		public const int LIST_VIEW_SOURCE_INDEX = 2;
		public const int LIST_VIEW_DESTINATION_INDEX = 3;
		public const int LIST_VIEW_PROTOCOL_INDEX = 4;
		public const int LIST_VIEW_INFO_INDEX = 5;

		public const int LENGTH_OF_ARP				= 28;
		public const int LENGTH_OF_DCERPC			= 67;
		public const int LENGTH_OF_EIGRP			= 40;
		public const int LENGTH_OF_ETHERNET			= 14;
		public const int LENGTH_OF_INTERNET			= 20;
		public const int LENGTH_OF_ICMP				= 8;
		public const int LENGTH_OF_IPX				= 30;
		public const int LENGTH_OF_UDP				= 8;
		public const int LENGTH_OF_TCP				= 20;
		public const int LENGTH_OF_STP				= 35;

		public const int PROTOCOL_TYPE_NONE		= 0;
		public const int PROTOCOL_TYPE_ARP			= 1;
		public const int PROTOCOL_TYPE_CDP			= 2;
		public const int PROTOCOL_TYPE_DCERPC		= 3;
		public const int PROTOCOL_TYPE_DLSW		= 4;
		public const int PROTOCOL_TYPE_DNS			= 5;
		public const int PROTOCOL_TYPE_EIGRP		= 6;
		public const int PROTOCOL_TYPE_INTERNET	= 7;
		public const int PROTOCOL_TYPE_IPX			= 8;
		public const int PROTOCOL_TYPE_LLC			= 9;
		public const int PROTOCOL_TYPE_LOOPBACK	= 11;
		public const int PROTOCOL_TYPE_MSWBROWSER	= 11;
		public const int PROTOCOL_TYPE_MSWLOGON	= 12;
		public const int PROTOCOL_TYPE_NBDS		= 13;
		public const int PROTOCOL_TYPE_NBNS		= 14;
		public const int PROTOCOL_TYPE_NBSS		= 15;
		public const int PROTOCOL_TYPE_NETBIOS		= 16;
		public const int PROTOCOL_TYPE_SMB			= 17;
		public const int PROTOCOL_TYPE_SMBMAILSLOT = 18;
		public const int PROTOCOL_TYPE_STP			= 19;
		public const int PROTOCOL_TYPE_TB			= 20;
		public const int PROTOCOL_TYPE_TCP			= 21;
		public const int PROTOCOL_TYPE_UDP			= 22;


		public const int IPPROTO_IP              = 0;               // dummy for IP
		public const int IPPROTO_ICMP            = 1;               // control message protocol
		public const int IPPROTO_IGMP            = 2;               // internet group management protocol
		public const int IPPROTO_GGP             = 3;               // gateway^2 (deprecated)
		public const int IPPROTO_TCP             = 6;               // tcp
		public const int IPPROTO_PUP             = 12;              // pup
		public const int IPPROTO_UDP             = 17;              // user datagram protocol
		public const int IPPROTO_IDP             = 22;              // xns idp
		public const int IPPROTO_IPV6            = 41;              // IPv6
		public const int IPPROTO_ND              = 77;              // UNOFFICIAL net disk proto
		public const int IPPROTO_ICLFXBM         = 78;
		public const int IPPROTO_EIGRP           = 88;              // EIGRP

		public const int IPPROTO_RAW             = 255;             // raw IP packet
		public const int IPPROTO_MAX             = 256;

		public const int IPPORT_TIMESERVER       = 37;
		public const int IPPORT_NAMESERVER       = 42;
		public const int IPPORT_DNS              = 43;
		public const int IPPORT_MTP              = 57;
		public const int IPPORT_RJE              = 77;
		public const int IPPORT_FINGER           = 79;
		public const int IPPORT_HTTP2            = 8080;
		public const int IPPORT_SSDP             = 1031;
		public const int IPPORT_SSDP2            = 1032;
		public const int IPPORT_TTYLINK          = 87;
		public const int IPPORT_SUPDUP           = 95;
		public const int IPPORT_EPMEP			 = 135;
		public const int IPPORT_NBNS			 = 137;
		public const int IPPORT_NBDTGRM			 = 138;
		public const int IPPORT_NBSSN			 = 139;
		public const int IPPORT_EXECSERVER       = 512;
		public const int IPPORT_LOGINSERVER      = 513;
		public const int IPPORT_CMDSERVER        = 514;
		public const int IPPORT_WHOSERVER        = 513;
		public const int IPPORT_ROUTESERVER      = 520;


		public const int IPPORT_ECHO  = 7;// tcp	   udp
		public const int IPPORT_DISCARD  = 9; // tcp	   udp
		public const int IPPORT_SYSTAT  = 11; // tcp
		public const int IPPORT_DAYTIME  = 13; // tcp	   udp
		public const int IPPORT_NETSTAT  = 15; // tcp
		public const int IPPORT_QOTD  = 17; // tcp	   udp
		public const int IPPORT_CHARGEN  = 19; // tcp	   udp
		public const int IPPORT_FTP_DATA  = 20; // tcp
		public const int IPPORT_FTP  = 21; // tcp
		public const int IPPORT_TELNET  = 23; // tcp
		public const int IPPORT_SMTP  = 25; // tcp
		public const int IPPORT_TIME  = 37; // tcp	   udp
		public const int IPPORT_RLP  = 39; // udp
		public const int IPPORT_NAME  = 42; // tcp	   udp
		public const int IPPORT_WHOIS  = 43; // tcp
		public const int IPPORT_DOMAIN  = 53; // tcp	   udp
		public const int IPPORT_BOOTP  = 67; // udp
		public const int IPPORT_TFTP  = 69; // udp
		public const int IPPORT_HTTP  = 80; // tcp
		public const int IPPORT_LINK  = 87; // tcp
		public const int IPPORT_HOSTNAMES = 101; //tcp
		public const int IPPORT_ISP_TSAP = 102; //tcp
		public const int IPPORT_DICTIONARY = 103; //tcp
		public const int IPPORT_X400_SND = 104; //tcp
		public const int IPPORT_CSNET_NS = 105; //tcp
		public const int IPPORT_POP = 109; //tcp
		public const int IPPORT_POP3 = 110; //tcp
		public const int IPPORT_PORTMAP = 111; //tcp	   udp
		public const int IPPORT_AUTH = 113; //tcp
		public const int IPPORT_SFTP = 115; //tcp
		public const int IPPORT_PATH = 117; //tcp
		public const int IPPORT_NNTP = 119; //tcp
		public const int IPPORT_NTP = 123; //udp
		public const int IPPORT_NB_NAME = 137; //udp
		public const int IPPORT_NB_DATAGRAM = 138; //udp
		public const int IPPORT_NB_SESSION = 139; //tcp
		public const int IPPORT_NEWS = 144; //tcp
		public const int IPPORT_SGMP = 153; //udp
		public const int IPPORT_TCPREPO = 158; //tcp
		public const int IPPORT_SNMP = 161; //udp
		public const int IPPORT_SNMP_TRAP = 162; //udp
		public const int IPPORT_PRINT_SRV = 170; //tcp
		public const int IPPORT_VMNET = 175; //tcp
		public const int IPPORT_LOAD = 315; //udp
		public const int IPPORT_VMNET0 = 400; //tcp
		public const int IPPORT_HTTPS = 443; //tcp
		public const int IPPORT_SYTEK = 500; //udp
		public const int IPPORT_EXEC = 512; //tcp
		public const int IPPORT_BIFF = 512; //udp
		public const int IPPORT_LOGIN = 513; //tcp
		public const int IPPORT_WHO = 513; //udp
		public const int IPPORT_SHEL = 514; //tcp
		public const int IPPORT_SYSLOG = 514; //udp
		public const int IPPORT_PRINTER = 515; //tcp
		public const int IPPORT_TALK = 517; //udp
		public const int IPPORT_NTALK = 518; //udp
		public const int IPPORT_EFS = 520; //tcp
		public const int IPPORT_ROUTE = 520; //udp
		public const int IPPORT_TIMED = 525; //udp
		public const int IPPORT_TEMPO = 526; //tcp
		public const int IPPORT_COURIER = 530; //tcp
		public const int IPPORT_CONFERENCE = 531; //tcp
		public const int IPPORT_RVD_CONTROL = 531; //udp
		public const int IPPORT_NETNEWS = 532; //tcp
		public const int IPPORT_NETWALL = 533; //udp
		public const int IPPORT_UUCP = 540; //tcp
		public const int IPPORT_KLOGIN = 543; //tcp
		public const int IPPORT_KSHEL = 544; //tcp
		public const int IPPORT_NEW_RWHO = 550; //udp
		public const int IPPORT_REMOTEFS = 556; //tcp
		public const int IPPORT_RMONITOR = 560; //udp
		public const int IPPORT_MONITOR = 561; //udp
		public const int IPPORT_GARCON = 600; //tcp
		public const int IPPORT_MAITRD = 601; //tcp
		public const int IPPORT_BUSBOY = 602; //tcp
		public const int IPPORT_ACCTMASTER = 700; //udp
		public const int IPPORT_ACCTSLAVE = 701; //udp
		public const int IPPORT_ACCT = 702; //udp
		public const int IPPORT_ACCTLOGIN = 703; //udp
		public const int IPPORT_ACCTPRINTER = 704; //udp
		public const int IPPORT_ACCTINFO = 705; //udp
		public const int IPPORT_ACCTSLAVE2 = 706; //udp
		public const int IPPORT_ACCTDISK = 707; //udp
		public const int IPPORT_KERBEROS = 750; //tcp	   udp
		public const int IPPORT_KERBEROS_MASTER  = 751; //tcp	   udp
		public const int IPPORT_PASSWD_SERVER = 752; //udp
		public const int IPPORT_USERREG_SERVER = 753; //udp
		public const int IPPORT_KRB_PROP = 754; //tcp
		public const int IPPORT_ERRLOGIN = 888; //tcp
		public const int IPPORT_DLSW_UDP		= 2067;		public const int IPPORT_DLSW_TCP		= 2065;

		public const ushort ETHERTYPE_PUP			= 0x0200;	// PUP protocol
		public const ushort ETHERTYPE_SPRITE		= 0x0500;
		public const ushort ETHERTYPE_NS			= 0x0600;
		public const ushort ETHERTYPE_TRAIL		= 0x1000;
		public const ushort ETHERTYPE_MOPDL		= 0x6001;
		public const ushort ETHERTYPE_MOPRC		= 0x6002;
		public const ushort ETHERTYPE_DN			= 0x6003;
		public const ushort ETHERTYPE_LAT			= 0x6004;
		public const ushort ETHERTYPE_SCA			= 0x6007;
		public const ushort ETHERTYPE_IP			= 0x0800;	// IP protocol
		public const ushort ETHERTYPE_ARP			= 0x0806;	// Addr. resolution protocol
		public const ushort ETHERTYPE_REVARP		= 0x8035;	// reverse Addr. resolution protocol
		public const ushort ETHERTYPE_LANBRIDGE	= 0x8038;
		public const ushort ETHERTYPE_DECDNS		= 0x803c;
		public const ushort ETHERTYPE_DECDTS		= 0x803e;
		public const ushort ETHERTYPE_VEXP		= 0x805b;
		public const ushort ETHERTYPE_VPROD		= 0x805c;
		public const ushort ETHERTYPE_ATALK		= 0x809b;
		public const ushort ETHERTYPE_AARP		= 0x80f3;
		public const ushort ETHERTYPE_8021Q		= 0x8100;
		public const ushort ETHERTYPE_IPX			= 0x8137;
		public const ushort ETHERTYPE_IPV6		= 0x86dd;
		public const ushort ETHERTYPE_LOOPBACK	= 0x9000;

		public const int NORMAL = 0;
		public const int VALUE = 1;

		public const uint PACKET_ALIGNMENT = 4; //sizeof(int);


		public const ushort ARPHRD_NETROM	= 0;		// from KA9Q: NET/ROM pseudo			public const ushort ARPHRD_ETHER 	= 1;		// Ethernet 10Mbps				public const ushort	ARPHRD_EETHER	= 2;		// Experimental Ethernet			public const ushort	ARPHRD_AX25		= 3;		// AX.25 Level 2				public const ushort	ARPHRD_PRONET	= 4;		// PROnet token ring				public const ushort	ARPHRD_CHAOS	= 5;		// Chaosnet					public const ushort	ARPHRD_IEEE802	= 6;		// IEEE 802.2 Ethernet/TR/TB			public const ushort	ARPHRD_ARCNET	= 7;		// ARCnet					public const ushort	ARPHRD_HYPERCH	= 8;		// Hyperchannel					public const ushort	ARPHRD_LANSTAR	= 9;		// Lanstar					public const ushort	ARPHRD_AUTONET	= 10;		// Autonet Short Address			public const ushort	ARPHRD_LOCALTLK	= 11;		// Localtalk					public const ushort	ARPHRD_LOCALNET	= 12;		// LocalNet (IBM PCNet/Sytek LocalNET) 		public const ushort	ARPHRD_ULTRALNK	= 13;		// Ultra link					public const ushort	ARPHRD_SMDS		= 14;		// SMDS						public const ushort ARPHRD_DLCI		= 15;		// Frame Relay DLCI				public const ushort ARPHRD_ATM		= 16;		// ATM						public const ushort ARPHRD_HDLC		= 17;		// HDLC						public const ushort ARPHRD_FIBREC	= 18;		// Fibre Channel				public const ushort ARPHRD_ATM2225	= 19;		// ATM (RFC 2225)				public const ushort ARPHRD_SERIAL	= 20;		// Serial Line					public const ushort ARPHRD_ATM2		= 21;		// ATM						public const ushort ARPHRD_MS188220	= 22;		// MIL-STD-188-220				public const ushort ARPHRD_METRICOM	= 23;		// Metricom STRIP				public const ushort ARPHRD_IEEE1394	= 24;		// IEEE 1394.1995				public const ushort ARPHRD_MAPOS	= 25;		// MAPOS					public const ushort ARPHRD_TWINAX	= 26;		// Twinaxial					public const ushort ARPHRD_EUI_64	= 27;		// EUI-64			

		public const ushort ARPOP_REQUEST  = 1;       /* ARP request.  */		public const ushort ARPOP_REPLY    = 2;       /* ARP reply.  */		public const ushort ARPOP_RREQUEST = 3;       /* RARP request.  */		public const ushort ARPOP_RREPLY   = 4;       /* RARP reply.  */		public const ushort ARPOP_IREQUEST = 8;       /* Inverse ARP (RFC 1293) request.  */		public const ushort ARPOP_IREPLY   = 9;       /* Inverse ARP reply.  */		public const ushort ATMARPOP_NAK   = 10;      /* ATMARP NAK.  */

		public const string ETHERTYPE_PUP_STR		 = "PUP";
		public const string ETHERTYPE_IP_STR		 = "IP ( Internet Protocol )";
		public const string ETHERTYPE_ARP_STR		 = "ARP ( Address Resolution Protocol )";
		public const string ETHERTYPE_REVARP_STR	 = "RARP ( Reverse Address Resolution Protocol )";
		public const string ETHERTYPE_NS_STR		 = "NS ";
		public const string ETHERTYPE_SPRITE_STR	 = "SPRITE ";
		public const string ETHERTYPE_TRAIL_STR	 = "TRAIL ";
		public const string ETHERTYPE_MOPDL_STR	 = "MOPDL ";
		public const string ETHERTYPE_MOPRC_STR	 = "MOPRC ";
		public const string ETHERTYPE_DN_STR		 = "DN ";
		public const string ETHERTYPE_LAT_STR		 = "LAT ";
		public const string ETHERTYPE_SCA_STR		 = "SCA ";
		public const string ETHERTYPE_LANBRIDGE_STR = "LAN BRIDGE ";
		public const string ETHERTYPE_DECDNS_STR	 = "DEC DNS ";
		public const string ETHERTYPE_DECDTS_STR	 = "DEC TS ";
		public const string ETHERTYPE_VEXP_STR		 = "VEXP ";
		public const string ETHERTYPE_VPROD_STR	 = "VPROD ";
		public const string ETHERTYPE_ATALK_STR	 = "ATALK ( Apple Talk )";
		public const string ETHERTYPE_AARP_STR		 = "AARP ";
		public const string ETHERTYPE_8021Q_STR	 = "8021Q ";
		public const string ETHERTYPE_IPX_STR		 = "IPX ( Internet Packet Excahge )";
		public const string ETHERTYPE_IPV6_STR		 = "IPV6 ";
		public const string ETHERTYPE_LOOPBACK_STR	 = "LOOPBACK ";

		public const ushort TYPE_DEVICE_ID			= 0x0001;		public const ushort TYPE_ADDRESS			= 0x0002;		public const ushort TYPE_PORT_ID			= 0x0003;		public const ushort TYPE_CAPABILITIES		= 0x0004;		public const ushort TYPE_IOS_VERSION		= 0x0005;		public const ushort TYPE_PLATFORM			= 0x0006;		public const ushort TYPE_IP_PREFIX			= 0x0007;		public const ushort TYPE_VTP_MGMT_DOMAIN    = 0x0009; // Guessed, from tcpdump		public const ushort TYPE_NATIVE_VLAN        = 0x000a; // Guessed, from tcpdump		public const ushort TYPE_DUPLEX             = 0x000b; // Guessed, from tcpdump

		public const byte PROTO_TYPE_NLPID	= 1;		public const byte PROTO_TYPE_IEEE_802_2	= 2;

		public const byte NLPID_NULL			= 0x00;		public const byte NLPID_IPI_T_70		= 0x01;	// T.70, when an IPI		public const byte NLPID_SPI_X_29		= 0x01;	// X.29, when an SPI		public const byte NLPID_X_633			= 0x03;	// X.633		public const byte NLPID_Q_931			= 0x08;	// Q.931, Q.932, Q.933, X.36, ISO 11572, ISO 11582		public const byte NLPID_Q_2931			= 0x09;	// Q.2931		public const byte NLPID_Q_2119			= 0x0c;	// Q.2119		public const byte NLPID_SNAP			= 0x80;		public const byte NLPID_ISO8473_CLNP	= 0x81;	// X.233		public const byte NLPID_ISO9542_ESIS	= 0x82;		public const byte NLPID_ISO10589_ISIS	= 0x83;		public const byte NLPID_ISO10747_IDRP   = 0x85;		public const byte NLPID_ISO9542X25_ESIS	= 0x8a;		public const byte NLPID_ISO10030		= 0x8c;		public const byte NLPID_ISO11577		= 0x8d;	// X.273		public const byte NLPID_IP6				= 0x8e;		public const byte NLPID_COMPRESSED		= 0xb0;	// "Data compression protocol"		public const byte NLPID_SNDCF			= 0xc1;	// "SubNetwork Dependent Convergence Function		public const byte NLPID_IP				= 0xcc;		public const byte NLPID_PPP				= 0xcf;

		public const ushort FLAGS_RESPONSE = 0x8000;
		public const ushort FLAGS_TRUNCATED = 0x0200;
		public const ushort FLAGS_RECURSION_DESIRED = 0x0100;
		public const ushort FLAGS_BROADCAST = 0x0010;
		public const ushort FLAGS_AUTHORITATIVE = 0x0400;
		public const ushort FLAGS_RECURSION_AVAILABLE = 0x0080;

		public const int IPPORT_NETBIOS_NS		 = 137;
		public const int IPPORT_NETBIOS_DATAGRAM = 138;
		public const int IPPORT_NETBIOS_SSN      = 139;

		public const ushort SOCKET_TYPE_SAP = 0x0452;

		public const byte PACKET_TYPE_SPX = 5;
		public const byte PACKET_TYPE_NCP = 17;

		public const int UDP_PORT_LLC1    = 12000;		public const int UDP_PORT_LLC2    = 12001;		public const int UDP_PORT_LLC3    = 12002;		public const int UDP_PORT_LLC4    = 12003;		public const int UDP_PORT_LLC5    = 12004;

⌨️ 快捷键说明

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