encoder

package
v0.0.0-...-e973567 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(v interface{}) ([]byte, error)

func ToUnicode

func ToUnicode(s string) []byte

func Unmarshal

func Unmarshal(buf []byte, v interface{}) error

Types

type BinaryMarshallable

type BinaryMarshallable interface {
	MarshalBinary(*Metadata) ([]byte, error)
	UnmarshalBinary([]byte, *Metadata) error
}

SMB数据包解码

type Metadata

type Metadata struct {
	Tags       *TagMap
	Lens       map[string]uint64
	Offsets    map[string]uint64
	Parent     interface{}
	ParentBuf  []byte
	CurrOffset uint64
	CurrField  string
}

type TagMap

type TagMap struct {
	// contains filtered or unexported fields
}

func (*TagMap) Get

func (t *TagMap) Get(key string) interface{}

func (*TagMap) GetInt

func (t *TagMap) GetInt(key string) (int, error)

func (*TagMap) GetString

func (t *TagMap) GetString(key string) (string, error)

func (*TagMap) Has

func (t *TagMap) Has(key string) bool

func (*TagMap) Set

func (t *TagMap) Set(key string, val interface{})

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL