This commit is contained in:
2023-10-27 18:45:33 +02:00
parent abde7e4f10
commit f0f74c2cb5
24 changed files with 1469 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
package Const_Fields
const (
ARP_Operation_request = 0x0001
ARP_Operation_reply = 0x0002
Hardware_type_Ethernet = 0x0001
ARP_ETH_HARDWARE_SIZE = 0x06
ARP_IPV4_PROTOCOL_SIZE = 0x04
)

View File

@@ -0,0 +1,9 @@
package Const_Fields
const (
Type_TCP = 0x06
Type_UDP = 0x11
Type_ICMP = 0x01
Type_IPV4 = 0x0800
Type_ARP = 0x0806
)

View File

@@ -0,0 +1,15 @@
package Const_Fields
const (
ICMP_Type_Unreachable = 0x03
ICMP_Type_Exceeded = 0x0b
ICMP_Type_Paremeter_problem = 0x0c
ICMP_Type_Source_quench = 0x04
ICMP_Type_Redirect = 0x05
ICMP_Type_Echo = 0x08
ICMP_Type_Reply = 0x00
ICMP_Type_Timestamp = 0x0d
ICMP_Type_TimestampReply = 0x0e
ICMP_Type_InformationRequest = 0x0f
ICMP_Type_InformationReply = 0x10
)

View File

@@ -0,0 +1,34 @@
package Const_Fields
const (
Version_Hl_IPV4 = 0x45
TTL = 0xff
/*Classes (PHBs) COMBINED WITH ECN(2 bits set to 0) */
DS = 0x00 //BEST EFFORT
DS_ExpeditedForwarding= 0xb8
DS_AF1 = 0x20
DS_AF2 = 0x40
DS_AF3 = 0x60
DS_AF4 = 0x80
DS_NetworkControl = 0xc0
/*Assuring Forwarding class 1 */
DS_AF11 = 0x28 // Low drop prec
DS_AF12 = 0x30 // Medium drop prec
DS_AF13 = 0x38 // High drop prec
/*Assuring Forwarding class 2 */
DS_AF21 = 0x48 // Low drop prec
DS_AF22 = 0x50 // Medium drop prec
DS_AF23 = 0x58 // High drop prec
/*Assuring Forwarding class 3 */
DS_AF31 = 0x68 // Low drop prec
DS_AF32 = 0x70 // Medium drop prec
DS_AF33 = 0x78 // High drop prec
/*Assuring Forwarding class 4 */
DS_AF41 = 0x88 // Low drop prec
DS_AF42 = 0x90 // Medium drop prec
DS_AF43 = 0x98 // High drop prec
)