init v0.1.0

This commit is contained in:
Sudo-Ivan
2024-12-30 01:56:25 -06:00
commit 668d7c56b5
27 changed files with 3921 additions and 0 deletions

27
pkg/packet/constants.go Normal file
View File

@@ -0,0 +1,27 @@
package packet
const (
// MTU constants
EncryptedMDU = 383 // Maximum size of payload data in encrypted packet
PlainMDU = 464 // Maximum size of payload data in unencrypted packet
// Header Types
HeaderType1 = 0 // Two byte header, one 16 byte address field
HeaderType2 = 1 // Two byte header, two 16 byte address fields
// Propagation Types
PropagationBroadcast = 0
PropagationTransport = 1
// Destination Types
DestinationSingle = 0
DestinationGroup = 1
DestinationPlain = 2
DestinationLink = 3
// Packet Types
PacketData = 0
PacketAnnounce = 1
PacketLinkRequest = 2
PacketProof = 3
)