ip64

package
v0.0.0-...-c1e9cd8 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HelloType uint16 = iota
	NodesType
	DataType
)

Variables

View Source
var (
	ErrInvalidLengthSeal        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowSeal          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupSeal = fmt.Errorf("proto: unexpected end of group")
)

Functions

This section is empty.

Types

type Ip64

type Ip64 struct {
	// 低4字节数据包类型,高4字节是目的端口号
	Destproto uint32 `protobuf:"varint,1,opt,name=destproto,proto3" json:"destproto,omitempty"`
	// ip on ws using ipv6 addr fc00::add2::9a17::2333::host::addr::subn::addr
	From uint64 `protobuf:"varint,2,opt,name=from,proto3" json:"from,omitempty"`
	To   uint64 `protobuf:"varint,3,opt,name=to,proto3" json:"to,omitempty"`
	// 低4字节ttl,高4字节源端口号
	Srcttl int32 `protobuf:"varint,4,opt,name=srcttl,proto3" json:"srcttl,omitempty"`
	// seal time unix nano
	Time                 int64    `protobuf:"varint,5,opt,name=time,proto3" json:"time,omitempty"`
	Data                 []byte   `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Ip64) Descriptor

func (*Ip64) Descriptor() ([]byte, []int)

func (*Ip64) GetData

func (m *Ip64) GetData() []byte

func (*Ip64) GetDestproto

func (m *Ip64) GetDestproto() uint32

func (*Ip64) GetFrom

func (m *Ip64) GetFrom() uint64

func (*Ip64) GetSrcttl

func (m *Ip64) GetSrcttl() int32

func (*Ip64) GetTime

func (m *Ip64) GetTime() int64

func (*Ip64) GetTo

func (m *Ip64) GetTo() uint64

func (*Ip64) Marshal

func (m *Ip64) Marshal() (dAtA []byte, err error)

func (*Ip64) MarshalTo

func (m *Ip64) MarshalTo(dAtA []byte) (int, error)

func (*Ip64) MarshalToSizedBuffer

func (m *Ip64) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Ip64) Pack

func (ip *Ip64) Pack(from uint64, to uint64, data *[]byte, proto uint16, srcport uint16, destport uint16)

func (*Ip64) ProtoMessage

func (*Ip64) ProtoMessage()

func (*Ip64) Reset

func (m *Ip64) Reset()

func (*Ip64) Send

func (ip *Ip64) Send(conn *websocket.Conn, mt int, nextHandler func(conn *websocket.Conn)) ([]byte, error)

Send 发送 ip 包,如处理函数为空则直接返回数据

func (*Ip64) Size

func (m *Ip64) Size() (n int)

func (*Ip64) String

func (m *Ip64) String() string

func (*Ip64) Unmarshal

func (m *Ip64) Unmarshal(dAtA []byte) error

func (*Ip64) XXX_DiscardUnknown

func (m *Ip64) XXX_DiscardUnknown()

func (*Ip64) XXX_Marshal

func (m *Ip64) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Ip64) XXX_Merge

func (m *Ip64) XXX_Merge(src proto.Message)

func (*Ip64) XXX_Size

func (m *Ip64) XXX_Size() int

func (*Ip64) XXX_Unmarshal

func (m *Ip64) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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