package npc type Field struct { Name string // Name of the Field Desc string // Lengthy description Regex string // Regex to recognize values Size uint // Size in bits! SubFields []Field // Possible sub-fields Optional bool // Is this field required? Payload bool // Is this field the payload or next protocol level? PredefinedValues []PredefinedFieldValue // Collection of predefined field values } type PredefinedFieldValue struct { Desc string FieldValues []FieldValue } type FieldValue struct { FieldRef *Field Value string } type ProtocolStructure struct { Metadata DOPMetadata Structure []Field } type DOPMetadata struct { DOPVersion string Name string Version string TCPIPLayer uint OSILayer uint ExtensionTo string Description string RequiredJSFunctions []string LowerLayerIdentification map[string]string } type DataModel struct { Name string // User defined name of his current work (filename later) Protocols []ProtocolStructure // List of protocols in order of the stack Data []FieldValue // Data of the fields of all protocols ProtocolCreation bool }