12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919 |
- // Code generated by protoc-gen-gogo. DO NOT EDIT.
- // source: nebula.proto
- package nebula
- import (
- fmt "fmt"
- proto "github.com/gogo/protobuf/proto"
- 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 NebulaMeta_MessageType int32
- const (
- NebulaMeta_None NebulaMeta_MessageType = 0
- NebulaMeta_HostQuery NebulaMeta_MessageType = 1
- NebulaMeta_HostQueryReply NebulaMeta_MessageType = 2
- NebulaMeta_HostUpdateNotification NebulaMeta_MessageType = 3
- NebulaMeta_HostMovedNotification NebulaMeta_MessageType = 4
- NebulaMeta_HostPunchNotification NebulaMeta_MessageType = 5
- NebulaMeta_HostWhoami NebulaMeta_MessageType = 6
- NebulaMeta_HostWhoamiReply NebulaMeta_MessageType = 7
- NebulaMeta_PathCheck NebulaMeta_MessageType = 8
- NebulaMeta_PathCheckReply NebulaMeta_MessageType = 9
- )
- var NebulaMeta_MessageType_name = map[int32]string{
- 0: "None",
- 1: "HostQuery",
- 2: "HostQueryReply",
- 3: "HostUpdateNotification",
- 4: "HostMovedNotification",
- 5: "HostPunchNotification",
- 6: "HostWhoami",
- 7: "HostWhoamiReply",
- 8: "PathCheck",
- 9: "PathCheckReply",
- }
- var NebulaMeta_MessageType_value = map[string]int32{
- "None": 0,
- "HostQuery": 1,
- "HostQueryReply": 2,
- "HostUpdateNotification": 3,
- "HostMovedNotification": 4,
- "HostPunchNotification": 5,
- "HostWhoami": 6,
- "HostWhoamiReply": 7,
- "PathCheck": 8,
- "PathCheckReply": 9,
- }
- func (x NebulaMeta_MessageType) String() string {
- return proto.EnumName(NebulaMeta_MessageType_name, int32(x))
- }
- func (NebulaMeta_MessageType) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_2d65afa7693df5ef, []int{0, 0}
- }
- type NebulaPing_MessageType int32
- const (
- NebulaPing_Ping NebulaPing_MessageType = 0
- NebulaPing_Reply NebulaPing_MessageType = 1
- )
- var NebulaPing_MessageType_name = map[int32]string{
- 0: "Ping",
- 1: "Reply",
- }
- var NebulaPing_MessageType_value = map[string]int32{
- "Ping": 0,
- "Reply": 1,
- }
- func (x NebulaPing_MessageType) String() string {
- return proto.EnumName(NebulaPing_MessageType_name, int32(x))
- }
- func (NebulaPing_MessageType) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_2d65afa7693df5ef, []int{4, 0}
- }
- type NebulaMeta struct {
- Type NebulaMeta_MessageType `protobuf:"varint,1,opt,name=Type,proto3,enum=nebula.NebulaMeta_MessageType" json:"Type,omitempty"`
- Details *NebulaMetaDetails `protobuf:"bytes,2,opt,name=Details,proto3" json:"Details,omitempty"`
- }
- func (m *NebulaMeta) Reset() { *m = NebulaMeta{} }
- func (m *NebulaMeta) String() string { return proto.CompactTextString(m) }
- func (*NebulaMeta) ProtoMessage() {}
- func (*NebulaMeta) Descriptor() ([]byte, []int) {
- return fileDescriptor_2d65afa7693df5ef, []int{0}
- }
- func (m *NebulaMeta) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
- }
- func (m *NebulaMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- if deterministic {
- return xxx_messageInfo_NebulaMeta.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 *NebulaMeta) XXX_Merge(src proto.Message) {
- xxx_messageInfo_NebulaMeta.Merge(m, src)
- }
- func (m *NebulaMeta) XXX_Size() int {
- return m.Size()
- }
- func (m *NebulaMeta) XXX_DiscardUnknown() {
- xxx_messageInfo_NebulaMeta.DiscardUnknown(m)
- }
- var xxx_messageInfo_NebulaMeta proto.InternalMessageInfo
- func (m *NebulaMeta) GetType() NebulaMeta_MessageType {
- if m != nil {
- return m.Type
- }
- return NebulaMeta_None
- }
- func (m *NebulaMeta) GetDetails() *NebulaMetaDetails {
- if m != nil {
- return m.Details
- }
- return nil
- }
- type NebulaMetaDetails struct {
- VpnIp uint32 `protobuf:"varint,1,opt,name=VpnIp,proto3" json:"VpnIp,omitempty"`
- Ip4AndPorts []*Ip4AndPort `protobuf:"bytes,2,rep,name=Ip4AndPorts,proto3" json:"Ip4AndPorts,omitempty"`
- Ip6AndPorts []*Ip6AndPort `protobuf:"bytes,4,rep,name=Ip6AndPorts,proto3" json:"Ip6AndPorts,omitempty"`
- Counter uint32 `protobuf:"varint,3,opt,name=counter,proto3" json:"counter,omitempty"`
- }
- func (m *NebulaMetaDetails) Reset() { *m = NebulaMetaDetails{} }
- func (m *NebulaMetaDetails) String() string { return proto.CompactTextString(m) }
- func (*NebulaMetaDetails) ProtoMessage() {}
- func (*NebulaMetaDetails) Descriptor() ([]byte, []int) {
- return fileDescriptor_2d65afa7693df5ef, []int{1}
- }
- func (m *NebulaMetaDetails) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
- }
- func (m *NebulaMetaDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- if deterministic {
- return xxx_messageInfo_NebulaMetaDetails.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 *NebulaMetaDetails) XXX_Merge(src proto.Message) {
- xxx_messageInfo_NebulaMetaDetails.Merge(m, src)
- }
- func (m *NebulaMetaDetails) XXX_Size() int {
- return m.Size()
- }
- func (m *NebulaMetaDetails) XXX_DiscardUnknown() {
- xxx_messageInfo_NebulaMetaDetails.DiscardUnknown(m)
- }
- var xxx_messageInfo_NebulaMetaDetails proto.InternalMessageInfo
- func (m *NebulaMetaDetails) GetVpnIp() uint32 {
- if m != nil {
- return m.VpnIp
- }
- return 0
- }
- func (m *NebulaMetaDetails) GetIp4AndPorts() []*Ip4AndPort {
- if m != nil {
- return m.Ip4AndPorts
- }
- return nil
- }
- func (m *NebulaMetaDetails) GetIp6AndPorts() []*Ip6AndPort {
- if m != nil {
- return m.Ip6AndPorts
- }
- return nil
- }
- func (m *NebulaMetaDetails) GetCounter() uint32 {
- if m != nil {
- return m.Counter
- }
- return 0
- }
- type Ip4AndPort struct {
- Ip uint32 `protobuf:"varint,1,opt,name=Ip,proto3" json:"Ip,omitempty"`
- Port uint32 `protobuf:"varint,2,opt,name=Port,proto3" json:"Port,omitempty"`
- }
- func (m *Ip4AndPort) Reset() { *m = Ip4AndPort{} }
- func (m *Ip4AndPort) String() string { return proto.CompactTextString(m) }
- func (*Ip4AndPort) ProtoMessage() {}
- func (*Ip4AndPort) Descriptor() ([]byte, []int) {
- return fileDescriptor_2d65afa7693df5ef, []int{2}
- }
- func (m *Ip4AndPort) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
- }
- func (m *Ip4AndPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- if deterministic {
- return xxx_messageInfo_Ip4AndPort.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 *Ip4AndPort) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Ip4AndPort.Merge(m, src)
- }
- func (m *Ip4AndPort) XXX_Size() int {
- return m.Size()
- }
- func (m *Ip4AndPort) XXX_DiscardUnknown() {
- xxx_messageInfo_Ip4AndPort.DiscardUnknown(m)
- }
- var xxx_messageInfo_Ip4AndPort proto.InternalMessageInfo
- func (m *Ip4AndPort) GetIp() uint32 {
- if m != nil {
- return m.Ip
- }
- return 0
- }
- func (m *Ip4AndPort) GetPort() uint32 {
- if m != nil {
- return m.Port
- }
- return 0
- }
- type Ip6AndPort struct {
- Hi uint64 `protobuf:"varint,1,opt,name=Hi,proto3" json:"Hi,omitempty"`
- Lo uint64 `protobuf:"varint,2,opt,name=Lo,proto3" json:"Lo,omitempty"`
- Port uint32 `protobuf:"varint,3,opt,name=Port,proto3" json:"Port,omitempty"`
- }
- func (m *Ip6AndPort) Reset() { *m = Ip6AndPort{} }
- func (m *Ip6AndPort) String() string { return proto.CompactTextString(m) }
- func (*Ip6AndPort) ProtoMessage() {}
- func (*Ip6AndPort) Descriptor() ([]byte, []int) {
- return fileDescriptor_2d65afa7693df5ef, []int{3}
- }
- func (m *Ip6AndPort) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
- }
- func (m *Ip6AndPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- if deterministic {
- return xxx_messageInfo_Ip6AndPort.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 *Ip6AndPort) XXX_Merge(src proto.Message) {
- xxx_messageInfo_Ip6AndPort.Merge(m, src)
- }
- func (m *Ip6AndPort) XXX_Size() int {
- return m.Size()
- }
- func (m *Ip6AndPort) XXX_DiscardUnknown() {
- xxx_messageInfo_Ip6AndPort.DiscardUnknown(m)
- }
- var xxx_messageInfo_Ip6AndPort proto.InternalMessageInfo
- func (m *Ip6AndPort) GetHi() uint64 {
- if m != nil {
- return m.Hi
- }
- return 0
- }
- func (m *Ip6AndPort) GetLo() uint64 {
- if m != nil {
- return m.Lo
- }
- return 0
- }
- func (m *Ip6AndPort) GetPort() uint32 {
- if m != nil {
- return m.Port
- }
- return 0
- }
- type NebulaPing struct {
- Type NebulaPing_MessageType `protobuf:"varint,1,opt,name=Type,proto3,enum=nebula.NebulaPing_MessageType" json:"Type,omitempty"`
- Time uint64 `protobuf:"varint,2,opt,name=Time,proto3" json:"Time,omitempty"`
- }
- func (m *NebulaPing) Reset() { *m = NebulaPing{} }
- func (m *NebulaPing) String() string { return proto.CompactTextString(m) }
- func (*NebulaPing) ProtoMessage() {}
- func (*NebulaPing) Descriptor() ([]byte, []int) {
- return fileDescriptor_2d65afa7693df5ef, []int{4}
- }
- func (m *NebulaPing) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
- }
- func (m *NebulaPing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- if deterministic {
- return xxx_messageInfo_NebulaPing.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 *NebulaPing) XXX_Merge(src proto.Message) {
- xxx_messageInfo_NebulaPing.Merge(m, src)
- }
- func (m *NebulaPing) XXX_Size() int {
- return m.Size()
- }
- func (m *NebulaPing) XXX_DiscardUnknown() {
- xxx_messageInfo_NebulaPing.DiscardUnknown(m)
- }
- var xxx_messageInfo_NebulaPing proto.InternalMessageInfo
- func (m *NebulaPing) GetType() NebulaPing_MessageType {
- if m != nil {
- return m.Type
- }
- return NebulaPing_Ping
- }
- func (m *NebulaPing) GetTime() uint64 {
- if m != nil {
- return m.Time
- }
- return 0
- }
- type NebulaHandshake struct {
- Details *NebulaHandshakeDetails `protobuf:"bytes,1,opt,name=Details,proto3" json:"Details,omitempty"`
- Hmac []byte `protobuf:"bytes,2,opt,name=Hmac,proto3" json:"Hmac,omitempty"`
- }
- func (m *NebulaHandshake) Reset() { *m = NebulaHandshake{} }
- func (m *NebulaHandshake) String() string { return proto.CompactTextString(m) }
- func (*NebulaHandshake) ProtoMessage() {}
- func (*NebulaHandshake) Descriptor() ([]byte, []int) {
- return fileDescriptor_2d65afa7693df5ef, []int{5}
- }
- func (m *NebulaHandshake) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
- }
- func (m *NebulaHandshake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- if deterministic {
- return xxx_messageInfo_NebulaHandshake.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 *NebulaHandshake) XXX_Merge(src proto.Message) {
- xxx_messageInfo_NebulaHandshake.Merge(m, src)
- }
- func (m *NebulaHandshake) XXX_Size() int {
- return m.Size()
- }
- func (m *NebulaHandshake) XXX_DiscardUnknown() {
- xxx_messageInfo_NebulaHandshake.DiscardUnknown(m)
- }
- var xxx_messageInfo_NebulaHandshake proto.InternalMessageInfo
- func (m *NebulaHandshake) GetDetails() *NebulaHandshakeDetails {
- if m != nil {
- return m.Details
- }
- return nil
- }
- func (m *NebulaHandshake) GetHmac() []byte {
- if m != nil {
- return m.Hmac
- }
- return nil
- }
- type NebulaHandshakeDetails struct {
- Cert []byte `protobuf:"bytes,1,opt,name=Cert,proto3" json:"Cert,omitempty"`
- InitiatorIndex uint32 `protobuf:"varint,2,opt,name=InitiatorIndex,proto3" json:"InitiatorIndex,omitempty"`
- ResponderIndex uint32 `protobuf:"varint,3,opt,name=ResponderIndex,proto3" json:"ResponderIndex,omitempty"`
- Cookie uint64 `protobuf:"varint,4,opt,name=Cookie,proto3" json:"Cookie,omitempty"`
- Time uint64 `protobuf:"varint,5,opt,name=Time,proto3" json:"Time,omitempty"`
- }
- func (m *NebulaHandshakeDetails) Reset() { *m = NebulaHandshakeDetails{} }
- func (m *NebulaHandshakeDetails) String() string { return proto.CompactTextString(m) }
- func (*NebulaHandshakeDetails) ProtoMessage() {}
- func (*NebulaHandshakeDetails) Descriptor() ([]byte, []int) {
- return fileDescriptor_2d65afa7693df5ef, []int{6}
- }
- func (m *NebulaHandshakeDetails) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
- }
- func (m *NebulaHandshakeDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- if deterministic {
- return xxx_messageInfo_NebulaHandshakeDetails.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 *NebulaHandshakeDetails) XXX_Merge(src proto.Message) {
- xxx_messageInfo_NebulaHandshakeDetails.Merge(m, src)
- }
- func (m *NebulaHandshakeDetails) XXX_Size() int {
- return m.Size()
- }
- func (m *NebulaHandshakeDetails) XXX_DiscardUnknown() {
- xxx_messageInfo_NebulaHandshakeDetails.DiscardUnknown(m)
- }
- var xxx_messageInfo_NebulaHandshakeDetails proto.InternalMessageInfo
- func (m *NebulaHandshakeDetails) GetCert() []byte {
- if m != nil {
- return m.Cert
- }
- return nil
- }
- func (m *NebulaHandshakeDetails) GetInitiatorIndex() uint32 {
- if m != nil {
- return m.InitiatorIndex
- }
- return 0
- }
- func (m *NebulaHandshakeDetails) GetResponderIndex() uint32 {
- if m != nil {
- return m.ResponderIndex
- }
- return 0
- }
- func (m *NebulaHandshakeDetails) GetCookie() uint64 {
- if m != nil {
- return m.Cookie
- }
- return 0
- }
- func (m *NebulaHandshakeDetails) GetTime() uint64 {
- if m != nil {
- return m.Time
- }
- return 0
- }
- func init() {
- proto.RegisterEnum("nebula.NebulaMeta_MessageType", NebulaMeta_MessageType_name, NebulaMeta_MessageType_value)
- proto.RegisterEnum("nebula.NebulaPing_MessageType", NebulaPing_MessageType_name, NebulaPing_MessageType_value)
- proto.RegisterType((*NebulaMeta)(nil), "nebula.NebulaMeta")
- proto.RegisterType((*NebulaMetaDetails)(nil), "nebula.NebulaMetaDetails")
- proto.RegisterType((*Ip4AndPort)(nil), "nebula.Ip4AndPort")
- proto.RegisterType((*Ip6AndPort)(nil), "nebula.Ip6AndPort")
- proto.RegisterType((*NebulaPing)(nil), "nebula.NebulaPing")
- proto.RegisterType((*NebulaHandshake)(nil), "nebula.NebulaHandshake")
- proto.RegisterType((*NebulaHandshakeDetails)(nil), "nebula.NebulaHandshakeDetails")
- }
- func init() { proto.RegisterFile("nebula.proto", fileDescriptor_2d65afa7693df5ef) }
- var fileDescriptor_2d65afa7693df5ef = []byte{
- // 570 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x54, 0x41, 0x6f, 0xda, 0x4c,
- 0x10, 0x65, 0x8d, 0x21, 0xc9, 0x90, 0x10, 0x7f, 0xfb, 0xb5, 0x08, 0x7a, 0xb0, 0x22, 0x1f, 0x2a,
- 0x4e, 0xa4, 0x82, 0x08, 0xf5, 0xd8, 0x96, 0x1e, 0x40, 0x0a, 0x88, 0x5a, 0x69, 0x2b, 0xf5, 0x52,
- 0x2d, 0xf6, 0x16, 0xaf, 0x80, 0x5d, 0xd7, 0x5e, 0xaa, 0xf0, 0x2f, 0xfa, 0x33, 0x7a, 0xeb, 0xdf,
- 0xe8, 0xa1, 0x87, 0x1c, 0x7a, 0xe8, 0xb1, 0x82, 0x3f, 0x52, 0xed, 0xda, 0xd8, 0x04, 0xa2, 0xde,
- 0xe6, 0xcd, 0xbc, 0x37, 0x3b, 0x3c, 0x3f, 0x01, 0xa7, 0x9c, 0x4e, 0x96, 0x73, 0xd2, 0x0a, 0x23,
- 0x21, 0x05, 0x2e, 0x27, 0xc8, 0xf9, 0x69, 0x00, 0x8c, 0x74, 0x39, 0xa4, 0x92, 0xe0, 0x36, 0x98,
- 0x37, 0xab, 0x90, 0xd6, 0xd1, 0x05, 0x6a, 0x56, 0xdb, 0x76, 0x2b, 0xd5, 0xe4, 0x8c, 0xd6, 0x90,
- 0xc6, 0x31, 0x99, 0x52, 0xc5, 0x72, 0x35, 0x17, 0x77, 0xe0, 0xe8, 0x35, 0x95, 0x84, 0xcd, 0xe3,
- 0xba, 0x71, 0x81, 0x9a, 0x95, 0x76, 0xe3, 0x50, 0x96, 0x12, 0xdc, 0x2d, 0xd3, 0xf9, 0x85, 0xa0,
- 0xb2, 0xb3, 0x0a, 0x1f, 0x83, 0x39, 0x12, 0x9c, 0x5a, 0x05, 0x7c, 0x06, 0x27, 0x7d, 0x11, 0xcb,
- 0x37, 0x4b, 0x1a, 0xad, 0x2c, 0x84, 0x31, 0x54, 0x33, 0xe8, 0xd2, 0x70, 0xbe, 0xb2, 0x0c, 0xfc,
- 0x04, 0x6a, 0xaa, 0xf7, 0x36, 0xf4, 0x89, 0xa4, 0x23, 0x21, 0xd9, 0x27, 0xe6, 0x11, 0xc9, 0x04,
- 0xb7, 0x8a, 0xb8, 0x01, 0x8f, 0xd5, 0x6c, 0x28, 0xbe, 0x50, 0xff, 0xde, 0xc8, 0xdc, 0x8e, 0xc6,
- 0x4b, 0xee, 0x05, 0xf7, 0x46, 0x25, 0x5c, 0x05, 0x50, 0xa3, 0xf7, 0x81, 0x20, 0x0b, 0x66, 0x95,
- 0xf1, 0xff, 0x70, 0x9e, 0xe3, 0xe4, 0xd9, 0x23, 0x75, 0xd9, 0x98, 0xc8, 0xa0, 0x17, 0x50, 0x6f,
- 0x66, 0x1d, 0xab, 0xcb, 0x32, 0x98, 0x50, 0x4e, 0x9c, 0xef, 0x08, 0xfe, 0x3b, 0xf8, 0xd5, 0xf8,
- 0x11, 0x94, 0xde, 0x85, 0x7c, 0x10, 0x6a, 0x5b, 0xcf, 0xdc, 0x04, 0xe0, 0x2b, 0xa8, 0x0c, 0xc2,
- 0xab, 0x97, 0xdc, 0x1f, 0x8b, 0x48, 0x2a, 0xef, 0x8a, 0xcd, 0x4a, 0x1b, 0x6f, 0xbd, 0xcb, 0x47,
- 0xee, 0x2e, 0x2d, 0x51, 0x75, 0x33, 0x95, 0xb9, 0xaf, 0xea, 0xee, 0xa8, 0x32, 0x1a, 0xae, 0xc3,
- 0x91, 0x27, 0x96, 0x5c, 0xd2, 0xa8, 0x5e, 0xd4, 0x37, 0x6c, 0xa1, 0xf3, 0x0c, 0x20, 0x5f, 0x8f,
- 0xab, 0x60, 0x64, 0x67, 0x1a, 0x83, 0x10, 0x63, 0x30, 0x55, 0x5f, 0x7f, 0xd8, 0x33, 0x57, 0xd7,
- 0xce, 0x0b, 0xa5, 0xe8, 0xee, 0x28, 0xfa, 0x4c, 0x2b, 0x4c, 0xd7, 0xe8, 0x33, 0x85, 0xaf, 0x85,
- 0xe6, 0x9b, 0xae, 0x71, 0x2d, 0xb2, 0x0d, 0xc5, 0x9d, 0x0d, 0xb7, 0xdb, 0xcc, 0x8d, 0x19, 0x9f,
- 0xfe, 0x3b, 0x73, 0x8a, 0xf1, 0x40, 0xe6, 0x30, 0x98, 0x37, 0x6c, 0x41, 0xd3, 0x77, 0x74, 0xed,
- 0x38, 0x07, 0x89, 0x52, 0x62, 0xab, 0x80, 0x4f, 0xa0, 0x94, 0x7c, 0x1f, 0xe4, 0x7c, 0x84, 0xf3,
- 0x64, 0x6f, 0x9f, 0x70, 0x3f, 0x0e, 0xc8, 0x8c, 0xe2, 0xe7, 0x79, 0x7c, 0x91, 0x8e, 0xef, 0xde,
- 0x05, 0x19, 0x73, 0x3f, 0xc3, 0xea, 0x88, 0xfe, 0x82, 0x78, 0xfa, 0x88, 0x53, 0x57, 0xd7, 0xce,
- 0x37, 0x04, 0xb5, 0x87, 0x75, 0x8a, 0xde, 0xa3, 0x91, 0xd4, 0xaf, 0x9c, 0xba, 0xba, 0xc6, 0x4f,
- 0xa1, 0x3a, 0xe0, 0x4c, 0x32, 0x22, 0x45, 0x34, 0xe0, 0x3e, 0xbd, 0x4d, 0x9d, 0xde, 0xeb, 0x2a,
- 0x9e, 0x4b, 0xe3, 0x50, 0x70, 0x9f, 0xa6, 0xbc, 0xc4, 0xcf, 0xbd, 0x2e, 0xae, 0x41, 0xb9, 0x27,
- 0xc4, 0x8c, 0xd1, 0xba, 0xa9, 0x9d, 0x49, 0x51, 0xe6, 0x57, 0x29, 0xf7, 0xeb, 0x55, 0xe7, 0xc7,
- 0xda, 0x46, 0x77, 0x6b, 0x1b, 0xfd, 0x59, 0xdb, 0xe8, 0xeb, 0xc6, 0x2e, 0xdc, 0x6d, 0xec, 0xc2,
- 0xef, 0x8d, 0x5d, 0xf8, 0xd0, 0x98, 0x32, 0x19, 0x2c, 0x27, 0x2d, 0x4f, 0x2c, 0x2e, 0xe3, 0x39,
- 0xf1, 0x66, 0xc1, 0xe7, 0xcb, 0xc4, 0x93, 0x49, 0x59, 0xff, 0x7d, 0x74, 0xfe, 0x06, 0x00, 0x00,
- 0xff, 0xff, 0x20, 0x00, 0x2b, 0x46, 0x4e, 0x04, 0x00, 0x00,
- }
- func (m *NebulaMeta) 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 *NebulaMeta) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
- }
- func (m *NebulaMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.Details != nil {
- {
- size, err := m.Details.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintNebula(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- }
- if m.Type != 0 {
- i = encodeVarintNebula(dAtA, i, uint64(m.Type))
- i--
- dAtA[i] = 0x8
- }
- return len(dAtA) - i, nil
- }
- func (m *NebulaMetaDetails) 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 *NebulaMetaDetails) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
- }
- func (m *NebulaMetaDetails) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if len(m.Ip6AndPorts) > 0 {
- for iNdEx := len(m.Ip6AndPorts) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Ip6AndPorts[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintNebula(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x22
- }
- }
- if m.Counter != 0 {
- i = encodeVarintNebula(dAtA, i, uint64(m.Counter))
- i--
- dAtA[i] = 0x18
- }
- if len(m.Ip4AndPorts) > 0 {
- for iNdEx := len(m.Ip4AndPorts) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Ip4AndPorts[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintNebula(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- }
- }
- if m.VpnIp != 0 {
- i = encodeVarintNebula(dAtA, i, uint64(m.VpnIp))
- i--
- dAtA[i] = 0x8
- }
- return len(dAtA) - i, nil
- }
- func (m *Ip4AndPort) 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 *Ip4AndPort) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
- }
- func (m *Ip4AndPort) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.Port != 0 {
- i = encodeVarintNebula(dAtA, i, uint64(m.Port))
- i--
- dAtA[i] = 0x10
- }
- if m.Ip != 0 {
- i = encodeVarintNebula(dAtA, i, uint64(m.Ip))
- i--
- dAtA[i] = 0x8
- }
- return len(dAtA) - i, nil
- }
- func (m *Ip6AndPort) 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 *Ip6AndPort) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
- }
- func (m *Ip6AndPort) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.Port != 0 {
- i = encodeVarintNebula(dAtA, i, uint64(m.Port))
- i--
- dAtA[i] = 0x18
- }
- if m.Lo != 0 {
- i = encodeVarintNebula(dAtA, i, uint64(m.Lo))
- i--
- dAtA[i] = 0x10
- }
- if m.Hi != 0 {
- i = encodeVarintNebula(dAtA, i, uint64(m.Hi))
- i--
- dAtA[i] = 0x8
- }
- return len(dAtA) - i, nil
- }
- func (m *NebulaPing) 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 *NebulaPing) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
- }
- func (m *NebulaPing) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.Time != 0 {
- i = encodeVarintNebula(dAtA, i, uint64(m.Time))
- i--
- dAtA[i] = 0x10
- }
- if m.Type != 0 {
- i = encodeVarintNebula(dAtA, i, uint64(m.Type))
- i--
- dAtA[i] = 0x8
- }
- return len(dAtA) - i, nil
- }
- func (m *NebulaHandshake) 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 *NebulaHandshake) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
- }
- func (m *NebulaHandshake) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if len(m.Hmac) > 0 {
- i -= len(m.Hmac)
- copy(dAtA[i:], m.Hmac)
- i = encodeVarintNebula(dAtA, i, uint64(len(m.Hmac)))
- i--
- dAtA[i] = 0x12
- }
- if m.Details != nil {
- {
- size, err := m.Details.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintNebula(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- }
- return len(dAtA) - i, nil
- }
- func (m *NebulaHandshakeDetails) 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 *NebulaHandshakeDetails) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
- }
- func (m *NebulaHandshakeDetails) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.Time != 0 {
- i = encodeVarintNebula(dAtA, i, uint64(m.Time))
- i--
- dAtA[i] = 0x28
- }
- if m.Cookie != 0 {
- i = encodeVarintNebula(dAtA, i, uint64(m.Cookie))
- i--
- dAtA[i] = 0x20
- }
- if m.ResponderIndex != 0 {
- i = encodeVarintNebula(dAtA, i, uint64(m.ResponderIndex))
- i--
- dAtA[i] = 0x18
- }
- if m.InitiatorIndex != 0 {
- i = encodeVarintNebula(dAtA, i, uint64(m.InitiatorIndex))
- i--
- dAtA[i] = 0x10
- }
- if len(m.Cert) > 0 {
- i -= len(m.Cert)
- copy(dAtA[i:], m.Cert)
- i = encodeVarintNebula(dAtA, i, uint64(len(m.Cert)))
- i--
- dAtA[i] = 0xa
- }
- return len(dAtA) - i, nil
- }
- func encodeVarintNebula(dAtA []byte, offset int, v uint64) int {
- offset -= sovNebula(v)
- base := offset
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return base
- }
- func (m *NebulaMeta) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if m.Type != 0 {
- n += 1 + sovNebula(uint64(m.Type))
- }
- if m.Details != nil {
- l = m.Details.Size()
- n += 1 + l + sovNebula(uint64(l))
- }
- return n
- }
- func (m *NebulaMetaDetails) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if m.VpnIp != 0 {
- n += 1 + sovNebula(uint64(m.VpnIp))
- }
- if len(m.Ip4AndPorts) > 0 {
- for _, e := range m.Ip4AndPorts {
- l = e.Size()
- n += 1 + l + sovNebula(uint64(l))
- }
- }
- if m.Counter != 0 {
- n += 1 + sovNebula(uint64(m.Counter))
- }
- if len(m.Ip6AndPorts) > 0 {
- for _, e := range m.Ip6AndPorts {
- l = e.Size()
- n += 1 + l + sovNebula(uint64(l))
- }
- }
- return n
- }
- func (m *Ip4AndPort) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if m.Ip != 0 {
- n += 1 + sovNebula(uint64(m.Ip))
- }
- if m.Port != 0 {
- n += 1 + sovNebula(uint64(m.Port))
- }
- return n
- }
- func (m *Ip6AndPort) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if m.Hi != 0 {
- n += 1 + sovNebula(uint64(m.Hi))
- }
- if m.Lo != 0 {
- n += 1 + sovNebula(uint64(m.Lo))
- }
- if m.Port != 0 {
- n += 1 + sovNebula(uint64(m.Port))
- }
- return n
- }
- func (m *NebulaPing) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if m.Type != 0 {
- n += 1 + sovNebula(uint64(m.Type))
- }
- if m.Time != 0 {
- n += 1 + sovNebula(uint64(m.Time))
- }
- return n
- }
- func (m *NebulaHandshake) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if m.Details != nil {
- l = m.Details.Size()
- n += 1 + l + sovNebula(uint64(l))
- }
- l = len(m.Hmac)
- if l > 0 {
- n += 1 + l + sovNebula(uint64(l))
- }
- return n
- }
- func (m *NebulaHandshakeDetails) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.Cert)
- if l > 0 {
- n += 1 + l + sovNebula(uint64(l))
- }
- if m.InitiatorIndex != 0 {
- n += 1 + sovNebula(uint64(m.InitiatorIndex))
- }
- if m.ResponderIndex != 0 {
- n += 1 + sovNebula(uint64(m.ResponderIndex))
- }
- if m.Cookie != 0 {
- n += 1 + sovNebula(uint64(m.Cookie))
- }
- if m.Time != 0 {
- n += 1 + sovNebula(uint64(m.Time))
- }
- return n
- }
- func sovNebula(x uint64) (n int) {
- return (math_bits.Len64(x|1) + 6) / 7
- }
- func sozNebula(x uint64) (n int) {
- return sovNebula(uint64((x << 1) ^ uint64((int64(x) >> 63))))
- }
- func (m *NebulaMeta) 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 ErrIntOverflowNebula
- }
- 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: NebulaMeta: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: NebulaMeta: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- m.Type = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNebula
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Type |= NebulaMeta_MessageType(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNebula
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthNebula
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthNebula
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Details == nil {
- m.Details = &NebulaMetaDetails{}
- }
- if err := m.Details.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipNebula(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthNebula
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *NebulaMetaDetails) 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 ErrIntOverflowNebula
- }
- 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: NebulaMetaDetails: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: NebulaMetaDetails: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field VpnIp", wireType)
- }
- m.VpnIp = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNebula
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.VpnIp |= uint32(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Ip4AndPorts", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNebula
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthNebula
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthNebula
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Ip4AndPorts = append(m.Ip4AndPorts, &Ip4AndPort{})
- if err := m.Ip4AndPorts[len(m.Ip4AndPorts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Counter", wireType)
- }
- m.Counter = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNebula
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Counter |= uint32(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Ip6AndPorts", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNebula
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthNebula
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthNebula
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Ip6AndPorts = append(m.Ip6AndPorts, &Ip6AndPort{})
- if err := m.Ip6AndPorts[len(m.Ip6AndPorts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipNebula(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthNebula
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *Ip4AndPort) 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 ErrIntOverflowNebula
- }
- 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: Ip4AndPort: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Ip4AndPort: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Ip", wireType)
- }
- m.Ip = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNebula
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Ip |= uint32(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
- }
- m.Port = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNebula
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Port |= uint32(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipNebula(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthNebula
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *Ip6AndPort) 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 ErrIntOverflowNebula
- }
- 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: Ip6AndPort: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: Ip6AndPort: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Hi", wireType)
- }
- m.Hi = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNebula
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Hi |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Lo", wireType)
- }
- m.Lo = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNebula
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Lo |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
- }
- m.Port = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNebula
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Port |= uint32(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipNebula(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthNebula
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *NebulaPing) 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 ErrIntOverflowNebula
- }
- 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: NebulaPing: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: NebulaPing: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- m.Type = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNebula
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Type |= NebulaPing_MessageType(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
- }
- m.Time = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNebula
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Time |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipNebula(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthNebula
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *NebulaHandshake) 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 ErrIntOverflowNebula
- }
- 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: NebulaHandshake: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: NebulaHandshake: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNebula
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthNebula
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthNebula
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Details == nil {
- m.Details = &NebulaHandshakeDetails{}
- }
- if err := m.Details.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Hmac", wireType)
- }
- var byteLen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNebula
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- byteLen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if byteLen < 0 {
- return ErrInvalidLengthNebula
- }
- postIndex := iNdEx + byteLen
- if postIndex < 0 {
- return ErrInvalidLengthNebula
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Hmac = append(m.Hmac[:0], dAtA[iNdEx:postIndex]...)
- if m.Hmac == nil {
- m.Hmac = []byte{}
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipNebula(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthNebula
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *NebulaHandshakeDetails) 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 ErrIntOverflowNebula
- }
- 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: NebulaHandshakeDetails: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: NebulaHandshakeDetails: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Cert", wireType)
- }
- var byteLen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNebula
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- byteLen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if byteLen < 0 {
- return ErrInvalidLengthNebula
- }
- postIndex := iNdEx + byteLen
- if postIndex < 0 {
- return ErrInvalidLengthNebula
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Cert = append(m.Cert[:0], dAtA[iNdEx:postIndex]...)
- if m.Cert == nil {
- m.Cert = []byte{}
- }
- iNdEx = postIndex
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field InitiatorIndex", wireType)
- }
- m.InitiatorIndex = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNebula
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.InitiatorIndex |= uint32(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 3:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field ResponderIndex", wireType)
- }
- m.ResponderIndex = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNebula
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.ResponderIndex |= uint32(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Cookie", wireType)
- }
- m.Cookie = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNebula
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Cookie |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
- }
- m.Time = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNebula
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Time |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- default:
- iNdEx = preIndex
- skippy, err := skipNebula(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthNebula
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- iNdEx += skippy
- }
- }
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func skipNebula(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, ErrIntOverflowNebula
- }
- 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, ErrIntOverflowNebula
- }
- 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, ErrIntOverflowNebula
- }
- 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, ErrInvalidLengthNebula
- }
- iNdEx += length
- case 3:
- depth++
- case 4:
- if depth == 0 {
- return 0, ErrUnexpectedEndOfGroupNebula
- }
- depth--
- case 5:
- iNdEx += 4
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- if iNdEx < 0 {
- return 0, ErrInvalidLengthNebula
- }
- if depth == 0 {
- return iNdEx, nil
- }
- }
- return 0, io.ErrUnexpectedEOF
- }
- var (
- ErrInvalidLengthNebula = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowNebula = fmt.Errorf("proto: integer overflow")
- ErrUnexpectedEndOfGroupNebula = fmt.Errorf("proto: unexpected end of group")
- )
|