You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1279 lines
30 KiB

// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: proto/p2p/conn_msgs.proto
package p2p
import (
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
keys "github.com/tendermint/tendermint/proto/crypto/keys"
io "io"
math "math"
math_bits "math/bits"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type PacketPing struct {
}
func (m *PacketPing) Reset() { *m = PacketPing{} }
func (m *PacketPing) String() string { return proto.CompactTextString(m) }
func (*PacketPing) ProtoMessage() {}
func (*PacketPing) Descriptor() ([]byte, []int) {
return fileDescriptor_8c680f0b24d73fe7, []int{0}
}
func (m *PacketPing) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *PacketPing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_PacketPing.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *PacketPing) XXX_Merge(src proto.Message) {
xxx_messageInfo_PacketPing.Merge(m, src)
}
func (m *PacketPing) XXX_Size() int {
return m.Size()
}
func (m *PacketPing) XXX_DiscardUnknown() {
xxx_messageInfo_PacketPing.DiscardUnknown(m)
}
var xxx_messageInfo_PacketPing proto.InternalMessageInfo
type PacketPong struct {
}
func (m *PacketPong) Reset() { *m = PacketPong{} }
func (m *PacketPong) String() string { return proto.CompactTextString(m) }
func (*PacketPong) ProtoMessage() {}
func (*PacketPong) Descriptor() ([]byte, []int) {
return fileDescriptor_8c680f0b24d73fe7, []int{1}
}
func (m *PacketPong) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *PacketPong) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_PacketPong.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *PacketPong) XXX_Merge(src proto.Message) {
xxx_messageInfo_PacketPong.Merge(m, src)
}
func (m *PacketPong) XXX_Size() int {
return m.Size()
}
func (m *PacketPong) XXX_DiscardUnknown() {
xxx_messageInfo_PacketPong.DiscardUnknown(m)
}
var xxx_messageInfo_PacketPong proto.InternalMessageInfo
type PacketMsg struct {
ChannelID int32 `protobuf:"varint,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
EOF int32 `protobuf:"varint,2,opt,name=eof,proto3" json:"eof,omitempty"`
Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
}
func (m *PacketMsg) Reset() { *m = PacketMsg{} }
func (m *PacketMsg) String() string { return proto.CompactTextString(m) }
func (*PacketMsg) ProtoMessage() {}
func (*PacketMsg) Descriptor() ([]byte, []int) {
return fileDescriptor_8c680f0b24d73fe7, []int{2}
}
func (m *PacketMsg) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *PacketMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_PacketMsg.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *PacketMsg) XXX_Merge(src proto.Message) {
xxx_messageInfo_PacketMsg.Merge(m, src)
}
func (m *PacketMsg) XXX_Size() int {
return m.Size()
}
func (m *PacketMsg) XXX_DiscardUnknown() {
xxx_messageInfo_PacketMsg.DiscardUnknown(m)
}
var xxx_messageInfo_PacketMsg proto.InternalMessageInfo
func (m *PacketMsg) GetChannelID() int32 {
if m != nil {
return m.ChannelID
}
return 0
}
func (m *PacketMsg) GetEOF() int32 {
if m != nil {
return m.EOF
}
return 0
}
func (m *PacketMsg) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
type Packet struct {
// Types that are valid to be assigned to Sum:
// *Packet_PacketPing
// *Packet_PacketPong
// *Packet_PacketMsg
Sum isPacket_Sum `protobuf_oneof:"sum"`
}
func (m *Packet) Reset() { *m = Packet{} }
func (m *Packet) String() string { return proto.CompactTextString(m) }
func (*Packet) ProtoMessage() {}
func (*Packet) Descriptor() ([]byte, []int) {
return fileDescriptor_8c680f0b24d73fe7, []int{3}
}
func (m *Packet) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Packet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Packet.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Packet) XXX_Merge(src proto.Message) {
xxx_messageInfo_Packet.Merge(m, src)
}
func (m *Packet) XXX_Size() int {
return m.Size()
}
func (m *Packet) XXX_DiscardUnknown() {
xxx_messageInfo_Packet.DiscardUnknown(m)
}
var xxx_messageInfo_Packet proto.InternalMessageInfo
type isPacket_Sum interface {
isPacket_Sum()
MarshalTo([]byte) (int, error)
Size() int
}
type Packet_PacketPing struct {
PacketPing *PacketPing `protobuf:"bytes,1,opt,name=packet_ping,json=packetPing,proto3,oneof" json:"packet_ping,omitempty"`
}
type Packet_PacketPong struct {
PacketPong *PacketPong `protobuf:"bytes,2,opt,name=packet_pong,json=packetPong,proto3,oneof" json:"packet_pong,omitempty"`
}
type Packet_PacketMsg struct {
PacketMsg *PacketMsg `protobuf:"bytes,3,opt,name=packet_msg,json=packetMsg,proto3,oneof" json:"packet_msg,omitempty"`
}
func (*Packet_PacketPing) isPacket_Sum() {}
func (*Packet_PacketPong) isPacket_Sum() {}
func (*Packet_PacketMsg) isPacket_Sum() {}
func (m *Packet) GetSum() isPacket_Sum {
if m != nil {
return m.Sum
}
return nil
}
func (m *Packet) GetPacketPing() *PacketPing {
if x, ok := m.GetSum().(*Packet_PacketPing); ok {
return x.PacketPing
}
return nil
}
func (m *Packet) GetPacketPong() *PacketPong {
if x, ok := m.GetSum().(*Packet_PacketPong); ok {
return x.PacketPong
}
return nil
}
func (m *Packet) GetPacketMsg() *PacketMsg {
if x, ok := m.GetSum().(*Packet_PacketMsg); ok {
return x.PacketMsg
}
return nil
}
// XXX_OneofWrappers is for the internal use of the proto package.
func (*Packet) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*Packet_PacketPing)(nil),
(*Packet_PacketPong)(nil),
(*Packet_PacketMsg)(nil),
}
}
type AuthSigMessage struct {
PubKey keys.PublicKey `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key"`
Sig []byte `protobuf:"bytes,2,opt,name=sig,proto3" json:"sig,omitempty"`
}
func (m *AuthSigMessage) Reset() { *m = AuthSigMessage{} }
func (m *AuthSigMessage) String() string { return proto.CompactTextString(m) }
func (*AuthSigMessage) ProtoMessage() {}
func (*AuthSigMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_8c680f0b24d73fe7, []int{4}
}
func (m *AuthSigMessage) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *AuthSigMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_AuthSigMessage.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *AuthSigMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_AuthSigMessage.Merge(m, src)
}
func (m *AuthSigMessage) XXX_Size() int {
return m.Size()
}
func (m *AuthSigMessage) XXX_DiscardUnknown() {
xxx_messageInfo_AuthSigMessage.DiscardUnknown(m)
}
var xxx_messageInfo_AuthSigMessage proto.InternalMessageInfo
func (m *AuthSigMessage) GetPubKey() keys.PublicKey {
if m != nil {
return m.PubKey
}
return keys.PublicKey{}
}
func (m *AuthSigMessage) GetSig() []byte {
if m != nil {
return m.Sig
}
return nil
}
func init() {
proto.RegisterType((*PacketPing)(nil), "tendermint.proto.p2p.PacketPing")
proto.RegisterType((*PacketPong)(nil), "tendermint.proto.p2p.PacketPong")
proto.RegisterType((*PacketMsg)(nil), "tendermint.proto.p2p.PacketMsg")
proto.RegisterType((*Packet)(nil), "tendermint.proto.p2p.Packet")
proto.RegisterType((*AuthSigMessage)(nil), "tendermint.proto.p2p.AuthSigMessage")
}
func init() { proto.RegisterFile("proto/p2p/conn_msgs.proto", fileDescriptor_8c680f0b24d73fe7) }
var fileDescriptor_8c680f0b24d73fe7 = []byte{
// 409 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xdf, 0x6a, 0xd4, 0x40,
0x14, 0xc6, 0x13, 0xd3, 0x6e, 0xd9, 0xb3, 0xab, 0xc8, 0xe0, 0xc5, 0xb6, 0x60, 0x76, 0xc9, 0x85,
0x16, 0x91, 0x04, 0xe2, 0x0b, 0x68, 0x5a, 0x8b, 0xa5, 0x2c, 0x2e, 0xf1, 0xce, 0x9b, 0x90, 0x3f,
0xe3, 0x64, 0xdc, 0x66, 0x66, 0xc8, 0x4c, 0x2e, 0xf2, 0x16, 0x3e, 0x56, 0x2f, 0x7b, 0x29, 0x08,
0x8b, 0x64, 0x5f, 0x44, 0x32, 0x13, 0x77, 0x57, 0x14, 0x7b, 0xf7, 0x7d, 0x1f, 0x27, 0xbf, 0x73,
0x4e, 0xce, 0xc0, 0xa9, 0xa8, 0xb9, 0xe2, 0x81, 0x08, 0x45, 0x90, 0x73, 0xc6, 0x92, 0x4a, 0x12,
0xe9, 0xeb, 0x0c, 0x3d, 0x53, 0x98, 0x15, 0xb8, 0xae, 0x28, 0x53, 0x26, 0xf1, 0x45, 0x28, 0xce,
0x5e, 0xa8, 0x92, 0xd6, 0x45, 0x22, 0xd2, 0x5a, 0xb5, 0x81, 0xf9, 0x98, 0x70, 0xc2, 0xf7, 0xca,
0xd4, 0x9e, 0x3d, 0x37, 0x49, 0x5e, 0xb7, 0x42, 0xf1, 0x60, 0x8d, 0x5b, 0x19, 0xa8, 0x56, 0xe0,
0x01, 0xee, 0x4d, 0x01, 0x56, 0x69, 0xbe, 0xc6, 0x6a, 0x45, 0x19, 0x39, 0x70, 0x9c, 0x11, 0xaf,
0x84, 0xb1, 0x71, 0x4b, 0x49, 0xd0, 0x6b, 0x80, 0xbc, 0x4c, 0x19, 0xc3, 0xb7, 0x09, 0x2d, 0x66,
0xf6, 0xc2, 0x3e, 0x3f, 0x8e, 0x1e, 0x77, 0x9b, 0xf9, 0xf8, 0xc2, 0xa4, 0xd7, 0x97, 0xf1, 0x78,
0x28, 0xb8, 0x2e, 0xd0, 0x29, 0x38, 0x98, 0x7f, 0x99, 0x3d, 0xd2, 0x65, 0x27, 0xdd, 0x66, 0xee,
0xbc, 0xff, 0x78, 0x15, 0xf7, 0x19, 0x42, 0x70, 0x54, 0xa4, 0x2a, 0x9d, 0x39, 0x0b, 0xfb, 0x7c,
0x1a, 0x6b, 0xed, 0xfd, 0xb0, 0x61, 0x64, 0x5a, 0xa1, 0x0b, 0x98, 0x08, 0xad, 0x12, 0x41, 0x19,
0xd1, 0x8d, 0x26, 0xe1, 0xc2, 0xff, 0xd7, 0x3f, 0xf0, 0xf7, 0x93, 0x7f, 0xb0, 0x62, 0x10, 0x3b,
0x77, 0x08, 0xe1, 0x8c, 0xe8, 0x31, 0x1e, 0x82, 0xf0, 0x3f, 0x20, 0x9c, 0x11, 0xf4, 0x16, 0x06,
0xd7, 0x1f, 0x43, 0x8f, 0x3b, 0x09, 0xe7, 0xff, 0x63, 0x2c, 0x65, 0x8f, 0x18, 0x8b, 0xdf, 0x26,
0x3a, 0x06, 0x47, 0x36, 0x95, 0xf7, 0x15, 0x9e, 0xbc, 0x6b, 0x54, 0xf9, 0x89, 0x92, 0x25, 0x96,
0x32, 0x25, 0x18, 0x5d, 0xc1, 0x89, 0x68, 0xb2, 0x64, 0x8d, 0xdb, 0x61, 0xc1, 0x97, 0x7f, 0x73,
0xcd, 0xc5, 0xfc, 0xfe, 0x62, 0xfe, 0xaa, 0xc9, 0x6e, 0x69, 0x7e, 0x83, 0xdb, 0xe8, 0xe8, 0x6e,
0x33, 0xb7, 0xe2, 0x91, 0x68, 0xb2, 0x1b, 0xdc, 0xa2, 0xa7, 0xe0, 0x48, 0x6a, 0xf6, 0x9b, 0xc6,
0xbd, 0x8c, 0x2e, 0xef, 0x3a, 0xd7, 0xbe, 0xef, 0x5c, 0xfb, 0x67, 0xe7, 0xda, 0xdf, 0xb6, 0xae,
0x75, 0xbf, 0x75, 0xad, 0xef, 0x5b, 0xd7, 0xfa, 0xfc, 0x8a, 0x50, 0x55, 0x36, 0x99, 0x9f, 0xf3,
0x2a, 0xd8, 0x37, 0x3b, 0x94, 0xbb, 0x27, 0x98, 0x8d, 0xb4, 0x7c, 0xf3, 0x2b, 0x00, 0x00, 0xff,
0xff, 0xd2, 0xaa, 0xb3, 0xc0, 0x96, 0x02, 0x00, 0x00,
}
func (m *PacketPing) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *PacketPing) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *PacketPing) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
return len(dAtA) - i, nil
}
func (m *PacketPong) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *PacketPong) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *PacketPong) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
return len(dAtA) - i, nil
}
func (m *PacketMsg) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *PacketMsg) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *PacketMsg) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Data) > 0 {
i -= len(m.Data)
copy(dAtA[i:], m.Data)
i = encodeVarintConnMsgs(dAtA, i, uint64(len(m.Data)))
i--
dAtA[i] = 0x1a
}
if m.EOF != 0 {
i = encodeVarintConnMsgs(dAtA, i, uint64(m.EOF))
i--
dAtA[i] = 0x10
}
if m.ChannelID != 0 {
i = encodeVarintConnMsgs(dAtA, i, uint64(m.ChannelID))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
}
func (m *Packet) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Packet) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Packet) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if m.Sum != nil {
{
size := m.Sum.Size()
i -= size
if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil {
return 0, err
}
}
}
return len(dAtA) - i, nil
}
func (m *Packet_PacketPing) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Packet_PacketPing) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
if m.PacketPing != nil {
{
size, err := m.PacketPing.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintConnMsgs(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *Packet_PacketPong) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Packet_PacketPong) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
if m.PacketPong != nil {
{
size, err := m.PacketPong.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintConnMsgs(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
return len(dAtA) - i, nil
}
func (m *Packet_PacketMsg) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Packet_PacketMsg) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
if m.PacketMsg != nil {
{
size, err := m.PacketMsg.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintConnMsgs(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
}
return len(dAtA) - i, nil
}
func (m *AuthSigMessage) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *AuthSigMessage) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *AuthSigMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Sig) > 0 {
i -= len(m.Sig)
copy(dAtA[i:], m.Sig)
i = encodeVarintConnMsgs(dAtA, i, uint64(len(m.Sig)))
i--
dAtA[i] = 0x12
}
{
size, err := m.PubKey.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintConnMsgs(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0xa
return len(dAtA) - i, nil
}
func encodeVarintConnMsgs(dAtA []byte, offset int, v uint64) int {
offset -= sovConnMsgs(v)
base := offset
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return base
}
func (m *PacketPing) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
return n
}
func (m *PacketPong) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
return n
}
func (m *PacketMsg) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.ChannelID != 0 {
n += 1 + sovConnMsgs(uint64(m.ChannelID))
}
if m.EOF != 0 {
n += 1 + sovConnMsgs(uint64(m.EOF))
}
l = len(m.Data)
if l > 0 {
n += 1 + l + sovConnMsgs(uint64(l))
}
return n
}
func (m *Packet) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Sum != nil {
n += m.Sum.Size()
}
return n
}
func (m *Packet_PacketPing) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.PacketPing != nil {
l = m.PacketPing.Size()
n += 1 + l + sovConnMsgs(uint64(l))
}
return n
}
func (m *Packet_PacketPong) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.PacketPong != nil {
l = m.PacketPong.Size()
n += 1 + l + sovConnMsgs(uint64(l))
}
return n
}
func (m *Packet_PacketMsg) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.PacketMsg != nil {
l = m.PacketMsg.Size()
n += 1 + l + sovConnMsgs(uint64(l))
}
return n
}
func (m *AuthSigMessage) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = m.PubKey.Size()
n += 1 + l + sovConnMsgs(uint64(l))
l = len(m.Sig)
if l > 0 {
n += 1 + l + sovConnMsgs(uint64(l))
}
return n
}
func sovConnMsgs(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozConnMsgs(x uint64) (n int) {
return sovConnMsgs(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *PacketPing) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConnMsgs
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: PacketPing: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: PacketPing: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default:
iNdEx = preIndex
skippy, err := skipConnMsgs(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthConnMsgs
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthConnMsgs
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *PacketPong) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConnMsgs
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: PacketPong: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: PacketPong: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default:
iNdEx = preIndex
skippy, err := skipConnMsgs(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthConnMsgs
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthConnMsgs
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *PacketMsg) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConnMsgs
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: PacketMsg: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: PacketMsg: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ChannelID", wireType)
}
m.ChannelID = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConnMsgs
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ChannelID |= int32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field EOF", wireType)
}
m.EOF = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConnMsgs
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.EOF |= int32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConnMsgs
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthConnMsgs
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthConnMsgs
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
if m.Data == nil {
m.Data = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipConnMsgs(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthConnMsgs
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthConnMsgs
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Packet) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConnMsgs
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Packet: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Packet: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PacketPing", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConnMsgs
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthConnMsgs
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthConnMsgs
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
v := &PacketPing{}
if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
m.Sum = &Packet_PacketPing{v}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PacketPong", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConnMsgs
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthConnMsgs
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthConnMsgs
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
v := &PacketPong{}
if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
m.Sum = &Packet_PacketPong{v}
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PacketMsg", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConnMsgs
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthConnMsgs
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthConnMsgs
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
v := &PacketMsg{}
if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
m.Sum = &Packet_PacketMsg{v}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipConnMsgs(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthConnMsgs
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthConnMsgs
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *AuthSigMessage) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConnMsgs
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: AuthSigMessage: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: AuthSigMessage: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PubKey", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConnMsgs
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthConnMsgs
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthConnMsgs
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.PubKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Sig", wireType)
}
var byteLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowConnMsgs
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if byteLen < 0 {
return ErrInvalidLengthConnMsgs
}
postIndex := iNdEx + byteLen
if postIndex < 0 {
return ErrInvalidLengthConnMsgs
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Sig = append(m.Sig[:0], dAtA[iNdEx:postIndex]...)
if m.Sig == nil {
m.Sig = []byte{}
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipConnMsgs(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthConnMsgs
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthConnMsgs
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipConnMsgs(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
depth := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowConnMsgs
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowConnMsgs
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
case 1:
iNdEx += 8
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowConnMsgs
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthConnMsgs
}
iNdEx += length
case 3:
depth++
case 4:
if depth == 0 {
return 0, ErrUnexpectedEndOfGroupConnMsgs
}
depth--
case 5:
iNdEx += 4
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
if iNdEx < 0 {
return 0, ErrInvalidLengthConnMsgs
}
if depth == 0 {
return iNdEx, nil
}
}
return 0, io.ErrUnexpectedEOF
}
var (
ErrInvalidLengthConnMsgs = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowConnMsgs = fmt.Errorf("proto: integer overflow")
ErrUnexpectedEndOfGroupConnMsgs = fmt.Errorf("proto: unexpected end of group")
)