2023-01-03 13:34:32 +01:00
|
|
|
package packet
|
2023-04-11 16:05:24 +02:00
|
|
|
|
|
|
|
import "gitea.mmo.to/ProtocolPacketForger/ppf/protocol"
|
|
|
|
|
|
|
|
// implements protocol.ProtocolReferencer
|
|
|
|
type PacketLayer struct {
|
|
|
|
// needs a reference to a protocol
|
|
|
|
protocolReference *protocol.ProtocolStructure
|
|
|
|
|
|
|
|
ProtocolName string
|
|
|
|
Values []FieldValue
|
|
|
|
}
|
|
|
|
|
|
|
|
type PacketStructure struct {
|
|
|
|
MetaData PacketMetadata
|
|
|
|
Layers []PacketLayer
|
|
|
|
}
|
|
|
|
|
|
|
|
func (pl *PacketLayer) GetProtocol() *protocol.ProtocolStructure {
|
|
|
|
return pl.protocolReference
|
|
|
|
}
|
|
|
|
|
|
|
|
func (pl *PacketLayer) Setprotocol(ps *protocol.ProtocolStructure) {
|
|
|
|
pl.protocolReference = ps
|
|
|
|
}
|