26 lines
555 B
Go
26 lines
555 B
Go
package packet
|
|
|
|
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
|
|
}
|