27 lines
561 B
Go
27 lines
561 B
Go
package packet
|
|
|
|
import "gitea.mmo.to/ppForge/ppforge/protocol"
|
|
|
|
// Layer implements protocol.ProtocolReferencer
|
|
type Layer struct {
|
|
// needs a reference to a protocol
|
|
protocolReference *protocol.ProtocolStructure
|
|
|
|
ProtocolName string
|
|
Values []FieldValue
|
|
}
|
|
|
|
// Structure contains all layers of a packet
|
|
type Structure struct {
|
|
MetaData Metadata
|
|
Layers []Layer
|
|
}
|
|
|
|
func (pl *Layer) GetProtocol() *protocol.ProtocolStructure {
|
|
return pl.protocolReference
|
|
}
|
|
|
|
func (pl *Layer) Setprotocol(ps *protocol.ProtocolStructure) {
|
|
pl.protocolReference = ps
|
|
}
|