ppforge/protocol/protocolmeta.go

31 lines
730 B
Go

package protocol
// Meta holds the metadata of a protocol
type Meta struct {
Name string
Revision uint
Version string
TCPIPLayer uint
ExtensionTo string
Description string
RequiredJSFunctions []string
LowerLayerIdentification map[string]string
}
// UpdateMetaData updates the full metadata of a protocol
func UpdateMetaData(
prot *Protocol,
name string,
version string,
tcpiplayer uint,
osilayer uint,
extensionTo string,
desc string,
) {
prot.Metadata.Name = name
prot.Metadata.Description = desc
prot.Metadata.ExtensionTo = extensionTo
prot.Metadata.Version = version
prot.Metadata.TCPIPLayer = tcpiplayer
}