tlv

package
v0.0.0-...-d9311aa Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Codec

type Codec interface {
	ReadFrom(b *bytes.Buffer) error
	WriteTo(b *bytes.Buffer) error
}

type T1

type T1 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT1

func NewT1(uin int64, ip net.IP, serverTime int64) *T1

func (*T1) GetIP

func (t *T1) GetIP() (net.IP, error)

func (*T1) GetUin

func (t *T1) GetUin() (int64, error)

func (*T1) ReadFrom

func (t *T1) ReadFrom(b *bytes.Buffer) error

func (*T1) WriteTo

func (t *T1) WriteTo(b *bytes.Buffer) error

type T100

type T100 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT100

func NewT100(appID, subAppID uint64, acVer, sigMap, ssoVer uint32) *T100

func (*T100) ReadFrom

func (t *T100) ReadFrom(b *bytes.Buffer) error

func (*T100) WriteTo

func (t *T100) WriteTo(b *bytes.Buffer) error

type T104

type T104 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT104

func NewT104(bArr []byte) *T104

func (*T104) ReadFrom

func (t *T104) ReadFrom(b *bytes.Buffer) error

func (*T104) WriteTo

func (t *T104) WriteTo(b *bytes.Buffer) error

type T106

type T106 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT106

func NewT106(appID, subAppID uint64, acVer uint32, uin int64, svrTime int64, ip net.IP, i2 bool, hash [16]byte, salt int64, username string, a1Kay [16]byte, haveGUID bool, guid []byte, typ, ssoVer uint32) *T106

func (*T106) ReadFrom

func (t *T106) ReadFrom(b *bytes.Buffer) error

func (*T106) WriteTo

func (t *T106) WriteTo(b *bytes.Buffer) error

type T107

type T107 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT107

func NewT107(i uint16, i2 uint8, i3 uint16, i4 uint8) *T107

func (*T107) ReadFrom

func (t *T107) ReadFrom(b *bytes.Buffer) error

func (*T107) WriteTo

func (t *T107) WriteTo(b *bytes.Buffer) error

type T108

type T108 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT108

func NewT108(ksid []byte) *T108

func (*T108) ReadFrom

func (t *T108) ReadFrom(b *bytes.Buffer) error

func (*T108) WriteTo

func (t *T108) WriteTo(b *bytes.Buffer) error

type T109

type T109 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT109

func NewT109(hash [16]byte) *T109

func (*T109) ReadFrom

func (t *T109) ReadFrom(b *bytes.Buffer) error

func (*T109) WriteTo

func (t *T109) WriteTo(b *bytes.Buffer) error

type T10A

type T10A struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT10A

func NewT10A(a2 []byte) *T10A

func (*T10A) ReadFrom

func (t *T10A) ReadFrom(b *bytes.Buffer) error

func (*T10A) WriteTo

func (t *T10A) WriteTo(b *bytes.Buffer) error

type T112

type T112 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT112

func NewT112(bArr []byte) *T112

func (*T112) ReadFrom

func (t *T112) ReadFrom(b *bytes.Buffer) error

func (*T112) WriteTo

func (t *T112) WriteTo(b *bytes.Buffer) error

type T116

type T116 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT116

func NewT116(miscBitmap, subSigMap uint32, subAppIDs []uint64) *T116

func (*T116) ReadFrom

func (t *T116) ReadFrom(b *bytes.Buffer) error

func (*T116) WriteTo

func (t *T116) WriteTo(b *bytes.Buffer) error

type T124

type T124 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT124

func NewT124(osType, osVer []byte, nwType uint16, simOp, bArr4, apn []byte) *T124

func (*T124) ReadFrom

func (t *T124) ReadFrom(b *bytes.Buffer) error

func (*T124) WriteTo

func (t *T124) WriteTo(b *bytes.Buffer) error

type T126

type T126 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT126

func NewT126(random []byte) *T126

func (*T126) GetRandom

func (t *T126) GetRandom() ([]byte, error)

func (*T126) ReadFrom

func (t *T126) ReadFrom(b *bytes.Buffer) error

func (*T126) WriteTo

func (t *T126) WriteTo(b *bytes.Buffer) error

type T127

type T127 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT127

func NewT127(code, sign []byte) *T127

func (*T127) ReadFrom

func (t *T127) ReadFrom(b *bytes.Buffer) error

func (*T127) WriteTo

func (t *T127) WriteTo(b *bytes.Buffer) error

type T128

type T128 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT128

func NewT128(isGuidFileNil, isGuidGenSucc, isGuidChanged bool, guidFlag uint32, model, guid, brand []byte) *T128

func (*T128) ReadFrom

func (t *T128) ReadFrom(b *bytes.Buffer) error

func (*T128) WriteTo

func (t *T128) WriteTo(b *bytes.Buffer) error

type T141

type T141 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT141

func NewT141(simOp []byte, netType uint16, apn []byte) *T141

func (*T141) ReadFrom

func (t *T141) ReadFrom(b *bytes.Buffer) error

func (*T141) WriteTo

func (t *T141) WriteTo(b *bytes.Buffer) error

type T142

type T142 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT142

func NewT142(apkID []byte) *T142

func (*T142) ReadFrom

func (t *T142) ReadFrom(b *bytes.Buffer) error

func (*T142) WriteTo

func (t *T142) WriteTo(b *bytes.Buffer) error

type T143

type T143 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT143

func NewT143(d2 []byte) *T143

func (*T143) ReadFrom

func (t *T143) ReadFrom(b *bytes.Buffer) error

func (*T143) WriteTo

func (t *T143) WriteTo(b *bytes.Buffer) error

type T144

type T144 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT144

func NewT144(key [16]byte, tlvs ...Codec) *T144

func (*T144) ReadFrom

func (t *T144) ReadFrom(b *bytes.Buffer) error

func (*T144) WriteTo

func (t *T144) WriteTo(b *bytes.Buffer) error

type T145

type T145 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT145

func NewT145(bArr [16]byte) *T145

func (*T145) ReadFrom

func (t *T145) ReadFrom(b *bytes.Buffer) error

func (*T145) WriteTo

func (t *T145) WriteTo(b *bytes.Buffer) error

type T147

type T147 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT147

func NewT147(appID uint64, apkVersion []byte, md5APKSignature [16]byte) *T147

func (*T147) ReadFrom

func (t *T147) ReadFrom(b *bytes.Buffer) error

func (*T147) WriteTo

func (t *T147) WriteTo(b *bytes.Buffer) error

type T154

type T154 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT154

func NewT154(seq int32) *T154

func (*T154) ReadFrom

func (t *T154) ReadFrom(b *bytes.Buffer) error

func (*T154) WriteTo

func (t *T154) WriteTo(b *bytes.Buffer) error

type T166

type T166 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT166

func NewT166(i uint8) *T166

func (*T166) ReadFrom

func (t *T166) ReadFrom(b *bytes.Buffer) error

func (*T166) WriteTo

func (t *T166) WriteTo(b *bytes.Buffer) error

type T16A

type T16A struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT16A

func NewT16A(bArr []byte) *T16A

func (*T16A) ReadFrom

func (t *T16A) ReadFrom(b *bytes.Buffer) error

func (*T16A) WriteTo

func (t *T16A) WriteTo(b *bytes.Buffer) error

type T16D

type T16D struct {
	*TLV
}

func NewT16D

func NewT16D() *T16D

func (*T16D) ReadFrom

func (t *T16D) ReadFrom(b *bytes.Buffer) error

func (*T16D) WriteTo

func (t *T16D) WriteTo(b *bytes.Buffer) error

type T16E

type T16E struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT16E

func NewT16E(model []byte) *T16E

func (*T16E) ReadFrom

func (t *T16E) ReadFrom(b *bytes.Buffer) error

func (*T16E) WriteTo

func (t *T16E) WriteTo(b *bytes.Buffer) error

type T172

type T172 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT172

func NewT172(bArr []byte) *T172

func (*T172) ReadFrom

func (t *T172) ReadFrom(b *bytes.Buffer) error

func (*T172) WriteTo

func (t *T172) WriteTo(b *bytes.Buffer) error

type T174

type T174 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT174

func NewT174(bArr []byte) *T174

func (*T174) ReadFrom

func (t *T174) ReadFrom(b *bytes.Buffer) error

func (*T174) WriteTo

func (t *T174) WriteTo(b *bytes.Buffer) error

type T177

type T177 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT177

func NewT177(buildTime int64, sdkVersion string) *T177

func (*T177) ReadFrom

func (t *T177) ReadFrom(b *bytes.Buffer) error

func (*T177) WriteTo

func (t *T177) WriteTo(b *bytes.Buffer) error

type T17A

type T17A struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT17A

func NewT17A(appID uint64) *T17A

func (*T17A) ReadFrom

func (t *T17A) ReadFrom(b *bytes.Buffer) error

func (*T17A) WriteTo

func (t *T17A) WriteTo(b *bytes.Buffer) error

type T17C

type T17C struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT17C

func NewT17C(bArr []byte) *T17C

func (*T17C) ReadFrom

func (t *T17C) ReadFrom(b *bytes.Buffer) error

func (*T17C) WriteTo

func (t *T17C) WriteTo(b *bytes.Buffer) error

type T18

type T18 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT18

func NewT18(appID uint64, acVer uint32, uin int64, i2 uint16) *T18

func (*T18) ReadFrom

func (t *T18) ReadFrom(b *bytes.Buffer) error

func (*T18) WriteTo

func (t *T18) WriteTo(b *bytes.Buffer) error

type T182

type T182 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT182

func NewT182(msgCnt, timeLimit uint16) *T182

func (*T182) GetMessageCount

func (t *T182) GetMessageCount() (uint16, error)

func (*T182) GetTimeLimit

func (t *T182) GetTimeLimit() (uint16, error)

func (*T182) ReadFrom

func (t *T182) ReadFrom(b *bytes.Buffer) error

func (*T182) WriteTo

func (t *T182) WriteTo(b *bytes.Buffer) error

type T183

type T183 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT183

func NewT183(salt uint64) *T183

func (*T183) ReadFrom

func (t *T183) ReadFrom(b *bytes.Buffer) error

func (*T183) WriteTo

func (t *T183) WriteTo(b *bytes.Buffer) error

type T184

type T184 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT184

func NewT184(salt uint64, password string) *T184

func (*T184) ReadFrom

func (t *T184) ReadFrom(b *bytes.Buffer) error

func (*T184) WriteTo

func (t *T184) WriteTo(b *bytes.Buffer) error

type T185

type T185 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT185

func NewT185(i uint8) *T185

func (*T185) ReadFrom

func (t *T185) ReadFrom(b *bytes.Buffer) error

func (*T185) WriteTo

func (t *T185) WriteTo(b *bytes.Buffer) error

type T187

type T187 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT187

func NewT187(md5MAC [16]byte) *T187

func (*T187) ReadFrom

func (t *T187) ReadFrom(b *bytes.Buffer) error

func (*T187) WriteTo

func (t *T187) WriteTo(b *bytes.Buffer) error

type T188

type T188 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT188

func NewT188(md5AndroidID [16]byte) *T188

func (*T188) ReadFrom

func (t *T188) ReadFrom(b *bytes.Buffer) error

func (*T188) WriteTo

func (t *T188) WriteTo(b *bytes.Buffer) error

type T191

type T191 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT191

func NewT191(verifyMethod uint8) *T191

func (*T191) ReadFrom

func (t *T191) ReadFrom(b *bytes.Buffer) error

func (*T191) WriteTo

func (t *T191) WriteTo(b *bytes.Buffer) error

type T193

type T193 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT193

func NewT193(code []byte) *T193

func (*T193) ReadFrom

func (t *T193) ReadFrom(b *bytes.Buffer) error

func (*T193) WriteTo

func (t *T193) WriteTo(b *bytes.Buffer) error

type T194

type T194 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT194

func NewT194(md5IMSI [16]byte) *T194

func (*T194) ReadFrom

func (t *T194) ReadFrom(b *bytes.Buffer) error

func (*T194) WriteTo

func (t *T194) WriteTo(b *bytes.Buffer) error

type T2

type T2 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT2

func NewT2(code, sign []byte) *T2

func (*T2) GetCode

func (t *T2) GetCode() ([]byte, error)

func (*T2) GetSign

func (t *T2) GetSign() ([]byte, error)

func (*T2) ReadFrom

func (t *T2) ReadFrom(b *bytes.Buffer) error

func (*T2) WriteTo

func (t *T2) WriteTo(b *bytes.Buffer) error

type T201

type T201 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT201

func NewT201(bArr, bArr2, bArr3, bArr4 []byte) *T201

func (*T201) ReadFrom

func (t *T201) ReadFrom(b *bytes.Buffer) error

func (*T201) WriteTo

func (t *T201) WriteTo(b *bytes.Buffer) error

type T202

type T202 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT202

func NewT202(md5BSSID [16]byte, ssid []byte) *T202

func (*T202) ReadFrom

func (t *T202) ReadFrom(b *bytes.Buffer) error

func (*T202) WriteTo

func (t *T202) WriteTo(b *bytes.Buffer) error

type T400

type T400 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT400

func NewT400(key [16]byte, uin uint64, guid, dpwd [16]byte, appID, subAppID uint64, randSeed []byte, serverTime int64) *T400

func (*T400) ReadFrom

func (t *T400) ReadFrom(b *bytes.Buffer) error

func (*T400) WriteTo

func (t *T400) WriteTo(b *bytes.Buffer) error

type T401

type T401 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT401

func NewT401(bArr [16]byte) *T401

func (*T401) ReadFrom

func (t *T401) ReadFrom(b *bytes.Buffer) error

func (*T401) WriteTo

func (t *T401) WriteTo(b *bytes.Buffer) error

type T511

type T511 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT511

func NewT511(domains []string) *T511

func (*T511) ReadFrom

func (t *T511) ReadFrom(b *bytes.Buffer) error

func (*T511) WriteTo

func (t *T511) WriteTo(b *bytes.Buffer) error

type T52D

type T52D struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT52D

func NewT52D(deviceReport *pb.DeviceReport) *T52D

func (*T52D) ReadFrom

func (t *T52D) ReadFrom(b *bytes.Buffer) error

func (*T52D) WriteTo

func (t *T52D) WriteTo(b *bytes.Buffer) error

type T542

type T542 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT542

func NewT542(token []byte) *T542

func (*T542) ReadFrom

func (t *T542) ReadFrom(b *bytes.Buffer) error

func (*T542) WriteTo

func (t *T542) WriteTo(b *bytes.Buffer) error

type T544

type T544 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT544

func NewT544(uin int64, guid [16]byte, sdkVer string, typ uint16) *T544

func (*T544) ReadFrom

func (t *T544) ReadFrom(b *bytes.Buffer) error

func (*T544) WriteTo

func (t *T544) WriteTo(b *bytes.Buffer) error

type T545

type T545 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT545

func NewT545(bArr [16]byte) *T545

func (*T545) ReadFrom

func (t *T545) ReadFrom(b *bytes.Buffer) error

func (*T545) WriteTo

func (t *T545) WriteTo(b *bytes.Buffer) error

type T547

type T547 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT547

func NewT547(bArr []byte) *T547

func (*T547) ReadFrom

func (t *T547) ReadFrom(b *bytes.Buffer) error

func (*T547) WriteTo

func (t *T547) WriteTo(b *bytes.Buffer) error

type T548

type T548 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT548

func NewT548(bArr []byte) *T548

func (*T548) ReadFrom

func (t *T548) ReadFrom(b *bytes.Buffer) error

func (*T548) WriteTo

func (t *T548) WriteTo(b *bytes.Buffer) error

type T8

type T8 struct {
	*TLV
	// contains filtered or unexported fields
}

func NewT8

func NewT8(i1 uint16, localeID uint32, i3 uint16) *T8

func (*T8) ReadFrom

func (t *T8) ReadFrom(b *bytes.Buffer) error

func (*T8) WriteTo

func (t *T8) WriteTo(b *bytes.Buffer) error

type TLV

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

func NewTLV

func NewTLV(t uint16, l uint16, v *bytes.Buffer) *TLV

func (*TLV) GetType

func (t *TLV) GetType() uint16

func (*TLV) GetValue

func (t *TLV) GetValue() (*bytes.Buffer, error)

func (*TLV) MarshalJSON

func (v *TLV) MarshalJSON() ([]byte, error)

func (*TLV) MustGetValue

func (t *TLV) MustGetValue() *bytes.Buffer

func (*TLV) ReadFrom

func (t *TLV) ReadFrom(b *bytes.Buffer) error

func (*TLV) SetValue

func (t *TLV) SetValue(v *bytes.Buffer)

func (*TLV) WriteTo

func (t *TLV) WriteTo(b *bytes.Buffer) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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