Documentation ¶
Index ¶
- func NewGuPacketFun(fun GuPackFun) []byte
- func TlvEnum(bin []byte, store map[uint16]func(pack *GuUnPacket))
- type GuPackFun
- type GuPacket
- func (p *GuPacket) GetAll() (bin []byte)
- func (p *GuPacket) GetHex() string
- func (p *GuPacket) JmpHead()
- func (p *GuPacket) Reset()
- func (p *GuPacket) SetBytes(bin []byte)
- func (this *GuPacket) SetLitTlv(Type uint8, Val []byte)
- func (this *GuPacket) SetLitTlvS(Type uint8, Val string)
- func (p *GuPacket) SetSToken(bin string)
- func (p *GuPacket) SetString(bin string)
- func (p *GuPacket) SetTlv(t *Tlv)
- func (p *GuPacket) SetToken(bin []byte)
- func (p *GuPacket) SetUint16(i uint16)
- func (p *GuPacket) SetUint32(i uint32)
- func (p *GuPacket) SetUint64(i uint64)
- func (p *GuPacket) SetUint8(i uint8)
- func (p *GuPacket) ToTlv(t uint16) (bin []byte)
- type GuUnPackFun
- type GuUnPacket
- func (r *GuUnPacket) GetAll() []byte
- func (r *GuUnPacket) GetAllHex() string
- func (r *GuUnPacket) GetAllHexTmp() string
- func (r *GuUnPacket) GetBin(i int) []byte
- func (r *GuUnPacket) GetLen() int
- func (r *GuUnPacket) GetStr(i int32) string
- func (r *GuUnPacket) GetTlv() (t *Tlv)
- func (r *GuUnPacket) GetToken() []byte
- func (r *GuUnPacket) GetUint16() uint16
- func (r *GuUnPacket) GetUint32() uint32
- func (r *GuUnPacket) GetUint8() uint8
- func (this *GuUnPacket) Skip(len int64)
- type Tlv
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GuPacket ¶
type GuPacket struct {
// contains filtered or unexported fields
}
func NewGuPacket ¶
func NewGuPacket() (p *GuPacket)
func (*GuPacket) SetLitTlvS ¶
SetLitTlvS 一种Type只有8bit的tlv结构
type GuUnPackFun ¶
type GuUnPackFun func(pack *GuUnPacket)
type GuUnPacket ¶
type GuUnPacket struct {
// contains filtered or unexported fields
}
func NewGuUnPacket ¶
func NewGuUnPacket(bin []byte) (u *GuUnPacket)
func NewGuUnPacketFun ¶
func NewGuUnPacketFun(Buffer []byte, fun GuUnPackFun) *GuUnPacket
NewGuUnPacketFun 仿Mirai,这种还挺好用的
func (*GuUnPacket) GetAll ¶
func (r *GuUnPacket) GetAll() []byte
func (*GuUnPacket) GetAllHex ¶
func (r *GuUnPacket) GetAllHex() string
func (*GuUnPacket) GetAllHexTmp ¶
func (r *GuUnPacket) GetAllHexTmp() string
func (*GuUnPacket) GetBin ¶
func (r *GuUnPacket) GetBin(i int) []byte
func (*GuUnPacket) GetLen ¶
func (r *GuUnPacket) GetLen() int
func (*GuUnPacket) GetStr ¶
func (r *GuUnPacket) GetStr(i int32) string
func (*GuUnPacket) GetTlv ¶
func (r *GuUnPacket) GetTlv() (t *Tlv)
func (*GuUnPacket) GetToken ¶
func (r *GuUnPacket) GetToken() []byte
func (*GuUnPacket) GetUint16 ¶
func (r *GuUnPacket) GetUint16() uint16
func (*GuUnPacket) GetUint32 ¶
func (r *GuUnPacket) GetUint32() uint32
func (*GuUnPacket) GetUint8 ¶
func (r *GuUnPacket) GetUint8() uint8
func (*GuUnPacket) Skip ¶
func (this *GuUnPacket) Skip(len int64)
Click to show internal directories.
Click to hide internal directories.