nebula.pb.go 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: nebula.proto
  3. package nebula
  4. import (
  5. fmt "fmt"
  6. proto "github.com/gogo/protobuf/proto"
  7. io "io"
  8. math "math"
  9. math_bits "math/bits"
  10. )
  11. // Reference imports to suppress errors if they are not otherwise used.
  12. var _ = proto.Marshal
  13. var _ = fmt.Errorf
  14. var _ = math.Inf
  15. // This is a compile-time assertion to ensure that this generated file
  16. // is compatible with the proto package it is being compiled against.
  17. // A compilation error at this line likely means your copy of the
  18. // proto package needs to be updated.
  19. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  20. type NebulaMeta_MessageType int32
  21. const (
  22. NebulaMeta_None NebulaMeta_MessageType = 0
  23. NebulaMeta_HostQuery NebulaMeta_MessageType = 1
  24. NebulaMeta_HostQueryReply NebulaMeta_MessageType = 2
  25. NebulaMeta_HostUpdateNotification NebulaMeta_MessageType = 3
  26. NebulaMeta_HostMovedNotification NebulaMeta_MessageType = 4
  27. NebulaMeta_HostPunchNotification NebulaMeta_MessageType = 5
  28. NebulaMeta_HostWhoami NebulaMeta_MessageType = 6
  29. NebulaMeta_HostWhoamiReply NebulaMeta_MessageType = 7
  30. NebulaMeta_PathCheck NebulaMeta_MessageType = 8
  31. NebulaMeta_PathCheckReply NebulaMeta_MessageType = 9
  32. )
  33. var NebulaMeta_MessageType_name = map[int32]string{
  34. 0: "None",
  35. 1: "HostQuery",
  36. 2: "HostQueryReply",
  37. 3: "HostUpdateNotification",
  38. 4: "HostMovedNotification",
  39. 5: "HostPunchNotification",
  40. 6: "HostWhoami",
  41. 7: "HostWhoamiReply",
  42. 8: "PathCheck",
  43. 9: "PathCheckReply",
  44. }
  45. var NebulaMeta_MessageType_value = map[string]int32{
  46. "None": 0,
  47. "HostQuery": 1,
  48. "HostQueryReply": 2,
  49. "HostUpdateNotification": 3,
  50. "HostMovedNotification": 4,
  51. "HostPunchNotification": 5,
  52. "HostWhoami": 6,
  53. "HostWhoamiReply": 7,
  54. "PathCheck": 8,
  55. "PathCheckReply": 9,
  56. }
  57. func (x NebulaMeta_MessageType) String() string {
  58. return proto.EnumName(NebulaMeta_MessageType_name, int32(x))
  59. }
  60. func (NebulaMeta_MessageType) EnumDescriptor() ([]byte, []int) {
  61. return fileDescriptor_2d65afa7693df5ef, []int{0, 0}
  62. }
  63. type NebulaPing_MessageType int32
  64. const (
  65. NebulaPing_Ping NebulaPing_MessageType = 0
  66. NebulaPing_Reply NebulaPing_MessageType = 1
  67. )
  68. var NebulaPing_MessageType_name = map[int32]string{
  69. 0: "Ping",
  70. 1: "Reply",
  71. }
  72. var NebulaPing_MessageType_value = map[string]int32{
  73. "Ping": 0,
  74. "Reply": 1,
  75. }
  76. func (x NebulaPing_MessageType) String() string {
  77. return proto.EnumName(NebulaPing_MessageType_name, int32(x))
  78. }
  79. func (NebulaPing_MessageType) EnumDescriptor() ([]byte, []int) {
  80. return fileDescriptor_2d65afa7693df5ef, []int{4, 0}
  81. }
  82. type NebulaMeta struct {
  83. Type NebulaMeta_MessageType `protobuf:"varint,1,opt,name=Type,proto3,enum=nebula.NebulaMeta_MessageType" json:"Type,omitempty"`
  84. Details *NebulaMetaDetails `protobuf:"bytes,2,opt,name=Details,proto3" json:"Details,omitempty"`
  85. }
  86. func (m *NebulaMeta) Reset() { *m = NebulaMeta{} }
  87. func (m *NebulaMeta) String() string { return proto.CompactTextString(m) }
  88. func (*NebulaMeta) ProtoMessage() {}
  89. func (*NebulaMeta) Descriptor() ([]byte, []int) {
  90. return fileDescriptor_2d65afa7693df5ef, []int{0}
  91. }
  92. func (m *NebulaMeta) XXX_Unmarshal(b []byte) error {
  93. return m.Unmarshal(b)
  94. }
  95. func (m *NebulaMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  96. if deterministic {
  97. return xxx_messageInfo_NebulaMeta.Marshal(b, m, deterministic)
  98. } else {
  99. b = b[:cap(b)]
  100. n, err := m.MarshalToSizedBuffer(b)
  101. if err != nil {
  102. return nil, err
  103. }
  104. return b[:n], nil
  105. }
  106. }
  107. func (m *NebulaMeta) XXX_Merge(src proto.Message) {
  108. xxx_messageInfo_NebulaMeta.Merge(m, src)
  109. }
  110. func (m *NebulaMeta) XXX_Size() int {
  111. return m.Size()
  112. }
  113. func (m *NebulaMeta) XXX_DiscardUnknown() {
  114. xxx_messageInfo_NebulaMeta.DiscardUnknown(m)
  115. }
  116. var xxx_messageInfo_NebulaMeta proto.InternalMessageInfo
  117. func (m *NebulaMeta) GetType() NebulaMeta_MessageType {
  118. if m != nil {
  119. return m.Type
  120. }
  121. return NebulaMeta_None
  122. }
  123. func (m *NebulaMeta) GetDetails() *NebulaMetaDetails {
  124. if m != nil {
  125. return m.Details
  126. }
  127. return nil
  128. }
  129. type NebulaMetaDetails struct {
  130. VpnIp uint32 `protobuf:"varint,1,opt,name=VpnIp,proto3" json:"VpnIp,omitempty"`
  131. Ip4AndPorts []*Ip4AndPort `protobuf:"bytes,2,rep,name=Ip4AndPorts,proto3" json:"Ip4AndPorts,omitempty"`
  132. Ip6AndPorts []*Ip6AndPort `protobuf:"bytes,4,rep,name=Ip6AndPorts,proto3" json:"Ip6AndPorts,omitempty"`
  133. Counter uint32 `protobuf:"varint,3,opt,name=counter,proto3" json:"counter,omitempty"`
  134. }
  135. func (m *NebulaMetaDetails) Reset() { *m = NebulaMetaDetails{} }
  136. func (m *NebulaMetaDetails) String() string { return proto.CompactTextString(m) }
  137. func (*NebulaMetaDetails) ProtoMessage() {}
  138. func (*NebulaMetaDetails) Descriptor() ([]byte, []int) {
  139. return fileDescriptor_2d65afa7693df5ef, []int{1}
  140. }
  141. func (m *NebulaMetaDetails) XXX_Unmarshal(b []byte) error {
  142. return m.Unmarshal(b)
  143. }
  144. func (m *NebulaMetaDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  145. if deterministic {
  146. return xxx_messageInfo_NebulaMetaDetails.Marshal(b, m, deterministic)
  147. } else {
  148. b = b[:cap(b)]
  149. n, err := m.MarshalToSizedBuffer(b)
  150. if err != nil {
  151. return nil, err
  152. }
  153. return b[:n], nil
  154. }
  155. }
  156. func (m *NebulaMetaDetails) XXX_Merge(src proto.Message) {
  157. xxx_messageInfo_NebulaMetaDetails.Merge(m, src)
  158. }
  159. func (m *NebulaMetaDetails) XXX_Size() int {
  160. return m.Size()
  161. }
  162. func (m *NebulaMetaDetails) XXX_DiscardUnknown() {
  163. xxx_messageInfo_NebulaMetaDetails.DiscardUnknown(m)
  164. }
  165. var xxx_messageInfo_NebulaMetaDetails proto.InternalMessageInfo
  166. func (m *NebulaMetaDetails) GetVpnIp() uint32 {
  167. if m != nil {
  168. return m.VpnIp
  169. }
  170. return 0
  171. }
  172. func (m *NebulaMetaDetails) GetIp4AndPorts() []*Ip4AndPort {
  173. if m != nil {
  174. return m.Ip4AndPorts
  175. }
  176. return nil
  177. }
  178. func (m *NebulaMetaDetails) GetIp6AndPorts() []*Ip6AndPort {
  179. if m != nil {
  180. return m.Ip6AndPorts
  181. }
  182. return nil
  183. }
  184. func (m *NebulaMetaDetails) GetCounter() uint32 {
  185. if m != nil {
  186. return m.Counter
  187. }
  188. return 0
  189. }
  190. type Ip4AndPort struct {
  191. Ip uint32 `protobuf:"varint,1,opt,name=Ip,proto3" json:"Ip,omitempty"`
  192. Port uint32 `protobuf:"varint,2,opt,name=Port,proto3" json:"Port,omitempty"`
  193. }
  194. func (m *Ip4AndPort) Reset() { *m = Ip4AndPort{} }
  195. func (m *Ip4AndPort) String() string { return proto.CompactTextString(m) }
  196. func (*Ip4AndPort) ProtoMessage() {}
  197. func (*Ip4AndPort) Descriptor() ([]byte, []int) {
  198. return fileDescriptor_2d65afa7693df5ef, []int{2}
  199. }
  200. func (m *Ip4AndPort) XXX_Unmarshal(b []byte) error {
  201. return m.Unmarshal(b)
  202. }
  203. func (m *Ip4AndPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  204. if deterministic {
  205. return xxx_messageInfo_Ip4AndPort.Marshal(b, m, deterministic)
  206. } else {
  207. b = b[:cap(b)]
  208. n, err := m.MarshalToSizedBuffer(b)
  209. if err != nil {
  210. return nil, err
  211. }
  212. return b[:n], nil
  213. }
  214. }
  215. func (m *Ip4AndPort) XXX_Merge(src proto.Message) {
  216. xxx_messageInfo_Ip4AndPort.Merge(m, src)
  217. }
  218. func (m *Ip4AndPort) XXX_Size() int {
  219. return m.Size()
  220. }
  221. func (m *Ip4AndPort) XXX_DiscardUnknown() {
  222. xxx_messageInfo_Ip4AndPort.DiscardUnknown(m)
  223. }
  224. var xxx_messageInfo_Ip4AndPort proto.InternalMessageInfo
  225. func (m *Ip4AndPort) GetIp() uint32 {
  226. if m != nil {
  227. return m.Ip
  228. }
  229. return 0
  230. }
  231. func (m *Ip4AndPort) GetPort() uint32 {
  232. if m != nil {
  233. return m.Port
  234. }
  235. return 0
  236. }
  237. type Ip6AndPort struct {
  238. Ip []byte `protobuf:"bytes,1,opt,name=Ip,proto3" json:"Ip,omitempty"`
  239. Port uint32 `protobuf:"varint,2,opt,name=Port,proto3" json:"Port,omitempty"`
  240. }
  241. func (m *Ip6AndPort) Reset() { *m = Ip6AndPort{} }
  242. func (m *Ip6AndPort) String() string { return proto.CompactTextString(m) }
  243. func (*Ip6AndPort) ProtoMessage() {}
  244. func (*Ip6AndPort) Descriptor() ([]byte, []int) {
  245. return fileDescriptor_2d65afa7693df5ef, []int{3}
  246. }
  247. func (m *Ip6AndPort) XXX_Unmarshal(b []byte) error {
  248. return m.Unmarshal(b)
  249. }
  250. func (m *Ip6AndPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  251. if deterministic {
  252. return xxx_messageInfo_Ip6AndPort.Marshal(b, m, deterministic)
  253. } else {
  254. b = b[:cap(b)]
  255. n, err := m.MarshalToSizedBuffer(b)
  256. if err != nil {
  257. return nil, err
  258. }
  259. return b[:n], nil
  260. }
  261. }
  262. func (m *Ip6AndPort) XXX_Merge(src proto.Message) {
  263. xxx_messageInfo_Ip6AndPort.Merge(m, src)
  264. }
  265. func (m *Ip6AndPort) XXX_Size() int {
  266. return m.Size()
  267. }
  268. func (m *Ip6AndPort) XXX_DiscardUnknown() {
  269. xxx_messageInfo_Ip6AndPort.DiscardUnknown(m)
  270. }
  271. var xxx_messageInfo_Ip6AndPort proto.InternalMessageInfo
  272. func (m *Ip6AndPort) GetIp() []byte {
  273. if m != nil {
  274. return m.Ip
  275. }
  276. return nil
  277. }
  278. func (m *Ip6AndPort) GetPort() uint32 {
  279. if m != nil {
  280. return m.Port
  281. }
  282. return 0
  283. }
  284. type NebulaPing struct {
  285. Type NebulaPing_MessageType `protobuf:"varint,1,opt,name=Type,proto3,enum=nebula.NebulaPing_MessageType" json:"Type,omitempty"`
  286. Time uint64 `protobuf:"varint,2,opt,name=Time,proto3" json:"Time,omitempty"`
  287. }
  288. func (m *NebulaPing) Reset() { *m = NebulaPing{} }
  289. func (m *NebulaPing) String() string { return proto.CompactTextString(m) }
  290. func (*NebulaPing) ProtoMessage() {}
  291. func (*NebulaPing) Descriptor() ([]byte, []int) {
  292. return fileDescriptor_2d65afa7693df5ef, []int{4}
  293. }
  294. func (m *NebulaPing) XXX_Unmarshal(b []byte) error {
  295. return m.Unmarshal(b)
  296. }
  297. func (m *NebulaPing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  298. if deterministic {
  299. return xxx_messageInfo_NebulaPing.Marshal(b, m, deterministic)
  300. } else {
  301. b = b[:cap(b)]
  302. n, err := m.MarshalToSizedBuffer(b)
  303. if err != nil {
  304. return nil, err
  305. }
  306. return b[:n], nil
  307. }
  308. }
  309. func (m *NebulaPing) XXX_Merge(src proto.Message) {
  310. xxx_messageInfo_NebulaPing.Merge(m, src)
  311. }
  312. func (m *NebulaPing) XXX_Size() int {
  313. return m.Size()
  314. }
  315. func (m *NebulaPing) XXX_DiscardUnknown() {
  316. xxx_messageInfo_NebulaPing.DiscardUnknown(m)
  317. }
  318. var xxx_messageInfo_NebulaPing proto.InternalMessageInfo
  319. func (m *NebulaPing) GetType() NebulaPing_MessageType {
  320. if m != nil {
  321. return m.Type
  322. }
  323. return NebulaPing_Ping
  324. }
  325. func (m *NebulaPing) GetTime() uint64 {
  326. if m != nil {
  327. return m.Time
  328. }
  329. return 0
  330. }
  331. type NebulaHandshake struct {
  332. Details *NebulaHandshakeDetails `protobuf:"bytes,1,opt,name=Details,proto3" json:"Details,omitempty"`
  333. Hmac []byte `protobuf:"bytes,2,opt,name=Hmac,proto3" json:"Hmac,omitempty"`
  334. }
  335. func (m *NebulaHandshake) Reset() { *m = NebulaHandshake{} }
  336. func (m *NebulaHandshake) String() string { return proto.CompactTextString(m) }
  337. func (*NebulaHandshake) ProtoMessage() {}
  338. func (*NebulaHandshake) Descriptor() ([]byte, []int) {
  339. return fileDescriptor_2d65afa7693df5ef, []int{5}
  340. }
  341. func (m *NebulaHandshake) XXX_Unmarshal(b []byte) error {
  342. return m.Unmarshal(b)
  343. }
  344. func (m *NebulaHandshake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  345. if deterministic {
  346. return xxx_messageInfo_NebulaHandshake.Marshal(b, m, deterministic)
  347. } else {
  348. b = b[:cap(b)]
  349. n, err := m.MarshalToSizedBuffer(b)
  350. if err != nil {
  351. return nil, err
  352. }
  353. return b[:n], nil
  354. }
  355. }
  356. func (m *NebulaHandshake) XXX_Merge(src proto.Message) {
  357. xxx_messageInfo_NebulaHandshake.Merge(m, src)
  358. }
  359. func (m *NebulaHandshake) XXX_Size() int {
  360. return m.Size()
  361. }
  362. func (m *NebulaHandshake) XXX_DiscardUnknown() {
  363. xxx_messageInfo_NebulaHandshake.DiscardUnknown(m)
  364. }
  365. var xxx_messageInfo_NebulaHandshake proto.InternalMessageInfo
  366. func (m *NebulaHandshake) GetDetails() *NebulaHandshakeDetails {
  367. if m != nil {
  368. return m.Details
  369. }
  370. return nil
  371. }
  372. func (m *NebulaHandshake) GetHmac() []byte {
  373. if m != nil {
  374. return m.Hmac
  375. }
  376. return nil
  377. }
  378. type NebulaHandshakeDetails struct {
  379. Cert []byte `protobuf:"bytes,1,opt,name=Cert,proto3" json:"Cert,omitempty"`
  380. InitiatorIndex uint32 `protobuf:"varint,2,opt,name=InitiatorIndex,proto3" json:"InitiatorIndex,omitempty"`
  381. ResponderIndex uint32 `protobuf:"varint,3,opt,name=ResponderIndex,proto3" json:"ResponderIndex,omitempty"`
  382. Cookie uint64 `protobuf:"varint,4,opt,name=Cookie,proto3" json:"Cookie,omitempty"`
  383. Time uint64 `protobuf:"varint,5,opt,name=Time,proto3" json:"Time,omitempty"`
  384. }
  385. func (m *NebulaHandshakeDetails) Reset() { *m = NebulaHandshakeDetails{} }
  386. func (m *NebulaHandshakeDetails) String() string { return proto.CompactTextString(m) }
  387. func (*NebulaHandshakeDetails) ProtoMessage() {}
  388. func (*NebulaHandshakeDetails) Descriptor() ([]byte, []int) {
  389. return fileDescriptor_2d65afa7693df5ef, []int{6}
  390. }
  391. func (m *NebulaHandshakeDetails) XXX_Unmarshal(b []byte) error {
  392. return m.Unmarshal(b)
  393. }
  394. func (m *NebulaHandshakeDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  395. if deterministic {
  396. return xxx_messageInfo_NebulaHandshakeDetails.Marshal(b, m, deterministic)
  397. } else {
  398. b = b[:cap(b)]
  399. n, err := m.MarshalToSizedBuffer(b)
  400. if err != nil {
  401. return nil, err
  402. }
  403. return b[:n], nil
  404. }
  405. }
  406. func (m *NebulaHandshakeDetails) XXX_Merge(src proto.Message) {
  407. xxx_messageInfo_NebulaHandshakeDetails.Merge(m, src)
  408. }
  409. func (m *NebulaHandshakeDetails) XXX_Size() int {
  410. return m.Size()
  411. }
  412. func (m *NebulaHandshakeDetails) XXX_DiscardUnknown() {
  413. xxx_messageInfo_NebulaHandshakeDetails.DiscardUnknown(m)
  414. }
  415. var xxx_messageInfo_NebulaHandshakeDetails proto.InternalMessageInfo
  416. func (m *NebulaHandshakeDetails) GetCert() []byte {
  417. if m != nil {
  418. return m.Cert
  419. }
  420. return nil
  421. }
  422. func (m *NebulaHandshakeDetails) GetInitiatorIndex() uint32 {
  423. if m != nil {
  424. return m.InitiatorIndex
  425. }
  426. return 0
  427. }
  428. func (m *NebulaHandshakeDetails) GetResponderIndex() uint32 {
  429. if m != nil {
  430. return m.ResponderIndex
  431. }
  432. return 0
  433. }
  434. func (m *NebulaHandshakeDetails) GetCookie() uint64 {
  435. if m != nil {
  436. return m.Cookie
  437. }
  438. return 0
  439. }
  440. func (m *NebulaHandshakeDetails) GetTime() uint64 {
  441. if m != nil {
  442. return m.Time
  443. }
  444. return 0
  445. }
  446. func init() {
  447. proto.RegisterEnum("nebula.NebulaMeta_MessageType", NebulaMeta_MessageType_name, NebulaMeta_MessageType_value)
  448. proto.RegisterEnum("nebula.NebulaPing_MessageType", NebulaPing_MessageType_name, NebulaPing_MessageType_value)
  449. proto.RegisterType((*NebulaMeta)(nil), "nebula.NebulaMeta")
  450. proto.RegisterType((*NebulaMetaDetails)(nil), "nebula.NebulaMetaDetails")
  451. proto.RegisterType((*Ip4AndPort)(nil), "nebula.Ip4AndPort")
  452. proto.RegisterType((*Ip6AndPort)(nil), "nebula.Ip6AndPort")
  453. proto.RegisterType((*NebulaPing)(nil), "nebula.NebulaPing")
  454. proto.RegisterType((*NebulaHandshake)(nil), "nebula.NebulaHandshake")
  455. proto.RegisterType((*NebulaHandshakeDetails)(nil), "nebula.NebulaHandshakeDetails")
  456. }
  457. func init() { proto.RegisterFile("nebula.proto", fileDescriptor_2d65afa7693df5ef) }
  458. var fileDescriptor_2d65afa7693df5ef = []byte{
  459. // 527 bytes of a gzipped FileDescriptorProto
  460. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x54, 0xbb, 0x8e, 0xda, 0x40,
  461. 0x14, 0x65, 0xc0, 0xc0, 0x72, 0x79, 0xac, 0x73, 0x93, 0x20, 0x6f, 0x0a, 0x6b, 0xe5, 0x22, 0xa2,
  462. 0x42, 0x11, 0xbb, 0x42, 0x69, 0x13, 0x52, 0x40, 0x01, 0x22, 0xd6, 0x26, 0x29, 0xa3, 0x59, 0x3c,
  463. 0x59, 0x2c, 0x60, 0xc6, 0xb2, 0x87, 0x68, 0xf9, 0x8b, 0x7c, 0x46, 0xba, 0xfc, 0x46, 0x8a, 0x14,
  464. 0x5b, 0xa4, 0x48, 0x19, 0xc1, 0x8f, 0x44, 0x33, 0x36, 0x36, 0x6b, 0x36, 0xdb, 0xdd, 0xc7, 0x39,
  465. 0x97, 0xc3, 0x99, 0x23, 0x43, 0x83, 0xb3, 0xeb, 0xf5, 0x92, 0x76, 0x83, 0x50, 0x48, 0x81, 0x95,
  466. 0xb8, 0x73, 0x7e, 0x15, 0x01, 0x26, 0xba, 0x1c, 0x33, 0x49, 0xb1, 0x07, 0xc6, 0xd5, 0x26, 0x60,
  467. 0x16, 0x39, 0x27, 0x9d, 0x56, 0xcf, 0xee, 0x26, 0x9c, 0x0c, 0xd1, 0x1d, 0xb3, 0x28, 0xa2, 0x37,
  468. 0x4c, 0xa1, 0x5c, 0x8d, 0xc5, 0x0b, 0xa8, 0xbe, 0x63, 0x92, 0xfa, 0xcb, 0xc8, 0x2a, 0x9e, 0x93,
  469. 0x4e, 0xbd, 0x77, 0x76, 0x4c, 0x4b, 0x00, 0xee, 0x1e, 0xe9, 0xfc, 0x26, 0x50, 0x3f, 0x38, 0x85,
  470. 0x27, 0x60, 0x4c, 0x04, 0x67, 0x66, 0x01, 0x9b, 0x50, 0x1b, 0x8a, 0x48, 0xbe, 0x5f, 0xb3, 0x70,
  471. 0x63, 0x12, 0x44, 0x68, 0xa5, 0xad, 0xcb, 0x82, 0xe5, 0xc6, 0x2c, 0xe2, 0x0b, 0x68, 0xab, 0xd9,
  472. 0x87, 0xc0, 0xa3, 0x92, 0x4d, 0x84, 0xf4, 0xbf, 0xf8, 0x33, 0x2a, 0x7d, 0xc1, 0xcd, 0x12, 0x9e,
  473. 0xc1, 0x73, 0xb5, 0x1b, 0x8b, 0xaf, 0xcc, 0xbb, 0xb7, 0x32, 0xf6, 0xab, 0xe9, 0x9a, 0xcf, 0xe6,
  474. 0xf7, 0x56, 0x65, 0x6c, 0x01, 0xa8, 0xd5, 0xa7, 0xb9, 0xa0, 0x2b, 0xdf, 0xac, 0xe0, 0x53, 0x38,
  475. 0xcd, 0xfa, 0xf8, 0x67, 0xab, 0x4a, 0xd9, 0x94, 0xca, 0xf9, 0x60, 0xce, 0x66, 0x0b, 0xf3, 0x44,
  476. 0x29, 0x4b, 0xdb, 0x18, 0x52, 0x73, 0x7e, 0x10, 0x78, 0x72, 0xf4, 0xaf, 0xf1, 0x19, 0x94, 0x3f,
  477. 0x06, 0x7c, 0x14, 0x68, 0x5b, 0x9b, 0x6e, 0xdc, 0xe0, 0x25, 0xd4, 0x47, 0xc1, 0xe5, 0x1b, 0xee,
  478. 0x4d, 0x45, 0x28, 0x95, 0x77, 0xa5, 0x4e, 0xbd, 0x87, 0x7b, 0xef, 0xb2, 0x95, 0x7b, 0x08, 0x8b,
  479. 0x59, 0xfd, 0x94, 0x65, 0xe4, 0x59, 0xfd, 0x03, 0x56, 0x0a, 0x43, 0x0b, 0xaa, 0x33, 0xb1, 0xe6,
  480. 0x92, 0x85, 0x56, 0x49, 0x6b, 0xd8, 0xb7, 0xce, 0x2b, 0x80, 0xec, 0x3c, 0xb6, 0xa0, 0x98, 0xca,
  481. 0x2c, 0x8e, 0x02, 0x44, 0x30, 0xd4, 0x5c, 0x3f, 0x6c, 0xd3, 0xd5, 0x75, 0xcc, 0xe8, 0x1f, 0x33,
  482. 0x1a, 0xff, 0x65, 0xdc, 0xee, 0x33, 0x36, 0xf5, 0xf9, 0xcd, 0xe3, 0x19, 0x53, 0x88, 0x07, 0x32,
  483. 0x86, 0x60, 0x5c, 0xf9, 0x2b, 0xa6, 0xaf, 0x1a, 0xae, 0xae, 0x1d, 0xe7, 0x28, 0x41, 0x8a, 0x6c,
  484. 0x16, 0xb0, 0x06, 0xe5, 0xf8, 0x3d, 0x88, 0xf3, 0x19, 0x4e, 0xe3, 0xbb, 0x43, 0xca, 0xbd, 0x68,
  485. 0x4e, 0x17, 0x0c, 0x5f, 0x67, 0x71, 0x25, 0x3a, 0xae, 0x39, 0x05, 0x29, 0x32, 0x9f, 0x59, 0x25,
  486. 0x62, 0xb8, 0xa2, 0x33, 0x2d, 0xa2, 0xe1, 0xea, 0xda, 0xf9, 0x4e, 0xa0, 0xfd, 0x30, 0x4f, 0xc1,
  487. 0x07, 0x2c, 0x94, 0x89, 0x37, 0xba, 0xc6, 0x97, 0xd0, 0x1a, 0x71, 0x5f, 0xfa, 0x54, 0x8a, 0x70,
  488. 0xc4, 0x3d, 0x76, 0x9b, 0xf8, 0x94, 0x9b, 0x2a, 0x9c, 0xcb, 0xa2, 0x40, 0x70, 0x8f, 0x25, 0xb8,
  489. 0xf8, 0xd9, 0x72, 0x53, 0x6c, 0x43, 0x65, 0x20, 0xc4, 0xc2, 0x67, 0x96, 0xa1, 0x9d, 0x49, 0xba,
  490. 0xd4, 0xaf, 0x72, 0xe6, 0xd7, 0x5b, 0xeb, 0xe7, 0xd6, 0x26, 0x77, 0x5b, 0x9b, 0xfc, 0xdd, 0xda,
  491. 0xe4, 0xdb, 0xce, 0x2e, 0xdc, 0xed, 0xec, 0xc2, 0x9f, 0x9d, 0x5d, 0xb8, 0xae, 0xe8, 0x6f, 0xc2,
  492. 0xc5, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x36, 0xec, 0xba, 0x62, 0x23, 0x04, 0x00, 0x00,
  493. }
  494. func (m *NebulaMeta) Marshal() (dAtA []byte, err error) {
  495. size := m.Size()
  496. dAtA = make([]byte, size)
  497. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  498. if err != nil {
  499. return nil, err
  500. }
  501. return dAtA[:n], nil
  502. }
  503. func (m *NebulaMeta) MarshalTo(dAtA []byte) (int, error) {
  504. size := m.Size()
  505. return m.MarshalToSizedBuffer(dAtA[:size])
  506. }
  507. func (m *NebulaMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  508. i := len(dAtA)
  509. _ = i
  510. var l int
  511. _ = l
  512. if m.Details != nil {
  513. {
  514. size, err := m.Details.MarshalToSizedBuffer(dAtA[:i])
  515. if err != nil {
  516. return 0, err
  517. }
  518. i -= size
  519. i = encodeVarintNebula(dAtA, i, uint64(size))
  520. }
  521. i--
  522. dAtA[i] = 0x12
  523. }
  524. if m.Type != 0 {
  525. i = encodeVarintNebula(dAtA, i, uint64(m.Type))
  526. i--
  527. dAtA[i] = 0x8
  528. }
  529. return len(dAtA) - i, nil
  530. }
  531. func (m *NebulaMetaDetails) Marshal() (dAtA []byte, err error) {
  532. size := m.Size()
  533. dAtA = make([]byte, size)
  534. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  535. if err != nil {
  536. return nil, err
  537. }
  538. return dAtA[:n], nil
  539. }
  540. func (m *NebulaMetaDetails) MarshalTo(dAtA []byte) (int, error) {
  541. size := m.Size()
  542. return m.MarshalToSizedBuffer(dAtA[:size])
  543. }
  544. func (m *NebulaMetaDetails) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  545. i := len(dAtA)
  546. _ = i
  547. var l int
  548. _ = l
  549. if len(m.Ip6AndPorts) > 0 {
  550. for iNdEx := len(m.Ip6AndPorts) - 1; iNdEx >= 0; iNdEx-- {
  551. {
  552. size, err := m.Ip6AndPorts[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  553. if err != nil {
  554. return 0, err
  555. }
  556. i -= size
  557. i = encodeVarintNebula(dAtA, i, uint64(size))
  558. }
  559. i--
  560. dAtA[i] = 0x22
  561. }
  562. }
  563. if m.Counter != 0 {
  564. i = encodeVarintNebula(dAtA, i, uint64(m.Counter))
  565. i--
  566. dAtA[i] = 0x18
  567. }
  568. if len(m.Ip4AndPorts) > 0 {
  569. for iNdEx := len(m.Ip4AndPorts) - 1; iNdEx >= 0; iNdEx-- {
  570. {
  571. size, err := m.Ip4AndPorts[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  572. if err != nil {
  573. return 0, err
  574. }
  575. i -= size
  576. i = encodeVarintNebula(dAtA, i, uint64(size))
  577. }
  578. i--
  579. dAtA[i] = 0x12
  580. }
  581. }
  582. if m.VpnIp != 0 {
  583. i = encodeVarintNebula(dAtA, i, uint64(m.VpnIp))
  584. i--
  585. dAtA[i] = 0x8
  586. }
  587. return len(dAtA) - i, nil
  588. }
  589. func (m *Ip4AndPort) Marshal() (dAtA []byte, err error) {
  590. size := m.Size()
  591. dAtA = make([]byte, size)
  592. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  593. if err != nil {
  594. return nil, err
  595. }
  596. return dAtA[:n], nil
  597. }
  598. func (m *Ip4AndPort) MarshalTo(dAtA []byte) (int, error) {
  599. size := m.Size()
  600. return m.MarshalToSizedBuffer(dAtA[:size])
  601. }
  602. func (m *Ip4AndPort) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  603. i := len(dAtA)
  604. _ = i
  605. var l int
  606. _ = l
  607. if m.Port != 0 {
  608. i = encodeVarintNebula(dAtA, i, uint64(m.Port))
  609. i--
  610. dAtA[i] = 0x10
  611. }
  612. if m.Ip != 0 {
  613. i = encodeVarintNebula(dAtA, i, uint64(m.Ip))
  614. i--
  615. dAtA[i] = 0x8
  616. }
  617. return len(dAtA) - i, nil
  618. }
  619. func (m *Ip6AndPort) Marshal() (dAtA []byte, err error) {
  620. size := m.Size()
  621. dAtA = make([]byte, size)
  622. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  623. if err != nil {
  624. return nil, err
  625. }
  626. return dAtA[:n], nil
  627. }
  628. func (m *Ip6AndPort) MarshalTo(dAtA []byte) (int, error) {
  629. size := m.Size()
  630. return m.MarshalToSizedBuffer(dAtA[:size])
  631. }
  632. func (m *Ip6AndPort) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  633. i := len(dAtA)
  634. _ = i
  635. var l int
  636. _ = l
  637. if m.Port != 0 {
  638. i = encodeVarintNebula(dAtA, i, uint64(m.Port))
  639. i--
  640. dAtA[i] = 0x10
  641. }
  642. if len(m.Ip) > 0 {
  643. i -= len(m.Ip)
  644. copy(dAtA[i:], m.Ip)
  645. i = encodeVarintNebula(dAtA, i, uint64(len(m.Ip)))
  646. i--
  647. dAtA[i] = 0xa
  648. }
  649. return len(dAtA) - i, nil
  650. }
  651. func (m *NebulaPing) Marshal() (dAtA []byte, err error) {
  652. size := m.Size()
  653. dAtA = make([]byte, size)
  654. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  655. if err != nil {
  656. return nil, err
  657. }
  658. return dAtA[:n], nil
  659. }
  660. func (m *NebulaPing) MarshalTo(dAtA []byte) (int, error) {
  661. size := m.Size()
  662. return m.MarshalToSizedBuffer(dAtA[:size])
  663. }
  664. func (m *NebulaPing) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  665. i := len(dAtA)
  666. _ = i
  667. var l int
  668. _ = l
  669. if m.Time != 0 {
  670. i = encodeVarintNebula(dAtA, i, uint64(m.Time))
  671. i--
  672. dAtA[i] = 0x10
  673. }
  674. if m.Type != 0 {
  675. i = encodeVarintNebula(dAtA, i, uint64(m.Type))
  676. i--
  677. dAtA[i] = 0x8
  678. }
  679. return len(dAtA) - i, nil
  680. }
  681. func (m *NebulaHandshake) Marshal() (dAtA []byte, err error) {
  682. size := m.Size()
  683. dAtA = make([]byte, size)
  684. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  685. if err != nil {
  686. return nil, err
  687. }
  688. return dAtA[:n], nil
  689. }
  690. func (m *NebulaHandshake) MarshalTo(dAtA []byte) (int, error) {
  691. size := m.Size()
  692. return m.MarshalToSizedBuffer(dAtA[:size])
  693. }
  694. func (m *NebulaHandshake) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  695. i := len(dAtA)
  696. _ = i
  697. var l int
  698. _ = l
  699. if len(m.Hmac) > 0 {
  700. i -= len(m.Hmac)
  701. copy(dAtA[i:], m.Hmac)
  702. i = encodeVarintNebula(dAtA, i, uint64(len(m.Hmac)))
  703. i--
  704. dAtA[i] = 0x12
  705. }
  706. if m.Details != nil {
  707. {
  708. size, err := m.Details.MarshalToSizedBuffer(dAtA[:i])
  709. if err != nil {
  710. return 0, err
  711. }
  712. i -= size
  713. i = encodeVarintNebula(dAtA, i, uint64(size))
  714. }
  715. i--
  716. dAtA[i] = 0xa
  717. }
  718. return len(dAtA) - i, nil
  719. }
  720. func (m *NebulaHandshakeDetails) Marshal() (dAtA []byte, err error) {
  721. size := m.Size()
  722. dAtA = make([]byte, size)
  723. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  724. if err != nil {
  725. return nil, err
  726. }
  727. return dAtA[:n], nil
  728. }
  729. func (m *NebulaHandshakeDetails) MarshalTo(dAtA []byte) (int, error) {
  730. size := m.Size()
  731. return m.MarshalToSizedBuffer(dAtA[:size])
  732. }
  733. func (m *NebulaHandshakeDetails) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  734. i := len(dAtA)
  735. _ = i
  736. var l int
  737. _ = l
  738. if m.Time != 0 {
  739. i = encodeVarintNebula(dAtA, i, uint64(m.Time))
  740. i--
  741. dAtA[i] = 0x28
  742. }
  743. if m.Cookie != 0 {
  744. i = encodeVarintNebula(dAtA, i, uint64(m.Cookie))
  745. i--
  746. dAtA[i] = 0x20
  747. }
  748. if m.ResponderIndex != 0 {
  749. i = encodeVarintNebula(dAtA, i, uint64(m.ResponderIndex))
  750. i--
  751. dAtA[i] = 0x18
  752. }
  753. if m.InitiatorIndex != 0 {
  754. i = encodeVarintNebula(dAtA, i, uint64(m.InitiatorIndex))
  755. i--
  756. dAtA[i] = 0x10
  757. }
  758. if len(m.Cert) > 0 {
  759. i -= len(m.Cert)
  760. copy(dAtA[i:], m.Cert)
  761. i = encodeVarintNebula(dAtA, i, uint64(len(m.Cert)))
  762. i--
  763. dAtA[i] = 0xa
  764. }
  765. return len(dAtA) - i, nil
  766. }
  767. func encodeVarintNebula(dAtA []byte, offset int, v uint64) int {
  768. offset -= sovNebula(v)
  769. base := offset
  770. for v >= 1<<7 {
  771. dAtA[offset] = uint8(v&0x7f | 0x80)
  772. v >>= 7
  773. offset++
  774. }
  775. dAtA[offset] = uint8(v)
  776. return base
  777. }
  778. func (m *NebulaMeta) Size() (n int) {
  779. if m == nil {
  780. return 0
  781. }
  782. var l int
  783. _ = l
  784. if m.Type != 0 {
  785. n += 1 + sovNebula(uint64(m.Type))
  786. }
  787. if m.Details != nil {
  788. l = m.Details.Size()
  789. n += 1 + l + sovNebula(uint64(l))
  790. }
  791. return n
  792. }
  793. func (m *NebulaMetaDetails) Size() (n int) {
  794. if m == nil {
  795. return 0
  796. }
  797. var l int
  798. _ = l
  799. if m.VpnIp != 0 {
  800. n += 1 + sovNebula(uint64(m.VpnIp))
  801. }
  802. if len(m.Ip4AndPorts) > 0 {
  803. for _, e := range m.Ip4AndPorts {
  804. l = e.Size()
  805. n += 1 + l + sovNebula(uint64(l))
  806. }
  807. }
  808. if m.Counter != 0 {
  809. n += 1 + sovNebula(uint64(m.Counter))
  810. }
  811. if len(m.Ip6AndPorts) > 0 {
  812. for _, e := range m.Ip6AndPorts {
  813. l = e.Size()
  814. n += 1 + l + sovNebula(uint64(l))
  815. }
  816. }
  817. return n
  818. }
  819. func (m *Ip4AndPort) Size() (n int) {
  820. if m == nil {
  821. return 0
  822. }
  823. var l int
  824. _ = l
  825. if m.Ip != 0 {
  826. n += 1 + sovNebula(uint64(m.Ip))
  827. }
  828. if m.Port != 0 {
  829. n += 1 + sovNebula(uint64(m.Port))
  830. }
  831. return n
  832. }
  833. func (m *Ip6AndPort) Size() (n int) {
  834. if m == nil {
  835. return 0
  836. }
  837. var l int
  838. _ = l
  839. l = len(m.Ip)
  840. if l > 0 {
  841. n += 1 + l + sovNebula(uint64(l))
  842. }
  843. if m.Port != 0 {
  844. n += 1 + sovNebula(uint64(m.Port))
  845. }
  846. return n
  847. }
  848. func (m *NebulaPing) Size() (n int) {
  849. if m == nil {
  850. return 0
  851. }
  852. var l int
  853. _ = l
  854. if m.Type != 0 {
  855. n += 1 + sovNebula(uint64(m.Type))
  856. }
  857. if m.Time != 0 {
  858. n += 1 + sovNebula(uint64(m.Time))
  859. }
  860. return n
  861. }
  862. func (m *NebulaHandshake) Size() (n int) {
  863. if m == nil {
  864. return 0
  865. }
  866. var l int
  867. _ = l
  868. if m.Details != nil {
  869. l = m.Details.Size()
  870. n += 1 + l + sovNebula(uint64(l))
  871. }
  872. l = len(m.Hmac)
  873. if l > 0 {
  874. n += 1 + l + sovNebula(uint64(l))
  875. }
  876. return n
  877. }
  878. func (m *NebulaHandshakeDetails) Size() (n int) {
  879. if m == nil {
  880. return 0
  881. }
  882. var l int
  883. _ = l
  884. l = len(m.Cert)
  885. if l > 0 {
  886. n += 1 + l + sovNebula(uint64(l))
  887. }
  888. if m.InitiatorIndex != 0 {
  889. n += 1 + sovNebula(uint64(m.InitiatorIndex))
  890. }
  891. if m.ResponderIndex != 0 {
  892. n += 1 + sovNebula(uint64(m.ResponderIndex))
  893. }
  894. if m.Cookie != 0 {
  895. n += 1 + sovNebula(uint64(m.Cookie))
  896. }
  897. if m.Time != 0 {
  898. n += 1 + sovNebula(uint64(m.Time))
  899. }
  900. return n
  901. }
  902. func sovNebula(x uint64) (n int) {
  903. return (math_bits.Len64(x|1) + 6) / 7
  904. }
  905. func sozNebula(x uint64) (n int) {
  906. return sovNebula(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  907. }
  908. func (m *NebulaMeta) Unmarshal(dAtA []byte) error {
  909. l := len(dAtA)
  910. iNdEx := 0
  911. for iNdEx < l {
  912. preIndex := iNdEx
  913. var wire uint64
  914. for shift := uint(0); ; shift += 7 {
  915. if shift >= 64 {
  916. return ErrIntOverflowNebula
  917. }
  918. if iNdEx >= l {
  919. return io.ErrUnexpectedEOF
  920. }
  921. b := dAtA[iNdEx]
  922. iNdEx++
  923. wire |= uint64(b&0x7F) << shift
  924. if b < 0x80 {
  925. break
  926. }
  927. }
  928. fieldNum := int32(wire >> 3)
  929. wireType := int(wire & 0x7)
  930. if wireType == 4 {
  931. return fmt.Errorf("proto: NebulaMeta: wiretype end group for non-group")
  932. }
  933. if fieldNum <= 0 {
  934. return fmt.Errorf("proto: NebulaMeta: illegal tag %d (wire type %d)", fieldNum, wire)
  935. }
  936. switch fieldNum {
  937. case 1:
  938. if wireType != 0 {
  939. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  940. }
  941. m.Type = 0
  942. for shift := uint(0); ; shift += 7 {
  943. if shift >= 64 {
  944. return ErrIntOverflowNebula
  945. }
  946. if iNdEx >= l {
  947. return io.ErrUnexpectedEOF
  948. }
  949. b := dAtA[iNdEx]
  950. iNdEx++
  951. m.Type |= NebulaMeta_MessageType(b&0x7F) << shift
  952. if b < 0x80 {
  953. break
  954. }
  955. }
  956. case 2:
  957. if wireType != 2 {
  958. return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType)
  959. }
  960. var msglen int
  961. for shift := uint(0); ; shift += 7 {
  962. if shift >= 64 {
  963. return ErrIntOverflowNebula
  964. }
  965. if iNdEx >= l {
  966. return io.ErrUnexpectedEOF
  967. }
  968. b := dAtA[iNdEx]
  969. iNdEx++
  970. msglen |= int(b&0x7F) << shift
  971. if b < 0x80 {
  972. break
  973. }
  974. }
  975. if msglen < 0 {
  976. return ErrInvalidLengthNebula
  977. }
  978. postIndex := iNdEx + msglen
  979. if postIndex < 0 {
  980. return ErrInvalidLengthNebula
  981. }
  982. if postIndex > l {
  983. return io.ErrUnexpectedEOF
  984. }
  985. if m.Details == nil {
  986. m.Details = &NebulaMetaDetails{}
  987. }
  988. if err := m.Details.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  989. return err
  990. }
  991. iNdEx = postIndex
  992. default:
  993. iNdEx = preIndex
  994. skippy, err := skipNebula(dAtA[iNdEx:])
  995. if err != nil {
  996. return err
  997. }
  998. if (skippy < 0) || (iNdEx+skippy) < 0 {
  999. return ErrInvalidLengthNebula
  1000. }
  1001. if (iNdEx + skippy) > l {
  1002. return io.ErrUnexpectedEOF
  1003. }
  1004. iNdEx += skippy
  1005. }
  1006. }
  1007. if iNdEx > l {
  1008. return io.ErrUnexpectedEOF
  1009. }
  1010. return nil
  1011. }
  1012. func (m *NebulaMetaDetails) Unmarshal(dAtA []byte) error {
  1013. l := len(dAtA)
  1014. iNdEx := 0
  1015. for iNdEx < l {
  1016. preIndex := iNdEx
  1017. var wire uint64
  1018. for shift := uint(0); ; shift += 7 {
  1019. if shift >= 64 {
  1020. return ErrIntOverflowNebula
  1021. }
  1022. if iNdEx >= l {
  1023. return io.ErrUnexpectedEOF
  1024. }
  1025. b := dAtA[iNdEx]
  1026. iNdEx++
  1027. wire |= uint64(b&0x7F) << shift
  1028. if b < 0x80 {
  1029. break
  1030. }
  1031. }
  1032. fieldNum := int32(wire >> 3)
  1033. wireType := int(wire & 0x7)
  1034. if wireType == 4 {
  1035. return fmt.Errorf("proto: NebulaMetaDetails: wiretype end group for non-group")
  1036. }
  1037. if fieldNum <= 0 {
  1038. return fmt.Errorf("proto: NebulaMetaDetails: illegal tag %d (wire type %d)", fieldNum, wire)
  1039. }
  1040. switch fieldNum {
  1041. case 1:
  1042. if wireType != 0 {
  1043. return fmt.Errorf("proto: wrong wireType = %d for field VpnIp", wireType)
  1044. }
  1045. m.VpnIp = 0
  1046. for shift := uint(0); ; shift += 7 {
  1047. if shift >= 64 {
  1048. return ErrIntOverflowNebula
  1049. }
  1050. if iNdEx >= l {
  1051. return io.ErrUnexpectedEOF
  1052. }
  1053. b := dAtA[iNdEx]
  1054. iNdEx++
  1055. m.VpnIp |= uint32(b&0x7F) << shift
  1056. if b < 0x80 {
  1057. break
  1058. }
  1059. }
  1060. case 2:
  1061. if wireType != 2 {
  1062. return fmt.Errorf("proto: wrong wireType = %d for field Ip4AndPorts", wireType)
  1063. }
  1064. var msglen int
  1065. for shift := uint(0); ; shift += 7 {
  1066. if shift >= 64 {
  1067. return ErrIntOverflowNebula
  1068. }
  1069. if iNdEx >= l {
  1070. return io.ErrUnexpectedEOF
  1071. }
  1072. b := dAtA[iNdEx]
  1073. iNdEx++
  1074. msglen |= int(b&0x7F) << shift
  1075. if b < 0x80 {
  1076. break
  1077. }
  1078. }
  1079. if msglen < 0 {
  1080. return ErrInvalidLengthNebula
  1081. }
  1082. postIndex := iNdEx + msglen
  1083. if postIndex < 0 {
  1084. return ErrInvalidLengthNebula
  1085. }
  1086. if postIndex > l {
  1087. return io.ErrUnexpectedEOF
  1088. }
  1089. m.Ip4AndPorts = append(m.Ip4AndPorts, &Ip4AndPort{})
  1090. if err := m.Ip4AndPorts[len(m.Ip4AndPorts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1091. return err
  1092. }
  1093. iNdEx = postIndex
  1094. case 3:
  1095. if wireType != 0 {
  1096. return fmt.Errorf("proto: wrong wireType = %d for field Counter", wireType)
  1097. }
  1098. m.Counter = 0
  1099. for shift := uint(0); ; shift += 7 {
  1100. if shift >= 64 {
  1101. return ErrIntOverflowNebula
  1102. }
  1103. if iNdEx >= l {
  1104. return io.ErrUnexpectedEOF
  1105. }
  1106. b := dAtA[iNdEx]
  1107. iNdEx++
  1108. m.Counter |= uint32(b&0x7F) << shift
  1109. if b < 0x80 {
  1110. break
  1111. }
  1112. }
  1113. case 4:
  1114. if wireType != 2 {
  1115. return fmt.Errorf("proto: wrong wireType = %d for field Ip6AndPorts", wireType)
  1116. }
  1117. var msglen int
  1118. for shift := uint(0); ; shift += 7 {
  1119. if shift >= 64 {
  1120. return ErrIntOverflowNebula
  1121. }
  1122. if iNdEx >= l {
  1123. return io.ErrUnexpectedEOF
  1124. }
  1125. b := dAtA[iNdEx]
  1126. iNdEx++
  1127. msglen |= int(b&0x7F) << shift
  1128. if b < 0x80 {
  1129. break
  1130. }
  1131. }
  1132. if msglen < 0 {
  1133. return ErrInvalidLengthNebula
  1134. }
  1135. postIndex := iNdEx + msglen
  1136. if postIndex < 0 {
  1137. return ErrInvalidLengthNebula
  1138. }
  1139. if postIndex > l {
  1140. return io.ErrUnexpectedEOF
  1141. }
  1142. m.Ip6AndPorts = append(m.Ip6AndPorts, &Ip6AndPort{})
  1143. if err := m.Ip6AndPorts[len(m.Ip6AndPorts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1144. return err
  1145. }
  1146. iNdEx = postIndex
  1147. default:
  1148. iNdEx = preIndex
  1149. skippy, err := skipNebula(dAtA[iNdEx:])
  1150. if err != nil {
  1151. return err
  1152. }
  1153. if (skippy < 0) || (iNdEx+skippy) < 0 {
  1154. return ErrInvalidLengthNebula
  1155. }
  1156. if (iNdEx + skippy) > l {
  1157. return io.ErrUnexpectedEOF
  1158. }
  1159. iNdEx += skippy
  1160. }
  1161. }
  1162. if iNdEx > l {
  1163. return io.ErrUnexpectedEOF
  1164. }
  1165. return nil
  1166. }
  1167. func (m *Ip4AndPort) Unmarshal(dAtA []byte) error {
  1168. l := len(dAtA)
  1169. iNdEx := 0
  1170. for iNdEx < l {
  1171. preIndex := iNdEx
  1172. var wire uint64
  1173. for shift := uint(0); ; shift += 7 {
  1174. if shift >= 64 {
  1175. return ErrIntOverflowNebula
  1176. }
  1177. if iNdEx >= l {
  1178. return io.ErrUnexpectedEOF
  1179. }
  1180. b := dAtA[iNdEx]
  1181. iNdEx++
  1182. wire |= uint64(b&0x7F) << shift
  1183. if b < 0x80 {
  1184. break
  1185. }
  1186. }
  1187. fieldNum := int32(wire >> 3)
  1188. wireType := int(wire & 0x7)
  1189. if wireType == 4 {
  1190. return fmt.Errorf("proto: Ip4AndPort: wiretype end group for non-group")
  1191. }
  1192. if fieldNum <= 0 {
  1193. return fmt.Errorf("proto: Ip4AndPort: illegal tag %d (wire type %d)", fieldNum, wire)
  1194. }
  1195. switch fieldNum {
  1196. case 1:
  1197. if wireType != 0 {
  1198. return fmt.Errorf("proto: wrong wireType = %d for field Ip", wireType)
  1199. }
  1200. m.Ip = 0
  1201. for shift := uint(0); ; shift += 7 {
  1202. if shift >= 64 {
  1203. return ErrIntOverflowNebula
  1204. }
  1205. if iNdEx >= l {
  1206. return io.ErrUnexpectedEOF
  1207. }
  1208. b := dAtA[iNdEx]
  1209. iNdEx++
  1210. m.Ip |= uint32(b&0x7F) << shift
  1211. if b < 0x80 {
  1212. break
  1213. }
  1214. }
  1215. case 2:
  1216. if wireType != 0 {
  1217. return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
  1218. }
  1219. m.Port = 0
  1220. for shift := uint(0); ; shift += 7 {
  1221. if shift >= 64 {
  1222. return ErrIntOverflowNebula
  1223. }
  1224. if iNdEx >= l {
  1225. return io.ErrUnexpectedEOF
  1226. }
  1227. b := dAtA[iNdEx]
  1228. iNdEx++
  1229. m.Port |= uint32(b&0x7F) << shift
  1230. if b < 0x80 {
  1231. break
  1232. }
  1233. }
  1234. default:
  1235. iNdEx = preIndex
  1236. skippy, err := skipNebula(dAtA[iNdEx:])
  1237. if err != nil {
  1238. return err
  1239. }
  1240. if (skippy < 0) || (iNdEx+skippy) < 0 {
  1241. return ErrInvalidLengthNebula
  1242. }
  1243. if (iNdEx + skippy) > l {
  1244. return io.ErrUnexpectedEOF
  1245. }
  1246. iNdEx += skippy
  1247. }
  1248. }
  1249. if iNdEx > l {
  1250. return io.ErrUnexpectedEOF
  1251. }
  1252. return nil
  1253. }
  1254. func (m *Ip6AndPort) Unmarshal(dAtA []byte) error {
  1255. l := len(dAtA)
  1256. iNdEx := 0
  1257. for iNdEx < l {
  1258. preIndex := iNdEx
  1259. var wire uint64
  1260. for shift := uint(0); ; shift += 7 {
  1261. if shift >= 64 {
  1262. return ErrIntOverflowNebula
  1263. }
  1264. if iNdEx >= l {
  1265. return io.ErrUnexpectedEOF
  1266. }
  1267. b := dAtA[iNdEx]
  1268. iNdEx++
  1269. wire |= uint64(b&0x7F) << shift
  1270. if b < 0x80 {
  1271. break
  1272. }
  1273. }
  1274. fieldNum := int32(wire >> 3)
  1275. wireType := int(wire & 0x7)
  1276. if wireType == 4 {
  1277. return fmt.Errorf("proto: Ip6AndPort: wiretype end group for non-group")
  1278. }
  1279. if fieldNum <= 0 {
  1280. return fmt.Errorf("proto: Ip6AndPort: illegal tag %d (wire type %d)", fieldNum, wire)
  1281. }
  1282. switch fieldNum {
  1283. case 1:
  1284. if wireType != 2 {
  1285. return fmt.Errorf("proto: wrong wireType = %d for field Ip", wireType)
  1286. }
  1287. var byteLen int
  1288. for shift := uint(0); ; shift += 7 {
  1289. if shift >= 64 {
  1290. return ErrIntOverflowNebula
  1291. }
  1292. if iNdEx >= l {
  1293. return io.ErrUnexpectedEOF
  1294. }
  1295. b := dAtA[iNdEx]
  1296. iNdEx++
  1297. byteLen |= int(b&0x7F) << shift
  1298. if b < 0x80 {
  1299. break
  1300. }
  1301. }
  1302. if byteLen < 0 {
  1303. return ErrInvalidLengthNebula
  1304. }
  1305. postIndex := iNdEx + byteLen
  1306. if postIndex < 0 {
  1307. return ErrInvalidLengthNebula
  1308. }
  1309. if postIndex > l {
  1310. return io.ErrUnexpectedEOF
  1311. }
  1312. m.Ip = append(m.Ip[:0], dAtA[iNdEx:postIndex]...)
  1313. if m.Ip == nil {
  1314. m.Ip = []byte{}
  1315. }
  1316. iNdEx = postIndex
  1317. case 2:
  1318. if wireType != 0 {
  1319. return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType)
  1320. }
  1321. m.Port = 0
  1322. for shift := uint(0); ; shift += 7 {
  1323. if shift >= 64 {
  1324. return ErrIntOverflowNebula
  1325. }
  1326. if iNdEx >= l {
  1327. return io.ErrUnexpectedEOF
  1328. }
  1329. b := dAtA[iNdEx]
  1330. iNdEx++
  1331. m.Port |= uint32(b&0x7F) << shift
  1332. if b < 0x80 {
  1333. break
  1334. }
  1335. }
  1336. default:
  1337. iNdEx = preIndex
  1338. skippy, err := skipNebula(dAtA[iNdEx:])
  1339. if err != nil {
  1340. return err
  1341. }
  1342. if (skippy < 0) || (iNdEx+skippy) < 0 {
  1343. return ErrInvalidLengthNebula
  1344. }
  1345. if (iNdEx + skippy) > l {
  1346. return io.ErrUnexpectedEOF
  1347. }
  1348. iNdEx += skippy
  1349. }
  1350. }
  1351. if iNdEx > l {
  1352. return io.ErrUnexpectedEOF
  1353. }
  1354. return nil
  1355. }
  1356. func (m *NebulaPing) Unmarshal(dAtA []byte) error {
  1357. l := len(dAtA)
  1358. iNdEx := 0
  1359. for iNdEx < l {
  1360. preIndex := iNdEx
  1361. var wire uint64
  1362. for shift := uint(0); ; shift += 7 {
  1363. if shift >= 64 {
  1364. return ErrIntOverflowNebula
  1365. }
  1366. if iNdEx >= l {
  1367. return io.ErrUnexpectedEOF
  1368. }
  1369. b := dAtA[iNdEx]
  1370. iNdEx++
  1371. wire |= uint64(b&0x7F) << shift
  1372. if b < 0x80 {
  1373. break
  1374. }
  1375. }
  1376. fieldNum := int32(wire >> 3)
  1377. wireType := int(wire & 0x7)
  1378. if wireType == 4 {
  1379. return fmt.Errorf("proto: NebulaPing: wiretype end group for non-group")
  1380. }
  1381. if fieldNum <= 0 {
  1382. return fmt.Errorf("proto: NebulaPing: illegal tag %d (wire type %d)", fieldNum, wire)
  1383. }
  1384. switch fieldNum {
  1385. case 1:
  1386. if wireType != 0 {
  1387. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  1388. }
  1389. m.Type = 0
  1390. for shift := uint(0); ; shift += 7 {
  1391. if shift >= 64 {
  1392. return ErrIntOverflowNebula
  1393. }
  1394. if iNdEx >= l {
  1395. return io.ErrUnexpectedEOF
  1396. }
  1397. b := dAtA[iNdEx]
  1398. iNdEx++
  1399. m.Type |= NebulaPing_MessageType(b&0x7F) << shift
  1400. if b < 0x80 {
  1401. break
  1402. }
  1403. }
  1404. case 2:
  1405. if wireType != 0 {
  1406. return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
  1407. }
  1408. m.Time = 0
  1409. for shift := uint(0); ; shift += 7 {
  1410. if shift >= 64 {
  1411. return ErrIntOverflowNebula
  1412. }
  1413. if iNdEx >= l {
  1414. return io.ErrUnexpectedEOF
  1415. }
  1416. b := dAtA[iNdEx]
  1417. iNdEx++
  1418. m.Time |= uint64(b&0x7F) << shift
  1419. if b < 0x80 {
  1420. break
  1421. }
  1422. }
  1423. default:
  1424. iNdEx = preIndex
  1425. skippy, err := skipNebula(dAtA[iNdEx:])
  1426. if err != nil {
  1427. return err
  1428. }
  1429. if (skippy < 0) || (iNdEx+skippy) < 0 {
  1430. return ErrInvalidLengthNebula
  1431. }
  1432. if (iNdEx + skippy) > l {
  1433. return io.ErrUnexpectedEOF
  1434. }
  1435. iNdEx += skippy
  1436. }
  1437. }
  1438. if iNdEx > l {
  1439. return io.ErrUnexpectedEOF
  1440. }
  1441. return nil
  1442. }
  1443. func (m *NebulaHandshake) Unmarshal(dAtA []byte) error {
  1444. l := len(dAtA)
  1445. iNdEx := 0
  1446. for iNdEx < l {
  1447. preIndex := iNdEx
  1448. var wire uint64
  1449. for shift := uint(0); ; shift += 7 {
  1450. if shift >= 64 {
  1451. return ErrIntOverflowNebula
  1452. }
  1453. if iNdEx >= l {
  1454. return io.ErrUnexpectedEOF
  1455. }
  1456. b := dAtA[iNdEx]
  1457. iNdEx++
  1458. wire |= uint64(b&0x7F) << shift
  1459. if b < 0x80 {
  1460. break
  1461. }
  1462. }
  1463. fieldNum := int32(wire >> 3)
  1464. wireType := int(wire & 0x7)
  1465. if wireType == 4 {
  1466. return fmt.Errorf("proto: NebulaHandshake: wiretype end group for non-group")
  1467. }
  1468. if fieldNum <= 0 {
  1469. return fmt.Errorf("proto: NebulaHandshake: illegal tag %d (wire type %d)", fieldNum, wire)
  1470. }
  1471. switch fieldNum {
  1472. case 1:
  1473. if wireType != 2 {
  1474. return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType)
  1475. }
  1476. var msglen int
  1477. for shift := uint(0); ; shift += 7 {
  1478. if shift >= 64 {
  1479. return ErrIntOverflowNebula
  1480. }
  1481. if iNdEx >= l {
  1482. return io.ErrUnexpectedEOF
  1483. }
  1484. b := dAtA[iNdEx]
  1485. iNdEx++
  1486. msglen |= int(b&0x7F) << shift
  1487. if b < 0x80 {
  1488. break
  1489. }
  1490. }
  1491. if msglen < 0 {
  1492. return ErrInvalidLengthNebula
  1493. }
  1494. postIndex := iNdEx + msglen
  1495. if postIndex < 0 {
  1496. return ErrInvalidLengthNebula
  1497. }
  1498. if postIndex > l {
  1499. return io.ErrUnexpectedEOF
  1500. }
  1501. if m.Details == nil {
  1502. m.Details = &NebulaHandshakeDetails{}
  1503. }
  1504. if err := m.Details.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1505. return err
  1506. }
  1507. iNdEx = postIndex
  1508. case 2:
  1509. if wireType != 2 {
  1510. return fmt.Errorf("proto: wrong wireType = %d for field Hmac", wireType)
  1511. }
  1512. var byteLen int
  1513. for shift := uint(0); ; shift += 7 {
  1514. if shift >= 64 {
  1515. return ErrIntOverflowNebula
  1516. }
  1517. if iNdEx >= l {
  1518. return io.ErrUnexpectedEOF
  1519. }
  1520. b := dAtA[iNdEx]
  1521. iNdEx++
  1522. byteLen |= int(b&0x7F) << shift
  1523. if b < 0x80 {
  1524. break
  1525. }
  1526. }
  1527. if byteLen < 0 {
  1528. return ErrInvalidLengthNebula
  1529. }
  1530. postIndex := iNdEx + byteLen
  1531. if postIndex < 0 {
  1532. return ErrInvalidLengthNebula
  1533. }
  1534. if postIndex > l {
  1535. return io.ErrUnexpectedEOF
  1536. }
  1537. m.Hmac = append(m.Hmac[:0], dAtA[iNdEx:postIndex]...)
  1538. if m.Hmac == nil {
  1539. m.Hmac = []byte{}
  1540. }
  1541. iNdEx = postIndex
  1542. default:
  1543. iNdEx = preIndex
  1544. skippy, err := skipNebula(dAtA[iNdEx:])
  1545. if err != nil {
  1546. return err
  1547. }
  1548. if (skippy < 0) || (iNdEx+skippy) < 0 {
  1549. return ErrInvalidLengthNebula
  1550. }
  1551. if (iNdEx + skippy) > l {
  1552. return io.ErrUnexpectedEOF
  1553. }
  1554. iNdEx += skippy
  1555. }
  1556. }
  1557. if iNdEx > l {
  1558. return io.ErrUnexpectedEOF
  1559. }
  1560. return nil
  1561. }
  1562. func (m *NebulaHandshakeDetails) Unmarshal(dAtA []byte) error {
  1563. l := len(dAtA)
  1564. iNdEx := 0
  1565. for iNdEx < l {
  1566. preIndex := iNdEx
  1567. var wire uint64
  1568. for shift := uint(0); ; shift += 7 {
  1569. if shift >= 64 {
  1570. return ErrIntOverflowNebula
  1571. }
  1572. if iNdEx >= l {
  1573. return io.ErrUnexpectedEOF
  1574. }
  1575. b := dAtA[iNdEx]
  1576. iNdEx++
  1577. wire |= uint64(b&0x7F) << shift
  1578. if b < 0x80 {
  1579. break
  1580. }
  1581. }
  1582. fieldNum := int32(wire >> 3)
  1583. wireType := int(wire & 0x7)
  1584. if wireType == 4 {
  1585. return fmt.Errorf("proto: NebulaHandshakeDetails: wiretype end group for non-group")
  1586. }
  1587. if fieldNum <= 0 {
  1588. return fmt.Errorf("proto: NebulaHandshakeDetails: illegal tag %d (wire type %d)", fieldNum, wire)
  1589. }
  1590. switch fieldNum {
  1591. case 1:
  1592. if wireType != 2 {
  1593. return fmt.Errorf("proto: wrong wireType = %d for field Cert", wireType)
  1594. }
  1595. var byteLen int
  1596. for shift := uint(0); ; shift += 7 {
  1597. if shift >= 64 {
  1598. return ErrIntOverflowNebula
  1599. }
  1600. if iNdEx >= l {
  1601. return io.ErrUnexpectedEOF
  1602. }
  1603. b := dAtA[iNdEx]
  1604. iNdEx++
  1605. byteLen |= int(b&0x7F) << shift
  1606. if b < 0x80 {
  1607. break
  1608. }
  1609. }
  1610. if byteLen < 0 {
  1611. return ErrInvalidLengthNebula
  1612. }
  1613. postIndex := iNdEx + byteLen
  1614. if postIndex < 0 {
  1615. return ErrInvalidLengthNebula
  1616. }
  1617. if postIndex > l {
  1618. return io.ErrUnexpectedEOF
  1619. }
  1620. m.Cert = append(m.Cert[:0], dAtA[iNdEx:postIndex]...)
  1621. if m.Cert == nil {
  1622. m.Cert = []byte{}
  1623. }
  1624. iNdEx = postIndex
  1625. case 2:
  1626. if wireType != 0 {
  1627. return fmt.Errorf("proto: wrong wireType = %d for field InitiatorIndex", wireType)
  1628. }
  1629. m.InitiatorIndex = 0
  1630. for shift := uint(0); ; shift += 7 {
  1631. if shift >= 64 {
  1632. return ErrIntOverflowNebula
  1633. }
  1634. if iNdEx >= l {
  1635. return io.ErrUnexpectedEOF
  1636. }
  1637. b := dAtA[iNdEx]
  1638. iNdEx++
  1639. m.InitiatorIndex |= uint32(b&0x7F) << shift
  1640. if b < 0x80 {
  1641. break
  1642. }
  1643. }
  1644. case 3:
  1645. if wireType != 0 {
  1646. return fmt.Errorf("proto: wrong wireType = %d for field ResponderIndex", wireType)
  1647. }
  1648. m.ResponderIndex = 0
  1649. for shift := uint(0); ; shift += 7 {
  1650. if shift >= 64 {
  1651. return ErrIntOverflowNebula
  1652. }
  1653. if iNdEx >= l {
  1654. return io.ErrUnexpectedEOF
  1655. }
  1656. b := dAtA[iNdEx]
  1657. iNdEx++
  1658. m.ResponderIndex |= uint32(b&0x7F) << shift
  1659. if b < 0x80 {
  1660. break
  1661. }
  1662. }
  1663. case 4:
  1664. if wireType != 0 {
  1665. return fmt.Errorf("proto: wrong wireType = %d for field Cookie", wireType)
  1666. }
  1667. m.Cookie = 0
  1668. for shift := uint(0); ; shift += 7 {
  1669. if shift >= 64 {
  1670. return ErrIntOverflowNebula
  1671. }
  1672. if iNdEx >= l {
  1673. return io.ErrUnexpectedEOF
  1674. }
  1675. b := dAtA[iNdEx]
  1676. iNdEx++
  1677. m.Cookie |= uint64(b&0x7F) << shift
  1678. if b < 0x80 {
  1679. break
  1680. }
  1681. }
  1682. case 5:
  1683. if wireType != 0 {
  1684. return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
  1685. }
  1686. m.Time = 0
  1687. for shift := uint(0); ; shift += 7 {
  1688. if shift >= 64 {
  1689. return ErrIntOverflowNebula
  1690. }
  1691. if iNdEx >= l {
  1692. return io.ErrUnexpectedEOF
  1693. }
  1694. b := dAtA[iNdEx]
  1695. iNdEx++
  1696. m.Time |= uint64(b&0x7F) << shift
  1697. if b < 0x80 {
  1698. break
  1699. }
  1700. }
  1701. default:
  1702. iNdEx = preIndex
  1703. skippy, err := skipNebula(dAtA[iNdEx:])
  1704. if err != nil {
  1705. return err
  1706. }
  1707. if (skippy < 0) || (iNdEx+skippy) < 0 {
  1708. return ErrInvalidLengthNebula
  1709. }
  1710. if (iNdEx + skippy) > l {
  1711. return io.ErrUnexpectedEOF
  1712. }
  1713. iNdEx += skippy
  1714. }
  1715. }
  1716. if iNdEx > l {
  1717. return io.ErrUnexpectedEOF
  1718. }
  1719. return nil
  1720. }
  1721. func skipNebula(dAtA []byte) (n int, err error) {
  1722. l := len(dAtA)
  1723. iNdEx := 0
  1724. depth := 0
  1725. for iNdEx < l {
  1726. var wire uint64
  1727. for shift := uint(0); ; shift += 7 {
  1728. if shift >= 64 {
  1729. return 0, ErrIntOverflowNebula
  1730. }
  1731. if iNdEx >= l {
  1732. return 0, io.ErrUnexpectedEOF
  1733. }
  1734. b := dAtA[iNdEx]
  1735. iNdEx++
  1736. wire |= (uint64(b) & 0x7F) << shift
  1737. if b < 0x80 {
  1738. break
  1739. }
  1740. }
  1741. wireType := int(wire & 0x7)
  1742. switch wireType {
  1743. case 0:
  1744. for shift := uint(0); ; shift += 7 {
  1745. if shift >= 64 {
  1746. return 0, ErrIntOverflowNebula
  1747. }
  1748. if iNdEx >= l {
  1749. return 0, io.ErrUnexpectedEOF
  1750. }
  1751. iNdEx++
  1752. if dAtA[iNdEx-1] < 0x80 {
  1753. break
  1754. }
  1755. }
  1756. case 1:
  1757. iNdEx += 8
  1758. case 2:
  1759. var length int
  1760. for shift := uint(0); ; shift += 7 {
  1761. if shift >= 64 {
  1762. return 0, ErrIntOverflowNebula
  1763. }
  1764. if iNdEx >= l {
  1765. return 0, io.ErrUnexpectedEOF
  1766. }
  1767. b := dAtA[iNdEx]
  1768. iNdEx++
  1769. length |= (int(b) & 0x7F) << shift
  1770. if b < 0x80 {
  1771. break
  1772. }
  1773. }
  1774. if length < 0 {
  1775. return 0, ErrInvalidLengthNebula
  1776. }
  1777. iNdEx += length
  1778. case 3:
  1779. depth++
  1780. case 4:
  1781. if depth == 0 {
  1782. return 0, ErrUnexpectedEndOfGroupNebula
  1783. }
  1784. depth--
  1785. case 5:
  1786. iNdEx += 4
  1787. default:
  1788. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1789. }
  1790. if iNdEx < 0 {
  1791. return 0, ErrInvalidLengthNebula
  1792. }
  1793. if depth == 0 {
  1794. return iNdEx, nil
  1795. }
  1796. }
  1797. return 0, io.ErrUnexpectedEOF
  1798. }
  1799. var (
  1800. ErrInvalidLengthNebula = fmt.Errorf("proto: negative length found during unmarshaling")
  1801. ErrIntOverflowNebula = fmt.Errorf("proto: integer overflow")
  1802. ErrUnexpectedEndOfGroupNebula = fmt.Errorf("proto: unexpected end of group")
  1803. )