2023-09-17 12:49:41 +02:00
|
|
|
package protocol
|
|
|
|
|
2023-11-10 13:48:47 +01:00
|
|
|
// Meta holds the metadata of a protocol
|
|
|
|
type Meta struct {
|
2023-09-17 12:49:41 +02:00
|
|
|
Name string
|
|
|
|
Revision uint
|
|
|
|
Version string
|
|
|
|
TCPIPLayer uint
|
|
|
|
ExtensionTo string
|
|
|
|
Description string
|
|
|
|
RequiredJSFunctions []string
|
|
|
|
LowerLayerIdentification map[string]string
|
|
|
|
}
|
|
|
|
|
2023-11-10 13:48:47 +01:00
|
|
|
// UpdateMetaData updates the full metadata of a protocol
|
2023-09-17 12:49:41 +02:00
|
|
|
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
|
|
|
|
}
|