syntax
import "github.com/TheManticoreProject/Manticore/network/dcerpc/syntax"
Package syntax models DCE/RPC presentation syntax identifiers (p_syntax_id_t).
A syntax identifier names either an abstract syntax (an interface UUID and version) or a transfer syntax (an encoding such as NDR). On the wire it is a 16-byte UUID followed by a 4-byte version: a 16-bit major version and a 16-bit minor version, both little-endian ([C706] section 12.6).
Index
Constants
Size is the marshalled size, in bytes, of a syntax identifier: 16-byte UUID plus a 2-byte major and 2-byte minor version.
const Size = 20
type SyntaxID
SyntaxID identifies an abstract or transfer syntax.
type SyntaxID struct {
UUID guid.GUID
MajorVersion uint16
MinorVersion uint16
}
func NDR64TransferSyntax
func NDR64TransferSyntax() SyntaxID
NDR64TransferSyntax returns the identifier for the NDR64 transfer syntax, version 1.0: 71710533-beba-4937-8319-b5dbef9ccc36.
func NDRTransferSyntax
func NDRTransferSyntax() SyntaxID
NDRTransferSyntax returns the identifier for the NDR (Network Data Representation) transfer syntax, version 2.0: 8a885d04-1ceb-11c9-9fe8-08002b104860.
func (SyntaxID) Equal
func (s SyntaxID) Equal(other SyntaxID) bool
Equal reports whether two syntax identifiers are identical.
func (SyntaxID) Marshal
func (s SyntaxID) Marshal() ([]byte, error)
Marshal serializes the syntax identifier into its 20-byte wire form.
func (SyntaxID) String
func (s SyntaxID) String() string
String returns a human-readable representation, e.g. “8a885d04-…-08002b104860 v2.0”.
func (*SyntaxID) Unmarshal
func (s *SyntaxID) Unmarshal(data []byte) (int, error)
Unmarshal parses a syntax identifier from data and returns the number of bytes consumed.