| 1 |
// Code generated by protoc-gen-gogo. DO NOT EDIT. |
| 2 |
// source: nebula.proto |
| 3 |
|
| 4 |
package nebula |
| 5 |
|
| 6 |
import ( |
| 7 |
fmt "fmt" |
| 8 |
proto "github.com/gogo/protobuf/proto" |
| 9 |
io "io" |
| 10 |
math "math" |
| 11 |
math_bits "math/bits" |
| 12 |
) |
| 13 |
|
| 14 |
// Reference imports to suppress errors if they are not otherwise used. |
| 15 |
var _ = proto.Marshal |
| 16 |
var _ = fmt.Errorf |
| 17 |
var _ = math.Inf |
| 18 |
|
| 19 |
// This is a compile-time assertion to ensure that this generated file |
| 20 |
// is compatible with the proto package it is being compiled against. |
| 21 |
// A compilation error at this line likely means your copy of the |
| 22 |
// proto package needs to be updated. |
| 23 |
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package |
| 24 |
|
| 25 |
type NebulaMeta_MessageType int32 |
| 26 |
|
| 27 |
const ( |
| 28 |
NebulaMeta_None NebulaMeta_MessageType = 0 |
| 29 |
NebulaMeta_HostQuery NebulaMeta_MessageType = 1 |
| 30 |
NebulaMeta_HostQueryReply NebulaMeta_MessageType = 2 |
| 31 |
NebulaMeta_HostUpdateNotification NebulaMeta_MessageType = 3 |
| 32 |
NebulaMeta_HostMovedNotification NebulaMeta_MessageType = 4 |
| 33 |
NebulaMeta_HostPunchNotification NebulaMeta_MessageType = 5 |
| 34 |
NebulaMeta_HostWhoami NebulaMeta_MessageType = 6 |
| 35 |
NebulaMeta_HostWhoamiReply NebulaMeta_MessageType = 7 |
| 36 |
NebulaMeta_PathCheck NebulaMeta_MessageType = 8 |
| 37 |
NebulaMeta_PathCheckReply NebulaMeta_MessageType = 9 |
| 38 |
NebulaMeta_HostUpdateNotificationAck NebulaMeta_MessageType = 10 |
| 39 |
) |
| 40 |
|
| 41 |
var NebulaMeta_MessageType_name = map[int32]string{ |
| 42 |
0: "None", |
| 43 |
1: "HostQuery", |
| 44 |
2: "HostQueryReply", |
| 45 |
3: "HostUpdateNotification", |
| 46 |
4: "HostMovedNotification", |
| 47 |
5: "HostPunchNotification", |
| 48 |
6: "HostWhoami", |
| 49 |
7: "HostWhoamiReply", |
| 50 |
8: "PathCheck", |
| 51 |
9: "PathCheckReply", |
| 52 |
10: "HostUpdateNotificationAck", |
| 53 |
} |
| 54 |
|
| 55 |
var NebulaMeta_MessageType_value = map[string]int32{ |
| 56 |
"None": 0, |
| 57 |
"HostQuery": 1, |
| 58 |
"HostQueryReply": 2, |
| 59 |
"HostUpdateNotification": 3, |
| 60 |
"HostMovedNotification": 4, |
| 61 |
"HostPunchNotification": 5, |
| 62 |
"HostWhoami": 6, |
| 63 |
"HostWhoamiReply": 7, |
| 64 |
"PathCheck": 8, |
| 65 |
"PathCheckReply": 9, |
| 66 |
"HostUpdateNotificationAck": 10, |
| 67 |
} |
| 68 |
|
| 69 |
func (x NebulaMeta_MessageType) String() string { |
| 70 |
return proto.EnumName(NebulaMeta_MessageType_name, int32(x)) |
| 71 |
} |
| 72 |
|
| 73 |
func (NebulaMeta_MessageType) EnumDescriptor() ([]byte, []int) { |
| 74 |
return fileDescriptor_2d65afa7693df5ef, []int{0, 0} |
| 75 |
} |
| 76 |
|
| 77 |
type NebulaPing_MessageType int32 |
| 78 |
|
| 79 |
const ( |
| 80 |
NebulaPing_Ping NebulaPing_MessageType = 0 |
| 81 |
NebulaPing_Reply NebulaPing_MessageType = 1 |
| 82 |
) |
| 83 |
|
| 84 |
var NebulaPing_MessageType_name = map[int32]string{ |
| 85 |
0: "Ping", |
| 86 |
1: "Reply", |
| 87 |
} |
| 88 |
|
| 89 |
var NebulaPing_MessageType_value = map[string]int32{ |
| 90 |
"Ping": 0, |
| 91 |
"Reply": 1, |
| 92 |
} |
| 93 |
|
| 94 |
func (x NebulaPing_MessageType) String() string { |
| 95 |
return proto.EnumName(NebulaPing_MessageType_name, int32(x)) |
| 96 |
} |
| 97 |
|
| 98 |
func (NebulaPing_MessageType) EnumDescriptor() ([]byte, []int) { |
| 99 |
return fileDescriptor_2d65afa7693df5ef, []int{5, 0} |
| 100 |
} |
| 101 |
|
| 102 |
type NebulaControl_MessageType int32 |
| 103 |
|
| 104 |
const ( |
| 105 |
NebulaControl_None NebulaControl_MessageType = 0 |
| 106 |
NebulaControl_CreateRelayRequest NebulaControl_MessageType = 1 |
| 107 |
NebulaControl_CreateRelayResponse NebulaControl_MessageType = 2 |
| 108 |
) |
| 109 |
|
| 110 |
var NebulaControl_MessageType_name = map[int32]string{ |
| 111 |
0: "None", |
| 112 |
1: "CreateRelayRequest", |
| 113 |
2: "CreateRelayResponse", |
| 114 |
} |
| 115 |
|
| 116 |
var NebulaControl_MessageType_value = map[string]int32{ |
| 117 |
"None": 0, |
| 118 |
"CreateRelayRequest": 1, |
| 119 |
"CreateRelayResponse": 2, |
| 120 |
} |
| 121 |
|
| 122 |
func (x NebulaControl_MessageType) String() string { |
| 123 |
return proto.EnumName(NebulaControl_MessageType_name, int32(x)) |
| 124 |
} |
| 125 |
|
| 126 |
func (NebulaControl_MessageType) EnumDescriptor() ([]byte, []int) { |
| 127 |
return fileDescriptor_2d65afa7693df5ef, []int{6, 0} |
| 128 |
} |
| 129 |
|
| 130 |
type NebulaMeta struct { |
| 131 |
Type NebulaMeta_MessageType `protobuf:"varint,1,opt,name=Type,proto3,enum=nebula.NebulaMeta_MessageType" json:"Type,omitempty"` |
| 132 |
Details *NebulaMetaDetails `protobuf:"bytes,2,opt,name=Details,proto3" json:"Details,omitempty"` |
| 133 |
} |
| 134 |
|
| 135 |
func (m *NebulaMeta) Reset() { *m = NebulaMeta{} } |
| 136 |
func (m *NebulaMeta) String() string { return proto.CompactTextString(m) } |
| 137 |
func (*NebulaMeta) ProtoMessage() {} |
| 138 |
func (*NebulaMeta) Descriptor() ([]byte, []int) { |
| 139 |
return fileDescriptor_2d65afa7693df5ef, []int{0} |
| 140 |
} |
| 141 |
func (m *NebulaMeta) XXX_Unmarshal(b []byte) error { |
| 142 |
return m.Unmarshal(b) |
| 143 |
} |
| 144 |
func (m *NebulaMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 145 |
if deterministic { |
| 146 |
return xxx_messageInfo_NebulaMeta.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 *NebulaMeta) XXX_Merge(src proto.Message) { |
| 157 |
xxx_messageInfo_NebulaMeta.Merge(m, src) |
| 158 |
} |
| 159 |
func (m *NebulaMeta) XXX_Size() int { |
| 160 |
return m.Size() |
| 161 |
} |
| 162 |
func (m *NebulaMeta) XXX_DiscardUnknown() { |
| 163 |
xxx_messageInfo_NebulaMeta.DiscardUnknown(m) |
| 164 |
} |
| 165 |
|
| 166 |
var xxx_messageInfo_NebulaMeta proto.InternalMessageInfo |
| 167 |
|
| 168 |
func (m *NebulaMeta) GetType() NebulaMeta_MessageType { |
| 169 |
if m != nil { |
| 170 |
return m.Type |
| 171 |
} |
| 172 |
return NebulaMeta_None |
| 173 |
} |
| 174 |
|
| 175 |
func (m *NebulaMeta) GetDetails() *NebulaMetaDetails { |
| 176 |
if m != nil { |
| 177 |
return m.Details |
| 178 |
} |
| 179 |
return nil |
| 180 |
} |
| 181 |
|
| 182 |
type NebulaMetaDetails struct { |
| 183 |
OldVpnAddr uint32 `protobuf:"varint,1,opt,name=OldVpnAddr,proto3" json:"OldVpnAddr,omitempty"` // Deprecated: Do not use. |
| 184 |
VpnAddr *Addr `protobuf:"bytes,6,opt,name=VpnAddr,proto3" json:"VpnAddr,omitempty"` |
| 185 |
OldRelayVpnAddrs []uint32 `protobuf:"varint,5,rep,packed,name=OldRelayVpnAddrs,proto3" json:"OldRelayVpnAddrs,omitempty"` // Deprecated: Do not use. |
| 186 |
RelayVpnAddrs []*Addr `protobuf:"bytes,7,rep,name=RelayVpnAddrs,proto3" json:"RelayVpnAddrs,omitempty"` |
| 187 |
V4AddrPorts []*V4AddrPort `protobuf:"bytes,2,rep,name=V4AddrPorts,proto3" json:"V4AddrPorts,omitempty"` |
| 188 |
V6AddrPorts []*V6AddrPort `protobuf:"bytes,4,rep,name=V6AddrPorts,proto3" json:"V6AddrPorts,omitempty"` |
| 189 |
Counter uint32 `protobuf:"varint,3,opt,name=counter,proto3" json:"counter,omitempty"` |
| 190 |
} |
| 191 |
|
| 192 |
func (m *NebulaMetaDetails) Reset() { *m = NebulaMetaDetails{} } |
| 193 |
func (m *NebulaMetaDetails) String() string { return proto.CompactTextString(m) } |
| 194 |
func (*NebulaMetaDetails) ProtoMessage() {} |
| 195 |
func (*NebulaMetaDetails) Descriptor() ([]byte, []int) { |
| 196 |
return fileDescriptor_2d65afa7693df5ef, []int{1} |
| 197 |
} |
| 198 |
func (m *NebulaMetaDetails) XXX_Unmarshal(b []byte) error { |
| 199 |
return m.Unmarshal(b) |
| 200 |
} |
| 201 |
func (m *NebulaMetaDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 202 |
if deterministic { |
| 203 |
return xxx_messageInfo_NebulaMetaDetails.Marshal(b, m, deterministic) |
| 204 |
} else { |
| 205 |
b = b[:cap(b)] |
| 206 |
n, err := m.MarshalToSizedBuffer(b) |
| 207 |
if err != nil { |
| 208 |
return nil, err |
| 209 |
} |
| 210 |
return b[:n], nil |
| 211 |
} |
| 212 |
} |
| 213 |
func (m *NebulaMetaDetails) XXX_Merge(src proto.Message) { |
| 214 |
xxx_messageInfo_NebulaMetaDetails.Merge(m, src) |
| 215 |
} |
| 216 |
func (m *NebulaMetaDetails) XXX_Size() int { |
| 217 |
return m.Size() |
| 218 |
} |
| 219 |
func (m *NebulaMetaDetails) XXX_DiscardUnknown() { |
| 220 |
xxx_messageInfo_NebulaMetaDetails.DiscardUnknown(m) |
| 221 |
} |
| 222 |
|
| 223 |
var xxx_messageInfo_NebulaMetaDetails proto.InternalMessageInfo |
| 224 |
|
| 225 |
// Deprecated: Do not use. |
| 226 |
func (m *NebulaMetaDetails) GetOldVpnAddr() uint32 { |
| 227 |
if m != nil { |
| 228 |
return m.OldVpnAddr |
| 229 |
} |
| 230 |
return 0 |
| 231 |
} |
| 232 |
|
| 233 |
func (m *NebulaMetaDetails) GetVpnAddr() *Addr { |
| 234 |
if m != nil { |
| 235 |
return m.VpnAddr |
| 236 |
} |
| 237 |
return nil |
| 238 |
} |
| 239 |
|
| 240 |
// Deprecated: Do not use. |
| 241 |
func (m *NebulaMetaDetails) GetOldRelayVpnAddrs() []uint32 { |
| 242 |
if m != nil { |
| 243 |
return m.OldRelayVpnAddrs |
| 244 |
} |
| 245 |
return nil |
| 246 |
} |
| 247 |
|
| 248 |
func (m *NebulaMetaDetails) GetRelayVpnAddrs() []*Addr { |
| 249 |
if m != nil { |
| 250 |
return m.RelayVpnAddrs |
| 251 |
} |
| 252 |
return nil |
| 253 |
} |
| 254 |
|
| 255 |
func (m *NebulaMetaDetails) GetV4AddrPorts() []*V4AddrPort { |
| 256 |
if m != nil { |
| 257 |
return m.V4AddrPorts |
| 258 |
} |
| 259 |
return nil |
| 260 |
} |
| 261 |
|
| 262 |
func (m *NebulaMetaDetails) GetV6AddrPorts() []*V6AddrPort { |
| 263 |
if m != nil { |
| 264 |
return m.V6AddrPorts |
| 265 |
} |
| 266 |
return nil |
| 267 |
} |
| 268 |
|
| 269 |
func (m *NebulaMetaDetails) GetCounter() uint32 { |
| 270 |
if m != nil { |
| 271 |
return m.Counter |
| 272 |
} |
| 273 |
return 0 |
| 274 |
} |
| 275 |
|
| 276 |
type Addr struct { |
| 277 |
Hi uint64 `protobuf:"varint,1,opt,name=Hi,proto3" json:"Hi,omitempty"` |
| 278 |
Lo uint64 `protobuf:"varint,2,opt,name=Lo,proto3" json:"Lo,omitempty"` |
| 279 |
} |
| 280 |
|
| 281 |
func (m *Addr) Reset() { *m = Addr{} } |
| 282 |
func (m *Addr) String() string { return proto.CompactTextString(m) } |
| 283 |
func (*Addr) ProtoMessage() {} |
| 284 |
func (*Addr) Descriptor() ([]byte, []int) { |
| 285 |
return fileDescriptor_2d65afa7693df5ef, []int{2} |
| 286 |
} |
| 287 |
func (m *Addr) XXX_Unmarshal(b []byte) error { |
| 288 |
return m.Unmarshal(b) |
| 289 |
} |
| 290 |
func (m *Addr) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 291 |
if deterministic { |
| 292 |
return xxx_messageInfo_Addr.Marshal(b, m, deterministic) |
| 293 |
} else { |
| 294 |
b = b[:cap(b)] |
| 295 |
n, err := m.MarshalToSizedBuffer(b) |
| 296 |
if err != nil { |
| 297 |
return nil, err |
| 298 |
} |
| 299 |
return b[:n], nil |
| 300 |
} |
| 301 |
} |
| 302 |
func (m *Addr) XXX_Merge(src proto.Message) { |
| 303 |
xxx_messageInfo_Addr.Merge(m, src) |
| 304 |
} |
| 305 |
func (m *Addr) XXX_Size() int { |
| 306 |
return m.Size() |
| 307 |
} |
| 308 |
func (m *Addr) XXX_DiscardUnknown() { |
| 309 |
xxx_messageInfo_Addr.DiscardUnknown(m) |
| 310 |
} |
| 311 |
|
| 312 |
var xxx_messageInfo_Addr proto.InternalMessageInfo |
| 313 |
|
| 314 |
func (m *Addr) GetHi() uint64 { |
| 315 |
if m != nil { |
| 316 |
return m.Hi |
| 317 |
} |
| 318 |
return 0 |
| 319 |
} |
| 320 |
|
| 321 |
func (m *Addr) GetLo() uint64 { |
| 322 |
if m != nil { |
| 323 |
return m.Lo |
| 324 |
} |
| 325 |
return 0 |
| 326 |
} |
| 327 |
|
| 328 |
type V4AddrPort struct { |
| 329 |
Addr uint32 `protobuf:"varint,1,opt,name=Addr,proto3" json:"Addr,omitempty"` |
| 330 |
Port uint32 `protobuf:"varint,2,opt,name=Port,proto3" json:"Port,omitempty"` |
| 331 |
} |
| 332 |
|
| 333 |
func (m *V4AddrPort) Reset() { *m = V4AddrPort{} } |
| 334 |
func (m *V4AddrPort) String() string { return proto.CompactTextString(m) } |
| 335 |
func (*V4AddrPort) ProtoMessage() {} |
| 336 |
func (*V4AddrPort) Descriptor() ([]byte, []int) { |
| 337 |
return fileDescriptor_2d65afa7693df5ef, []int{3} |
| 338 |
} |
| 339 |
func (m *V4AddrPort) XXX_Unmarshal(b []byte) error { |
| 340 |
return m.Unmarshal(b) |
| 341 |
} |
| 342 |
func (m *V4AddrPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 343 |
if deterministic { |
| 344 |
return xxx_messageInfo_V4AddrPort.Marshal(b, m, deterministic) |
| 345 |
} else { |
| 346 |
b = b[:cap(b)] |
| 347 |
n, err := m.MarshalToSizedBuffer(b) |
| 348 |
if err != nil { |
| 349 |
return nil, err |
| 350 |
} |
| 351 |
return b[:n], nil |
| 352 |
} |
| 353 |
} |
| 354 |
func (m *V4AddrPort) XXX_Merge(src proto.Message) { |
| 355 |
xxx_messageInfo_V4AddrPort.Merge(m, src) |
| 356 |
} |
| 357 |
func (m *V4AddrPort) XXX_Size() int { |
| 358 |
return m.Size() |
| 359 |
} |
| 360 |
func (m *V4AddrPort) XXX_DiscardUnknown() { |
| 361 |
xxx_messageInfo_V4AddrPort.DiscardUnknown(m) |
| 362 |
} |
| 363 |
|
| 364 |
var xxx_messageInfo_V4AddrPort proto.InternalMessageInfo |
| 365 |
|
| 366 |
func (m *V4AddrPort) GetAddr() uint32 { |
| 367 |
if m != nil { |
| 368 |
return m.Addr |
| 369 |
} |
| 370 |
return 0 |
| 371 |
} |
| 372 |
|
| 373 |
func (m *V4AddrPort) GetPort() uint32 { |
| 374 |
if m != nil { |
| 375 |
return m.Port |
| 376 |
} |
| 377 |
return 0 |
| 378 |
} |
| 379 |
|
| 380 |
type V6AddrPort struct { |
| 381 |
Hi uint64 `protobuf:"varint,1,opt,name=Hi,proto3" json:"Hi,omitempty"` |
| 382 |
Lo uint64 `protobuf:"varint,2,opt,name=Lo,proto3" json:"Lo,omitempty"` |
| 383 |
Port uint32 `protobuf:"varint,3,opt,name=Port,proto3" json:"Port,omitempty"` |
| 384 |
} |
| 385 |
|
| 386 |
func (m *V6AddrPort) Reset() { *m = V6AddrPort{} } |
| 387 |
func (m *V6AddrPort) String() string { return proto.CompactTextString(m) } |
| 388 |
func (*V6AddrPort) ProtoMessage() {} |
| 389 |
func (*V6AddrPort) Descriptor() ([]byte, []int) { |
| 390 |
return fileDescriptor_2d65afa7693df5ef, []int{4} |
| 391 |
} |
| 392 |
func (m *V6AddrPort) XXX_Unmarshal(b []byte) error { |
| 393 |
return m.Unmarshal(b) |
| 394 |
} |
| 395 |
func (m *V6AddrPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 396 |
if deterministic { |
| 397 |
return xxx_messageInfo_V6AddrPort.Marshal(b, m, deterministic) |
| 398 |
} else { |
| 399 |
b = b[:cap(b)] |
| 400 |
n, err := m.MarshalToSizedBuffer(b) |
| 401 |
if err != nil { |
| 402 |
return nil, err |
| 403 |
} |
| 404 |
return b[:n], nil |
| 405 |
} |
| 406 |
} |
| 407 |
func (m *V6AddrPort) XXX_Merge(src proto.Message) { |
| 408 |
xxx_messageInfo_V6AddrPort.Merge(m, src) |
| 409 |
} |
| 410 |
func (m *V6AddrPort) XXX_Size() int { |
| 411 |
return m.Size() |
| 412 |
} |
| 413 |
func (m *V6AddrPort) XXX_DiscardUnknown() { |
| 414 |
xxx_messageInfo_V6AddrPort.DiscardUnknown(m) |
| 415 |
} |
| 416 |
|
| 417 |
var xxx_messageInfo_V6AddrPort proto.InternalMessageInfo |
| 418 |
|
| 419 |
func (m *V6AddrPort) GetHi() uint64 { |
| 420 |
if m != nil { |
| 421 |
return m.Hi |
| 422 |
} |
| 423 |
return 0 |
| 424 |
} |
| 425 |
|
| 426 |
func (m *V6AddrPort) GetLo() uint64 { |
| 427 |
if m != nil { |
| 428 |
return m.Lo |
| 429 |
} |
| 430 |
return 0 |
| 431 |
} |
| 432 |
|
| 433 |
func (m *V6AddrPort) GetPort() uint32 { |
| 434 |
if m != nil { |
| 435 |
return m.Port |
| 436 |
} |
| 437 |
return 0 |
| 438 |
} |
| 439 |
|
| 440 |
type NebulaPing struct { |
| 441 |
Type NebulaPing_MessageType `protobuf:"varint,1,opt,name=Type,proto3,enum=nebula.NebulaPing_MessageType" json:"Type,omitempty"` |
| 442 |
Time uint64 `protobuf:"varint,2,opt,name=Time,proto3" json:"Time,omitempty"` |
| 443 |
} |
| 444 |
|
| 445 |
func (m *NebulaPing) Reset() { *m = NebulaPing{} } |
| 446 |
func (m *NebulaPing) String() string { return proto.CompactTextString(m) } |
| 447 |
func (*NebulaPing) ProtoMessage() {} |
| 448 |
func (*NebulaPing) Descriptor() ([]byte, []int) { |
| 449 |
return fileDescriptor_2d65afa7693df5ef, []int{5} |
| 450 |
} |
| 451 |
func (m *NebulaPing) XXX_Unmarshal(b []byte) error { |
| 452 |
return m.Unmarshal(b) |
| 453 |
} |
| 454 |
func (m *NebulaPing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 455 |
if deterministic { |
| 456 |
return xxx_messageInfo_NebulaPing.Marshal(b, m, deterministic) |
| 457 |
} else { |
| 458 |
b = b[:cap(b)] |
| 459 |
n, err := m.MarshalToSizedBuffer(b) |
| 460 |
if err != nil { |
| 461 |
return nil, err |
| 462 |
} |
| 463 |
return b[:n], nil |
| 464 |
} |
| 465 |
} |
| 466 |
func (m *NebulaPing) XXX_Merge(src proto.Message) { |
| 467 |
xxx_messageInfo_NebulaPing.Merge(m, src) |
| 468 |
} |
| 469 |
func (m *NebulaPing) XXX_Size() int { |
| 470 |
return m.Size() |
| 471 |
} |
| 472 |
func (m *NebulaPing) XXX_DiscardUnknown() { |
| 473 |
xxx_messageInfo_NebulaPing.DiscardUnknown(m) |
| 474 |
} |
| 475 |
|
| 476 |
var xxx_messageInfo_NebulaPing proto.InternalMessageInfo |
| 477 |
|
| 478 |
func (m *NebulaPing) GetType() NebulaPing_MessageType { |
| 479 |
if m != nil { |
| 480 |
return m.Type |
| 481 |
} |
| 482 |
return NebulaPing_Ping |
| 483 |
} |
| 484 |
|
| 485 |
func (m *NebulaPing) GetTime() uint64 { |
| 486 |
if m != nil { |
| 487 |
return m.Time |
| 488 |
} |
| 489 |
return 0 |
| 490 |
} |
| 491 |
|
| 492 |
type NebulaControl struct { |
| 493 |
Type NebulaControl_MessageType `protobuf:"varint,1,opt,name=Type,proto3,enum=nebula.NebulaControl_MessageType" json:"Type,omitempty"` |
| 494 |
InitiatorRelayIndex uint32 `protobuf:"varint,2,opt,name=InitiatorRelayIndex,proto3" json:"InitiatorRelayIndex,omitempty"` |
| 495 |
ResponderRelayIndex uint32 `protobuf:"varint,3,opt,name=ResponderRelayIndex,proto3" json:"ResponderRelayIndex,omitempty"` |
| 496 |
OldRelayToAddr uint32 `protobuf:"varint,4,opt,name=OldRelayToAddr,proto3" json:"OldRelayToAddr,omitempty"` // Deprecated: Do not use. |
| 497 |
OldRelayFromAddr uint32 `protobuf:"varint,5,opt,name=OldRelayFromAddr,proto3" json:"OldRelayFromAddr,omitempty"` // Deprecated: Do not use. |
| 498 |
RelayToAddr *Addr `protobuf:"bytes,6,opt,name=RelayToAddr,proto3" json:"RelayToAddr,omitempty"` |
| 499 |
RelayFromAddr *Addr `protobuf:"bytes,7,opt,name=RelayFromAddr,proto3" json:"RelayFromAddr,omitempty"` |
| 500 |
} |
| 501 |
|
| 502 |
func (m *NebulaControl) Reset() { *m = NebulaControl{} } |
| 503 |
func (m *NebulaControl) String() string { return proto.CompactTextString(m) } |
| 504 |
func (*NebulaControl) ProtoMessage() {} |
| 505 |
func (*NebulaControl) Descriptor() ([]byte, []int) { |
| 506 |
return fileDescriptor_2d65afa7693df5ef, []int{6} |
| 507 |
} |
| 508 |
func (m *NebulaControl) XXX_Unmarshal(b []byte) error { |
| 509 |
return m.Unmarshal(b) |
| 510 |
} |
| 511 |
func (m *NebulaControl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| 512 |
if deterministic { |
| 513 |
return xxx_messageInfo_NebulaControl.Marshal(b, m, deterministic) |
| 514 |
} else { |
| 515 |
b = b[:cap(b)] |
| 516 |
n, err := m.MarshalToSizedBuffer(b) |
| 517 |
if err != nil { |
| 518 |
return nil, err |
| 519 |
} |
| 520 |
return b[:n], nil |
| 521 |
} |
| 522 |
} |
| 523 |
func (m *NebulaControl) XXX_Merge(src proto.Message) { |
| 524 |
xxx_messageInfo_NebulaControl.Merge(m, src) |
| 525 |
} |
| 526 |
func (m *NebulaControl) XXX_Size() int { |
| 527 |
return m.Size() |
| 528 |
} |
| 529 |
func (m *NebulaControl) XXX_DiscardUnknown() { |
| 530 |
xxx_messageInfo_NebulaControl.DiscardUnknown(m) |
| 531 |
} |
| 532 |
|
| 533 |
var xxx_messageInfo_NebulaControl proto.InternalMessageInfo |
| 534 |
|
| 535 |
func (m *NebulaControl) GetType() NebulaControl_MessageType { |
| 536 |
if m != nil { |
| 537 |
return m.Type |
| 538 |
} |
| 539 |
return NebulaControl_None |
| 540 |
} |
| 541 |
|
| 542 |
func (m *NebulaControl) GetInitiatorRelayIndex() uint32 { |
| 543 |
if m != nil { |
| 544 |
return m.InitiatorRelayIndex |
| 545 |
} |
| 546 |
return 0 |
| 547 |
} |
| 548 |
|
| 549 |
func (m *NebulaControl) GetResponderRelayIndex() uint32 { |
| 550 |
if m != nil { |
| 551 |
return m.ResponderRelayIndex |
| 552 |
} |
| 553 |
return 0 |
| 554 |
} |
| 555 |
|
| 556 |
// Deprecated: Do not use. |
| 557 |
func (m *NebulaControl) GetOldRelayToAddr() uint32 { |
| 558 |
if m != nil { |
| 559 |
return m.OldRelayToAddr |
| 560 |
} |
| 561 |
return 0 |
| 562 |
} |
| 563 |
|
| 564 |
// Deprecated: Do not use. |
| 565 |
func (m *NebulaControl) GetOldRelayFromAddr() uint32 { |
| 566 |
if m != nil { |
| 567 |
return m.OldRelayFromAddr |
| 568 |
} |
| 569 |
return 0 |
| 570 |
} |
| 571 |
|
| 572 |
func (m *NebulaControl) GetRelayToAddr() *Addr { |
| 573 |
if m != nil { |
| 574 |
return m.RelayToAddr |
| 575 |
} |
| 576 |
return nil |
| 577 |
} |
| 578 |
|
| 579 |
func (m *NebulaControl) GetRelayFromAddr() *Addr { |
| 580 |
if m != nil { |
| 581 |
return m.RelayFromAddr |
| 582 |
} |
| 583 |
return nil |
| 584 |
} |
| 585 |
|
| 586 |
func init() { |
| 587 |
proto.RegisterEnum("nebula.NebulaMeta_MessageType", NebulaMeta_MessageType_name, NebulaMeta_MessageType_value) |
| 588 |
proto.RegisterEnum("nebula.NebulaPing_MessageType", NebulaPing_MessageType_name, NebulaPing_MessageType_value) |
| 589 |
proto.RegisterEnum("nebula.NebulaControl_MessageType", NebulaControl_MessageType_name, NebulaControl_MessageType_value) |
| 590 |
proto.RegisterType((*NebulaMeta)(nil), "nebula.NebulaMeta") |
| 591 |
proto.RegisterType((*NebulaMetaDetails)(nil), "nebula.NebulaMetaDetails") |
| 592 |
proto.RegisterType((*Addr)(nil), "nebula.Addr") |
| 593 |
proto.RegisterType((*V4AddrPort)(nil), "nebula.V4AddrPort") |
| 594 |
proto.RegisterType((*V6AddrPort)(nil), "nebula.V6AddrPort") |
| 595 |
proto.RegisterType((*NebulaPing)(nil), "nebula.NebulaPing") |
| 596 |
proto.RegisterType((*NebulaControl)(nil), "nebula.NebulaControl") |
| 597 |
} |
| 598 |
|
| 599 |
func init() { proto.RegisterFile("nebula.proto", fileDescriptor_2d65afa7693df5ef) } |
| 600 |
|
| 601 |
var fileDescriptor_2d65afa7693df5ef = []byte{ |
| 602 |
// 665 bytes of a gzipped FileDescriptorProto |
| 603 |
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0xcd, 0x6e, 0xd3, 0x5c, |
| 604 |
0x10, 0x8d, 0x1d, 0x27, 0x69, 0x27, 0x4d, 0x3e, 0x7f, 0x53, 0x51, 0x12, 0x24, 0xac, 0xe0, 0x45, |
| 605 |
0x55, 0xb1, 0x48, 0x51, 0x5a, 0xba, 0xa6, 0x2d, 0x42, 0xa9, 0xd4, 0x9f, 0x70, 0x55, 0x8a, 0xc4, |
| 606 |
0xce, 0xb5, 0x2f, 0x8d, 0x55, 0xc7, 0x37, 0xb5, 0x6f, 0x50, 0xf3, 0x16, 0x3c, 0x0c, 0x0f, 0x01, |
| 607 |
0xbb, 0x2e, 0x59, 0xa2, 0x66, 0xc9, 0x92, 0x17, 0x40, 0xf7, 0xfa, 0xbf, 0x31, 0xb0, 0xbb, 0x33, |
| 608 |
0xe7, 0x9c, 0x99, 0xc9, 0xc9, 0x8c, 0x61, 0xcd, 0xa7, 0x97, 0x33, 0xcf, 0xea, 0x4f, 0x03, 0xc6, |
| 609 |
0x19, 0xd6, 0xa3, 0xc8, 0xfc, 0xa9, 0x02, 0x9c, 0xca, 0xe7, 0x09, 0xe5, 0x16, 0x0e, 0x40, 0x3b, |
| 610 |
0x9f, 0x4f, 0x69, 0x47, 0xe9, 0x29, 0x5b, 0xed, 0x81, 0xd1, 0x8f, 0x35, 0x19, 0xa3, 0x7f, 0x42, |
| 611 |
0xc3, 0xd0, 0xba, 0xa2, 0x82, 0x45, 0x24, 0x17, 0x77, 0xa0, 0xf1, 0x9a, 0x72, 0xcb, 0xf5, 0xc2, |
| 612 |
0x8e, 0xda, 0x53, 0xb6, 0x9a, 0x83, 0xee, 0xb2, 0x2c, 0x26, 0x90, 0x84, 0x69, 0xfe, 0x52, 0xa0, |
| 613 |
0x99, 0x2b, 0x85, 0x2b, 0xa0, 0x9d, 0x32, 0x9f, 0xea, 0x15, 0x6c, 0xc1, 0xea, 0x90, 0x85, 0xfc, |
| 614 |
0xed, 0x8c, 0x06, 0x73, 0x5d, 0x41, 0x84, 0x76, 0x1a, 0x12, 0x3a, 0xf5, 0xe6, 0xba, 0x8a, 0x4f, |
| 615 |
0x60, 0x43, 0xe4, 0xde, 0x4d, 0x1d, 0x8b, 0xd3, 0x53, 0xc6, 0xdd, 0x8f, 0xae, 0x6d, 0x71, 0x97, |
| 616 |
0xf9, 0x7a, 0x15, 0xbb, 0xf0, 0x48, 0x60, 0x27, 0xec, 0x13, 0x75, 0x0a, 0x90, 0x96, 0x40, 0xa3, |
| 617 |
0x99, 0x6f, 0x8f, 0x0b, 0x50, 0x0d, 0xdb, 0x00, 0x02, 0x7a, 0x3f, 0x66, 0xd6, 0xc4, 0xd5, 0xeb, |
| 618 |
0xb8, 0x0e, 0xff, 0x65, 0x71, 0xd4, 0xb6, 0x21, 0x26, 0x1b, 0x59, 0x7c, 0x7c, 0x38, 0xa6, 0xf6, |
| 619 |
0xb5, 0xbe, 0x22, 0x26, 0x4b, 0xc3, 0x88, 0xb2, 0x8a, 0x4f, 0xa1, 0x5b, 0x3e, 0xd9, 0xbe, 0x7d, |
| 620 |
0xad, 0x83, 0xf9, 0x4d, 0x85, 0xff, 0x97, 0x4c, 0x41, 0x13, 0xe0, 0xcc, 0x73, 0x2e, 0xa6, 0xfe, |
| 621 |
0xbe, 0xe3, 0x04, 0xd2, 0xfa, 0xd6, 0x81, 0xda, 0x51, 0x48, 0x2e, 0x8b, 0x9b, 0xd0, 0x48, 0x08, |
| 622 |
0x75, 0x69, 0xf2, 0x5a, 0x62, 0xb2, 0xc8, 0x91, 0x04, 0xc4, 0x3e, 0xe8, 0x67, 0x9e, 0x43, 0xa8, |
| 623 |
0x67, 0xcd, 0xe3, 0x54, 0xd8, 0xa9, 0xf5, 0xaa, 0x71, 0xc5, 0x25, 0x0c, 0x07, 0xd0, 0x2a, 0x92, |
| 624 |
0x1b, 0xbd, 0xea, 0x52, 0xf5, 0x22, 0x05, 0x77, 0xa1, 0x79, 0xb1, 0x2b, 0x9e, 0x23, 0x16, 0x70, |
| 625 |
0xf1, 0xa7, 0x0b, 0x05, 0x26, 0x8a, 0x0c, 0x22, 0x79, 0x9a, 0x54, 0xed, 0x65, 0x2a, 0xed, 0x81, |
| 626 |
0x6a, 0x2f, 0xa7, 0xca, 0x68, 0xd8, 0x81, 0x86, 0xcd, 0x66, 0x3e, 0xa7, 0x41, 0xa7, 0x2a, 0x8c, |
| 627 |
0x21, 0x49, 0x68, 0x6e, 0x82, 0x26, 0x7f, 0x71, 0x1b, 0xd4, 0xa1, 0x2b, 0x5d, 0xd3, 0x88, 0x3a, |
| 628 |
0x74, 0x45, 0x7c, 0xcc, 0xe4, 0x26, 0x6a, 0x44, 0x3d, 0x66, 0xe6, 0x2e, 0x40, 0x36, 0x06, 0x62, |
| 629 |
0xa4, 0x8a, 0x5c, 0x26, 0x51, 0x05, 0x04, 0x4d, 0x60, 0x52, 0xd3, 0x22, 0xf2, 0x6d, 0xbe, 0x02, |
| 630 |
0xc8, 0xc6, 0xf8, 0x57, 0x8f, 0xb4, 0x42, 0x35, 0x57, 0xe1, 0x36, 0x39, 0xac, 0x91, 0xeb, 0x5f, |
| 631 |
0xfd, 0xfd, 0xb0, 0x04, 0xa3, 0xe4, 0xb0, 0x10, 0xb4, 0x73, 0x77, 0x42, 0xe3, 0x3e, 0xf2, 0x6d, |
| 632 |
0x9a, 0x4b, 0x67, 0x23, 0xc4, 0x7a, 0x05, 0x57, 0xa1, 0x16, 0x2d, 0xa1, 0x62, 0x7e, 0xa9, 0x42, |
| 633 |
0x2b, 0x2a, 0x7c, 0xc8, 0x7c, 0x1e, 0x30, 0x0f, 0x5f, 0x16, 0xba, 0x3f, 0x2b, 0x76, 0x8f, 0x49, |
| 634 |
0x25, 0x03, 0xbc, 0x80, 0xf5, 0x23, 0xdf, 0xe5, 0xae, 0xc5, 0x59, 0x20, 0x57, 0xe0, 0xc8, 0x77, |
| 635 |
0xe8, 0x6d, 0xec, 0x53, 0x19, 0x24, 0x14, 0x84, 0x86, 0x53, 0xe6, 0x3b, 0x34, 0xaf, 0x88, 0x7c, |
| 636 |
0x29, 0x83, 0xf0, 0x39, 0xb4, 0x93, 0xa5, 0x3c, 0x67, 0xf2, 0xaf, 0xd1, 0xd2, 0x03, 0x78, 0x80, |
| 637 |
0xe4, 0x97, 0xfb, 0x4d, 0xc0, 0x26, 0x92, 0x5d, 0x4b, 0xd9, 0x4b, 0x18, 0xf6, 0xa1, 0x99, 0x2f, |
| 638 |
0x5c, 0x76, 0x38, 0x79, 0x42, 0x7a, 0x0c, 0x69, 0xf1, 0x46, 0x89, 0xa2, 0x48, 0x31, 0x87, 0x7f, |
| 639 |
0xfa, 0x8e, 0x6d, 0x00, 0x1e, 0x06, 0xd4, 0xe2, 0x54, 0xf2, 0x09, 0xbd, 0x99, 0xd1, 0x90, 0xeb, |
| 640 |
0x0a, 0x3e, 0x86, 0xf5, 0x42, 0x5e, 0x58, 0x12, 0x52, 0x5d, 0x3d, 0xd8, 0xf9, 0x7a, 0x6f, 0x28, |
| 641 |
0x77, 0xf7, 0x86, 0xf2, 0xe3, 0xde, 0x50, 0x3e, 0x2f, 0x8c, 0xca, 0xdd, 0xc2, 0xa8, 0x7c, 0x5f, |
| 642 |
0x18, 0x95, 0x0f, 0xdd, 0x2b, 0x97, 0x8f, 0x67, 0x97, 0x7d, 0x9b, 0x4d, 0xb6, 0x43, 0xcf, 0xb2, |
| 643 |
0xaf, 0xc7, 0x37, 0xdb, 0xd1, 0x48, 0x97, 0x75, 0xf9, 0x39, 0xdf, 0xf9, 0x1d, 0x00, 0x00, 0xff, |
| 644 |
0xff, 0x51, 0x0a, 0xe3, 0xd7, 0xde, 0x05, 0x00, 0x00, |
| 645 |
} |
| 646 |
|
| 647 |
func (m *NebulaMeta) Marshal() (dAtA []byte, err error) { |
| 648 |
size := m.Size() |
| 649 |
dAtA = make([]byte, size) |
| 650 |
n, err := m.MarshalToSizedBuffer(dAtA[:size]) |
| 651 |
if err != nil { |
| 652 |
return nil, err |
| 653 |
} |
| 654 |
return dAtA[:n], nil |
| 655 |
} |
| 656 |
|
| 657 |
func (m *NebulaMeta) MarshalTo(dAtA []byte) (int, error) { |
| 658 |
size := m.Size() |
| 659 |
return m.MarshalToSizedBuffer(dAtA[:size]) |
| 660 |
} |
| 661 |
|
| 662 |
func (m *NebulaMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { |
| 663 |
i := len(dAtA) |
| 664 |
_ = i |
| 665 |
var l int |
| 666 |
_ = l |
| 667 |
if m.Details != nil { |
| 668 |
{ |
| 669 |
size, err := m.Details.MarshalToSizedBuffer(dAtA[:i]) |
| 670 |
if err != nil { |
| 671 |
return 0, err |
| 672 |
} |
| 673 |
i -= size |
| 674 |
i = encodeVarintNebula(dAtA, i, uint64(size)) |
| 675 |
} |
| 676 |
i-- |
| 677 |
dAtA[i] = 0x12 |
| 678 |
} |
| 679 |
if m.Type != 0 { |
| 680 |
i = encodeVarintNebula(dAtA, i, uint64(m.Type)) |
| 681 |
i-- |
| 682 |
dAtA[i] = 0x8 |
| 683 |
} |
| 684 |
return len(dAtA) - i, nil |
| 685 |
} |
| 686 |
|
| 687 |
func (m *NebulaMetaDetails) Marshal() (dAtA []byte, err error) { |
| 688 |
size := m.Size() |
| 689 |
dAtA = make([]byte, size) |
| 690 |
n, err := m.MarshalToSizedBuffer(dAtA[:size]) |
| 691 |
if err != nil { |
| 692 |
return nil, err |
| 693 |
} |
| 694 |
return dAtA[:n], nil |
| 695 |
} |
| 696 |
|
| 697 |
func (m *NebulaMetaDetails) MarshalTo(dAtA []byte) (int, error) { |
| 698 |
size := m.Size() |
| 699 |
return m.MarshalToSizedBuffer(dAtA[:size]) |
| 700 |
} |
| 701 |
|
| 702 |
func (m *NebulaMetaDetails) MarshalToSizedBuffer(dAtA []byte) (int, error) { |
| 703 |
i := len(dAtA) |
| 704 |
_ = i |
| 705 |
var l int |
| 706 |
_ = l |
| 707 |
if len(m.RelayVpnAddrs) > 0 { |
| 708 |
for iNdEx := len(m.RelayVpnAddrs) - 1; iNdEx >= 0; iNdEx-- { |
| 709 |
{ |
| 710 |
size, err := m.RelayVpnAddrs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) |
| 711 |
if err != nil { |
| 712 |
return 0, err |
| 713 |
} |
| 714 |
i -= size |
| 715 |
i = encodeVarintNebula(dAtA, i, uint64(size)) |
| 716 |
} |
| 717 |
i-- |
| 718 |
dAtA[i] = 0x3a |
| 719 |
} |
| 720 |
} |
| 721 |
if m.VpnAddr != nil { |
| 722 |
{ |
| 723 |
size, err := m.VpnAddr.MarshalToSizedBuffer(dAtA[:i]) |
| 724 |
if err != nil { |
| 725 |
return 0, err |
| 726 |
} |
| 727 |
i -= size |
| 728 |
i = encodeVarintNebula(dAtA, i, uint64(size)) |
| 729 |
} |
| 730 |
i-- |
| 731 |
dAtA[i] = 0x32 |
| 732 |
} |
| 733 |
if len(m.OldRelayVpnAddrs) > 0 { |
| 734 |
dAtA4 := make([]byte, len(m.OldRelayVpnAddrs)*10) |
| 735 |
var j3 int |
| 736 |
for _, num := range m.OldRelayVpnAddrs { |
| 737 |
for num >= 1<<7 { |
| 738 |
dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) |
| 739 |
num >>= 7 |
| 740 |
j3++ |
| 741 |
} |
| 742 |
dAtA4[j3] = uint8(num) |
| 743 |
j3++ |
| 744 |
} |
| 745 |
i -= j3 |
| 746 |
copy(dAtA[i:], dAtA4[:j3]) |
| 747 |
i = encodeVarintNebula(dAtA, i, uint64(j3)) |
| 748 |
i-- |
| 749 |
dAtA[i] = 0x2a |
| 750 |
} |
| 751 |
if len(m.V6AddrPorts) > 0 { |
| 752 |
for iNdEx := len(m.V6AddrPorts) - 1; iNdEx >= 0; iNdEx-- { |
| 753 |
{ |
| 754 |
size, err := m.V6AddrPorts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) |
| 755 |
if err != nil { |
| 756 |
return 0, err |
| 757 |
} |
| 758 |
i -= size |
| 759 |
i = encodeVarintNebula(dAtA, i, uint64(size)) |
| 760 |
} |
| 761 |
i-- |
| 762 |
dAtA[i] = 0x22 |
| 763 |
} |
| 764 |
} |
| 765 |
if m.Counter != 0 { |
| 766 |
i = encodeVarintNebula(dAtA, i, uint64(m.Counter)) |
| 767 |
i-- |
| 768 |
dAtA[i] = 0x18 |
| 769 |
} |
| 770 |
if len(m.V4AddrPorts) > 0 { |
| 771 |
for iNdEx := len(m.V4AddrPorts) - 1; iNdEx >= 0; iNdEx-- { |
| 772 |
{ |
| 773 |
size, err := m.V4AddrPorts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) |
| 774 |
if err != nil { |
| 775 |
return 0, err |
| 776 |
} |
| 777 |
i -= size |
| 778 |
i = encodeVarintNebula(dAtA, i, uint64(size)) |
| 779 |
} |
| 780 |
i-- |
| 781 |
dAtA[i] = 0x12 |
| 782 |
} |
| 783 |
} |
| 784 |
if m.OldVpnAddr != 0 { |
| 785 |
i = encodeVarintNebula(dAtA, i, uint64(m.OldVpnAddr)) |
| 786 |
i-- |
| 787 |
dAtA[i] = 0x8 |
| 788 |
} |
| 789 |
return len(dAtA) - i, nil |
| 790 |
} |
| 791 |
|
| 792 |
func (m *Addr) Marshal() (dAtA []byte, err error) { |
| 793 |
size := m.Size() |
| 794 |
dAtA = make([]byte, size) |
| 795 |
n, err := m.MarshalToSizedBuffer(dAtA[:size]) |
| 796 |
if err != nil { |
| 797 |
return nil, err |
| 798 |
} |
| 799 |
return dAtA[:n], nil |
| 800 |
} |
| 801 |
|
| 802 |
func (m *Addr) MarshalTo(dAtA []byte) (int, error) { |
| 803 |
size := m.Size() |
| 804 |
return m.MarshalToSizedBuffer(dAtA[:size]) |
| 805 |
} |
| 806 |
|
| 807 |
func (m *Addr) MarshalToSizedBuffer(dAtA []byte) (int, error) { |
| 808 |
i := len(dAtA) |
| 809 |
_ = i |
| 810 |
var l int |
| 811 |
_ = l |
| 812 |
if m.Lo != 0 { |
| 813 |
i = encodeVarintNebula(dAtA, i, uint64(m.Lo)) |
| 814 |
i-- |
| 815 |
dAtA[i] = 0x10 |
| 816 |
} |
| 817 |
if m.Hi != 0 { |
| 818 |
i = encodeVarintNebula(dAtA, i, uint64(m.Hi)) |
| 819 |
i-- |
| 820 |
dAtA[i] = 0x8 |
| 821 |
} |
| 822 |
return len(dAtA) - i, nil |
| 823 |
} |
| 824 |
|
| 825 |
func (m *V4AddrPort) Marshal() (dAtA []byte, err error) { |
| 826 |
size := m.Size() |
| 827 |
dAtA = make([]byte, size) |
| 828 |
n, err := m.MarshalToSizedBuffer(dAtA[:size]) |
| 829 |
if err != nil { |
| 830 |
return nil, err |
| 831 |
} |
| 832 |
return dAtA[:n], nil |
| 833 |
} |
| 834 |
|
| 835 |
func (m *V4AddrPort) MarshalTo(dAtA []byte) (int, error) { |
| 836 |
size := m.Size() |
| 837 |
return m.MarshalToSizedBuffer(dAtA[:size]) |
| 838 |
} |
| 839 |
|
| 840 |
func (m *V4AddrPort) MarshalToSizedBuffer(dAtA []byte) (int, error) { |
| 841 |
i := len(dAtA) |
| 842 |
_ = i |
| 843 |
var l int |
| 844 |
_ = l |
| 845 |
if m.Port != 0 { |
| 846 |
i = encodeVarintNebula(dAtA, i, uint64(m.Port)) |
| 847 |
i-- |
| 848 |
dAtA[i] = 0x10 |
| 849 |
} |
| 850 |
if m.Addr != 0 { |
| 851 |
i = encodeVarintNebula(dAtA, i, uint64(m.Addr)) |
| 852 |
i-- |
| 853 |
dAtA[i] = 0x8 |
| 854 |
} |
| 855 |
return len(dAtA) - i, nil |
| 856 |
} |
| 857 |
|
| 858 |
func (m *V6AddrPort) Marshal() (dAtA []byte, err error) { |
| 859 |
size := m.Size() |
| 860 |
dAtA = make([]byte, size) |
| 861 |
n, err := m.MarshalToSizedBuffer(dAtA[:size]) |
| 862 |
if err != nil { |
| 863 |
return nil, err |
| 864 |
} |
| 865 |
return dAtA[:n], nil |
| 866 |
} |
| 867 |
|
| 868 |
func (m *V6AddrPort) MarshalTo(dAtA []byte) (int, error) { |
| 869 |
size := m.Size() |
| 870 |
return m.MarshalToSizedBuffer(dAtA[:size]) |
| 871 |
} |
| 872 |
|
| 873 |
func (m *V6AddrPort) MarshalToSizedBuffer(dAtA []byte) (int, error) { |
| 874 |
i := len(dAtA) |
| 875 |
_ = i |
| 876 |
var l int |
| 877 |
_ = l |
| 878 |
if m.Port != 0 { |
| 879 |
i = encodeVarintNebula(dAtA, i, uint64(m.Port)) |
| 880 |
i-- |
| 881 |
dAtA[i] = 0x18 |
| 882 |
} |
| 883 |
if m.Lo != 0 { |
| 884 |
i = encodeVarintNebula(dAtA, i, uint64(m.Lo)) |
| 885 |
i-- |
| 886 |
dAtA[i] = 0x10 |
| 887 |
} |
| 888 |
if m.Hi != 0 { |
| 889 |
i = encodeVarintNebula(dAtA, i, uint64(m.Hi)) |
| 890 |
i-- |
| 891 |
dAtA[i] = 0x8 |
| 892 |
} |
| 893 |
return len(dAtA) - i, nil |
| 894 |
} |
| 895 |
|
| 896 |
func (m *NebulaPing) Marshal() (dAtA []byte, err error) { |
| 897 |
size := m.Size() |
| 898 |
dAtA = make([]byte, size) |
| 899 |
n, err := m.MarshalToSizedBuffer(dAtA[:size]) |
| 900 |
if err != nil { |
| 901 |
return nil, err |
| 902 |
} |
| 903 |
return dAtA[:n], nil |
| 904 |
} |
| 905 |
|
| 906 |
func (m *NebulaPing) MarshalTo(dAtA []byte) (int, error) { |
| 907 |
size := m.Size() |
| 908 |
return m.MarshalToSizedBuffer(dAtA[:size]) |
| 909 |
} |
| 910 |
|
| 911 |
func (m *NebulaPing) MarshalToSizedBuffer(dAtA []byte) (int, error) { |
| 912 |
i := len(dAtA) |
| 913 |
_ = i |
| 914 |
var l int |
| 915 |
_ = l |
| 916 |
if m.Time != 0 { |
| 917 |
i = encodeVarintNebula(dAtA, i, uint64(m.Time)) |
| 918 |
i-- |
| 919 |
dAtA[i] = 0x10 |
| 920 |
} |
| 921 |
if m.Type != 0 { |
| 922 |
i = encodeVarintNebula(dAtA, i, uint64(m.Type)) |
| 923 |
i-- |
| 924 |
dAtA[i] = 0x8 |
| 925 |
} |
| 926 |
return len(dAtA) - i, nil |
| 927 |
} |
| 928 |
|
| 929 |
func (m *NebulaControl) Marshal() (dAtA []byte, err error) { |
| 930 |
size := m.Size() |
| 931 |
dAtA = make([]byte, size) |
| 932 |
n, err := m.MarshalToSizedBuffer(dAtA[:size]) |
| 933 |
if err != nil { |
| 934 |
return nil, err |
| 935 |
} |
| 936 |
return dAtA[:n], nil |
| 937 |
} |
| 938 |
|
| 939 |
func (m *NebulaControl) MarshalTo(dAtA []byte) (int, error) { |
| 940 |
size := m.Size() |
| 941 |
return m.MarshalToSizedBuffer(dAtA[:size]) |
| 942 |
} |
| 943 |
|
| 944 |
func (m *NebulaControl) MarshalToSizedBuffer(dAtA []byte) (int, error) { |
| 945 |
i := len(dAtA) |
| 946 |
_ = i |
| 947 |
var l int |
| 948 |
_ = l |
| 949 |
if m.RelayFromAddr != nil { |
| 950 |
{ |
| 951 |
size, err := m.RelayFromAddr.MarshalToSizedBuffer(dAtA[:i]) |
| 952 |
if err != nil { |
| 953 |
return 0, err |
| 954 |
} |
| 955 |
i -= size |
| 956 |
i = encodeVarintNebula(dAtA, i, uint64(size)) |
| 957 |
} |
| 958 |
i-- |
| 959 |
dAtA[i] = 0x3a |
| 960 |
} |
| 961 |
if m.RelayToAddr != nil { |
| 962 |
{ |
| 963 |
size, err := m.RelayToAddr.MarshalToSizedBuffer(dAtA[:i]) |
| 964 |
if err != nil { |
| 965 |
return 0, err |
| 966 |
} |
| 967 |
i -= size |
| 968 |
i = encodeVarintNebula(dAtA, i, uint64(size)) |
| 969 |
} |
| 970 |
i-- |
| 971 |
dAtA[i] = 0x32 |
| 972 |
} |
| 973 |
if m.OldRelayFromAddr != 0 { |
| 974 |
i = encodeVarintNebula(dAtA, i, uint64(m.OldRelayFromAddr)) |
| 975 |
i-- |
| 976 |
dAtA[i] = 0x28 |
| 977 |
} |
| 978 |
if m.OldRelayToAddr != 0 { |
| 979 |
i = encodeVarintNebula(dAtA, i, uint64(m.OldRelayToAddr)) |
| 980 |
i-- |
| 981 |
dAtA[i] = 0x20 |
| 982 |
} |
| 983 |
if m.ResponderRelayIndex != 0 { |
| 984 |
i = encodeVarintNebula(dAtA, i, uint64(m.ResponderRelayIndex)) |
| 985 |
i-- |
| 986 |
dAtA[i] = 0x18 |
| 987 |
} |
| 988 |
if m.InitiatorRelayIndex != 0 { |
| 989 |
i = encodeVarintNebula(dAtA, i, uint64(m.InitiatorRelayIndex)) |
| 990 |
i-- |
| 991 |
dAtA[i] = 0x10 |
| 992 |
} |
| 993 |
if m.Type != 0 { |
| 994 |
i = encodeVarintNebula(dAtA, i, uint64(m.Type)) |
| 995 |
i-- |
| 996 |
dAtA[i] = 0x8 |
| 997 |
} |
| 998 |
return len(dAtA) - i, nil |
| 999 |
} |
| 1000 |
|
| 1001 |
func encodeVarintNebula(dAtA []byte, offset int, v uint64) int { |
| 1002 |
offset -= sovNebula(v) |
| 1003 |
base := offset |
| 1004 |
for v >= 1<<7 { |
| 1005 |
dAtA[offset] = uint8(v&0x7f | 0x80) |
| 1006 |
v >>= 7 |
| 1007 |
offset++ |
| 1008 |
} |
| 1009 |
dAtA[offset] = uint8(v) |
| 1010 |
return base |
| 1011 |
} |
| 1012 |
func (m *NebulaMeta) Size() (n int) { |
| 1013 |
if m == nil { |
| 1014 |
return 0 |
| 1015 |
} |
| 1016 |
var l int |
| 1017 |
_ = l |
| 1018 |
if m.Type != 0 { |
| 1019 |
n += 1 + sovNebula(uint64(m.Type)) |
| 1020 |
} |
| 1021 |
if m.Details != nil { |
| 1022 |
l = m.Details.Size() |
| 1023 |
n += 1 + l + sovNebula(uint64(l)) |
| 1024 |
} |
| 1025 |
return n |
| 1026 |
} |
| 1027 |
|
| 1028 |
func (m *NebulaMetaDetails) Size() (n int) { |
| 1029 |
if m == nil { |
| 1030 |
return 0 |
| 1031 |
} |
| 1032 |
var l int |
| 1033 |
_ = l |
| 1034 |
if m.OldVpnAddr != 0 { |
| 1035 |
n += 1 + sovNebula(uint64(m.OldVpnAddr)) |
| 1036 |
} |
| 1037 |
if len(m.V4AddrPorts) > 0 { |
| 1038 |
for _, e := range m.V4AddrPorts { |
| 1039 |
l = e.Size() |
| 1040 |
n += 1 + l + sovNebula(uint64(l)) |
| 1041 |
} |
| 1042 |
} |
| 1043 |
if m.Counter != 0 { |
| 1044 |
n += 1 + sovNebula(uint64(m.Counter)) |
| 1045 |
} |
| 1046 |
if len(m.V6AddrPorts) > 0 { |
| 1047 |
for _, e := range m.V6AddrPorts { |
| 1048 |
l = e.Size() |
| 1049 |
n += 1 + l + sovNebula(uint64(l)) |
| 1050 |
} |
| 1051 |
} |
| 1052 |
if len(m.OldRelayVpnAddrs) > 0 { |
| 1053 |
l = 0 |
| 1054 |
for _, e := range m.OldRelayVpnAddrs { |
| 1055 |
l += sovNebula(uint64(e)) |
| 1056 |
} |
| 1057 |
n += 1 + sovNebula(uint64(l)) + l |
| 1058 |
} |
| 1059 |
if m.VpnAddr != nil { |
| 1060 |
l = m.VpnAddr.Size() |
| 1061 |
n += 1 + l + sovNebula(uint64(l)) |
| 1062 |
} |
| 1063 |
if len(m.RelayVpnAddrs) > 0 { |
| 1064 |
for _, e := range m.RelayVpnAddrs { |
| 1065 |
l = e.Size() |
| 1066 |
n += 1 + l + sovNebula(uint64(l)) |
| 1067 |
} |
| 1068 |
} |
| 1069 |
return n |
| 1070 |
} |
| 1071 |
|
| 1072 |
func (m *Addr) Size() (n int) { |
| 1073 |
if m == nil { |
| 1074 |
return 0 |
| 1075 |
} |
| 1076 |
var l int |
| 1077 |
_ = l |
| 1078 |
if m.Hi != 0 { |
| 1079 |
n += 1 + sovNebula(uint64(m.Hi)) |
| 1080 |
} |
| 1081 |
if m.Lo != 0 { |
| 1082 |
n += 1 + sovNebula(uint64(m.Lo)) |
| 1083 |
} |
| 1084 |
return n |
| 1085 |
} |
| 1086 |
|
| 1087 |
func (m *V4AddrPort) Size() (n int) { |
| 1088 |
if m == nil { |
| 1089 |
return 0 |
| 1090 |
} |
| 1091 |
var l int |
| 1092 |
_ = l |
| 1093 |
if m.Addr != 0 { |
| 1094 |
n += 1 + sovNebula(uint64(m.Addr)) |
| 1095 |
} |
| 1096 |
if m.Port != 0 { |
| 1097 |
n += 1 + sovNebula(uint64(m.Port)) |
| 1098 |
} |
| 1099 |
return n |
| 1100 |
} |
| 1101 |
|
| 1102 |
func (m *V6AddrPort) Size() (n int) { |
| 1103 |
if m == nil { |
| 1104 |
return 0 |
| 1105 |
} |
| 1106 |
var l int |
| 1107 |
_ = l |
| 1108 |
if m.Hi != 0 { |
| 1109 |
n += 1 + sovNebula(uint64(m.Hi)) |
| 1110 |
} |
| 1111 |
if m.Lo != 0 { |
| 1112 |
n += 1 + sovNebula(uint64(m.Lo)) |
| 1113 |
} |
| 1114 |
if m.Port != 0 { |
| 1115 |
n += 1 + sovNebula(uint64(m.Port)) |
| 1116 |
} |
| 1117 |
return n |
| 1118 |
} |
| 1119 |
|
| 1120 |
func (m *NebulaPing) Size() (n int) { |
| 1121 |
if m == nil { |
| 1122 |
return 0 |
| 1123 |
} |
| 1124 |
var l int |
| 1125 |
_ = l |
| 1126 |
if m.Type != 0 { |
| 1127 |
n += 1 + sovNebula(uint64(m.Type)) |
| 1128 |
} |
| 1129 |
if m.Time != 0 { |
| 1130 |
n += 1 + sovNebula(uint64(m.Time)) |
| 1131 |
} |
| 1132 |
return n |
| 1133 |
} |
| 1134 |
|
| 1135 |
func (m *NebulaControl) Size() (n int) { |
| 1136 |
if m == nil { |
| 1137 |
return 0 |
| 1138 |
} |
| 1139 |
var l int |
| 1140 |
_ = l |
| 1141 |
if m.Type != 0 { |
| 1142 |
n += 1 + sovNebula(uint64(m.Type)) |
| 1143 |
} |
| 1144 |
if m.InitiatorRelayIndex != 0 { |
| 1145 |
n += 1 + sovNebula(uint64(m.InitiatorRelayIndex)) |
| 1146 |
} |
| 1147 |
if m.ResponderRelayIndex != 0 { |
| 1148 |
n += 1 + sovNebula(uint64(m.ResponderRelayIndex)) |
| 1149 |
} |
| 1150 |
if m.OldRelayToAddr != 0 { |
| 1151 |
n += 1 + sovNebula(uint64(m.OldRelayToAddr)) |
| 1152 |
} |
| 1153 |
if m.OldRelayFromAddr != 0 { |
| 1154 |
n += 1 + sovNebula(uint64(m.OldRelayFromAddr)) |
| 1155 |
} |
| 1156 |
if m.RelayToAddr != nil { |
| 1157 |
l = m.RelayToAddr.Size() |
| 1158 |
n += 1 + l + sovNebula(uint64(l)) |
| 1159 |
} |
| 1160 |
if m.RelayFromAddr != nil { |
| 1161 |
l = m.RelayFromAddr.Size() |
| 1162 |
n += 1 + l + sovNebula(uint64(l)) |
| 1163 |
} |
| 1164 |
return n |
| 1165 |
} |
| 1166 |
|
| 1167 |
func sovNebula(x uint64) (n int) { |
| 1168 |
return (math_bits.Len64(x|1) + 6) / 7 |
| 1169 |
} |
| 1170 |
func sozNebula(x uint64) (n int) { |
| 1171 |
return sovNebula(uint64((x << 1) ^ uint64((int64(x) >> 63)))) |
| 1172 |
} |
| 1173 |
func (m *NebulaMeta) Unmarshal(dAtA []byte) error { |
| 1174 |
l := len(dAtA) |
| 1175 |
iNdEx := 0 |
| 1176 |
for iNdEx < l { |
| 1177 |
preIndex := iNdEx |
| 1178 |
var wire uint64 |
| 1179 |
for shift := uint(0); ; shift += 7 { |
| 1180 |
if shift >= 64 { |
| 1181 |
return ErrIntOverflowNebula |
| 1182 |
} |
| 1183 |
if iNdEx >= l { |
| 1184 |
return io.ErrUnexpectedEOF |
| 1185 |
} |
| 1186 |
b := dAtA[iNdEx] |
| 1187 |
iNdEx++ |
| 1188 |
wire |= uint64(b&0x7F) << shift |
| 1189 |
if b < 0x80 { |
| 1190 |
break |
| 1191 |
} |
| 1192 |
} |
| 1193 |
fieldNum := int32(wire >> 3) |
| 1194 |
wireType := int(wire & 0x7) |
| 1195 |
if wireType == 4 { |
| 1196 |
return fmt.Errorf("proto: NebulaMeta: wiretype end group for non-group") |
| 1197 |
} |
| 1198 |
if fieldNum <= 0 { |
| 1199 |
return fmt.Errorf("proto: NebulaMeta: illegal tag %d (wire type %d)", fieldNum, wire) |
| 1200 |
} |
| 1201 |
switch fieldNum { |
| 1202 |
case 1: |
| 1203 |
if wireType != 0 { |
| 1204 |
return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) |
| 1205 |
} |
| 1206 |
m.Type = 0 |
| 1207 |
for shift := uint(0); ; shift += 7 { |
| 1208 |
if shift >= 64 { |
| 1209 |
return ErrIntOverflowNebula |
| 1210 |
} |
| 1211 |
if iNdEx >= l { |
| 1212 |
return io.ErrUnexpectedEOF |
| 1213 |
} |
| 1214 |
b := dAtA[iNdEx] |
| 1215 |
iNdEx++ |
| 1216 |
m.Type |= NebulaMeta_MessageType(b&0x7F) << shift |
| 1217 |
if b < 0x80 { |
| 1218 |
break |
| 1219 |
} |
| 1220 |
} |
| 1221 |
case 2: |
| 1222 |
if wireType != 2 { |
| 1223 |
return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType) |
| 1224 |
} |
| 1225 |
var msglen int |
| 1226 |
for shift := uint(0); ; shift += 7 { |
| 1227 |
if shift >= 64 { |
| 1228 |
return ErrIntOverflowNebula |
| 1229 |
} |
| 1230 |
if iNdEx >= l { |
| 1231 |
return io.ErrUnexpectedEOF |
| 1232 |
} |
| 1233 |
b := dAtA[iNdEx] |
| 1234 |
iNdEx++ |
| 1235 |
msglen |= int(b&0x7F) << shift |
| 1236 |
if b < 0x80 { |
| 1237 |
break |
| 1238 |
} |
| 1239 |
} |
| 1240 |
if msglen < 0 { |
| 1241 |
return ErrInvalidLengthNebula |
| 1242 |
} |
| 1243 |
postIndex := iNdEx + msglen |
| 1244 |
if postIndex < 0 { |
| 1245 |
return ErrInvalidLengthNebula |
| 1246 |
} |
| 1247 |
if postIndex > l { |
| 1248 |
return io.ErrUnexpectedEOF |
| 1249 |
} |
| 1250 |
if m.Details == nil { |
| 1251 |
m.Details = &NebulaMetaDetails{} |
| 1252 |
} |
| 1253 |
if err := m.Details.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 1254 |
return err |
| 1255 |
} |
| 1256 |
iNdEx = postIndex |
| 1257 |
default: |
| 1258 |
iNdEx = preIndex |
| 1259 |
skippy, err := skipNebula(dAtA[iNdEx:]) |
| 1260 |
if err != nil { |
| 1261 |
return err |
| 1262 |
} |
| 1263 |
if (skippy < 0) || (iNdEx+skippy) < 0 { |
| 1264 |
return ErrInvalidLengthNebula |
| 1265 |
} |
| 1266 |
if (iNdEx + skippy) > l { |
| 1267 |
return io.ErrUnexpectedEOF |
| 1268 |
} |
| 1269 |
iNdEx += skippy |
| 1270 |
} |
| 1271 |
} |
| 1272 |
|
| 1273 |
if iNdEx > l { |
| 1274 |
return io.ErrUnexpectedEOF |
| 1275 |
} |
| 1276 |
return nil |
| 1277 |
} |
| 1278 |
func (m *NebulaMetaDetails) Unmarshal(dAtA []byte) error { |
| 1279 |
l := len(dAtA) |
| 1280 |
iNdEx := 0 |
| 1281 |
for iNdEx < l { |
| 1282 |
preIndex := iNdEx |
| 1283 |
var wire uint64 |
| 1284 |
for shift := uint(0); ; shift += 7 { |
| 1285 |
if shift >= 64 { |
| 1286 |
return ErrIntOverflowNebula |
| 1287 |
} |
| 1288 |
if iNdEx >= l { |
| 1289 |
return io.ErrUnexpectedEOF |
| 1290 |
} |
| 1291 |
b := dAtA[iNdEx] |
| 1292 |
iNdEx++ |
| 1293 |
wire |= uint64(b&0x7F) << shift |
| 1294 |
if b < 0x80 { |
| 1295 |
break |
| 1296 |
} |
| 1297 |
} |
| 1298 |
fieldNum := int32(wire >> 3) |
| 1299 |
wireType := int(wire & 0x7) |
| 1300 |
if wireType == 4 { |
| 1301 |
return fmt.Errorf("proto: NebulaMetaDetails: wiretype end group for non-group") |
| 1302 |
} |
| 1303 |
if fieldNum <= 0 { |
| 1304 |
return fmt.Errorf("proto: NebulaMetaDetails: illegal tag %d (wire type %d)", fieldNum, wire) |
| 1305 |
} |
| 1306 |
switch fieldNum { |
| 1307 |
case 1: |
| 1308 |
if wireType != 0 { |
| 1309 |
return fmt.Errorf("proto: wrong wireType = %d for field OldVpnAddr", wireType) |
| 1310 |
} |
| 1311 |
m.OldVpnAddr = 0 |
| 1312 |
for shift := uint(0); ; shift += 7 { |
| 1313 |
if shift >= 64 { |
| 1314 |
return ErrIntOverflowNebula |
| 1315 |
} |
| 1316 |
if iNdEx >= l { |
| 1317 |
return io.ErrUnexpectedEOF |
| 1318 |
} |
| 1319 |
b := dAtA[iNdEx] |
| 1320 |
iNdEx++ |
| 1321 |
m.OldVpnAddr |= uint32(b&0x7F) << shift |
| 1322 |
if b < 0x80 { |
| 1323 |
break |
| 1324 |
} |
| 1325 |
} |
| 1326 |
case 2: |
| 1327 |
if wireType != 2 { |
| 1328 |
return fmt.Errorf("proto: wrong wireType = %d for field V4AddrPorts", wireType) |
| 1329 |
} |
| 1330 |
var msglen int |
| 1331 |
for shift := uint(0); ; shift += 7 { |
| 1332 |
if shift >= 64 { |
| 1333 |
return ErrIntOverflowNebula |
| 1334 |
} |
| 1335 |
if iNdEx >= l { |
| 1336 |
return io.ErrUnexpectedEOF |
| 1337 |
} |
| 1338 |
b := dAtA[iNdEx] |
| 1339 |
iNdEx++ |
| 1340 |
msglen |= int(b&0x7F) << shift |
| 1341 |
if b < 0x80 { |
| 1342 |
break |
| 1343 |
} |
| 1344 |
} |
| 1345 |
if msglen < 0 { |
| 1346 |
return ErrInvalidLengthNebula |
| 1347 |
} |
| 1348 |
postIndex := iNdEx + msglen |
| 1349 |
if postIndex < 0 { |
| 1350 |
return ErrInvalidLengthNebula |
| 1351 |
} |
| 1352 |
if postIndex > l { |
| 1353 |
return io.ErrUnexpectedEOF |
| 1354 |
} |
| 1355 |
m.V4AddrPorts = append(m.V4AddrPorts, &V4AddrPort{}) |
| 1356 |
if err := m.V4AddrPorts[len(m.V4AddrPorts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 1357 |
return err |
| 1358 |
} |
| 1359 |
iNdEx = postIndex |
| 1360 |
case 3: |
| 1361 |
if wireType != 0 { |
| 1362 |
return fmt.Errorf("proto: wrong wireType = %d for field Counter", wireType) |
| 1363 |
} |
| 1364 |
m.Counter = 0 |
| 1365 |
for shift := uint(0); ; shift += 7 { |
| 1366 |
if shift >= 64 { |
| 1367 |
return ErrIntOverflowNebula |
| 1368 |
} |
| 1369 |
if iNdEx >= l { |
| 1370 |
return io.ErrUnexpectedEOF |
| 1371 |
} |
| 1372 |
b := dAtA[iNdEx] |
| 1373 |
iNdEx++ |
| 1374 |
m.Counter |= uint32(b&0x7F) << shift |
| 1375 |
if b < 0x80 { |
| 1376 |
break |
| 1377 |
} |
| 1378 |
} |
| 1379 |
case 4: |
| 1380 |
if wireType != 2 { |
| 1381 |
return fmt.Errorf("proto: wrong wireType = %d for field V6AddrPorts", wireType) |
| 1382 |
} |
| 1383 |
var msglen int |
| 1384 |
for shift := uint(0); ; shift += 7 { |
| 1385 |
if shift >= 64 { |
| 1386 |
return ErrIntOverflowNebula |
| 1387 |
} |
| 1388 |
if iNdEx >= l { |
| 1389 |
return io.ErrUnexpectedEOF |
| 1390 |
} |
| 1391 |
b := dAtA[iNdEx] |
| 1392 |
iNdEx++ |
| 1393 |
msglen |= int(b&0x7F) << shift |
| 1394 |
if b < 0x80 { |
| 1395 |
break |
| 1396 |
} |
| 1397 |
} |
| 1398 |
if msglen < 0 { |
| 1399 |
return ErrInvalidLengthNebula |
| 1400 |
} |
| 1401 |
postIndex := iNdEx + msglen |
| 1402 |
if postIndex < 0 { |
| 1403 |
return ErrInvalidLengthNebula |
| 1404 |
} |
| 1405 |
if postIndex > l { |
| 1406 |
return io.ErrUnexpectedEOF |
| 1407 |
} |
| 1408 |
m.V6AddrPorts = append(m.V6AddrPorts, &V6AddrPort{}) |
| 1409 |
if err := m.V6AddrPorts[len(m.V6AddrPorts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 1410 |
return err |
| 1411 |
} |
| 1412 |
iNdEx = postIndex |
| 1413 |
case 5: |
| 1414 |
if wireType == 0 { |
| 1415 |
var v uint32 |
| 1416 |
for shift := uint(0); ; shift += 7 { |
| 1417 |
if shift >= 64 { |
| 1418 |
return ErrIntOverflowNebula |
| 1419 |
} |
| 1420 |
if iNdEx >= l { |
| 1421 |
return io.ErrUnexpectedEOF |
| 1422 |
} |
| 1423 |
b := dAtA[iNdEx] |
| 1424 |
iNdEx++ |
| 1425 |
v |= uint32(b&0x7F) << shift |
| 1426 |
if b < 0x80 { |
| 1427 |
break |
| 1428 |
} |
| 1429 |
} |
| 1430 |
m.OldRelayVpnAddrs = append(m.OldRelayVpnAddrs, v) |
| 1431 |
} else if wireType == 2 { |
| 1432 |
var packedLen int |
| 1433 |
for shift := uint(0); ; shift += 7 { |
| 1434 |
if shift >= 64 { |
| 1435 |
return ErrIntOverflowNebula |
| 1436 |
} |
| 1437 |
if iNdEx >= l { |
| 1438 |
return io.ErrUnexpectedEOF |
| 1439 |
} |
| 1440 |
b := dAtA[iNdEx] |
| 1441 |
iNdEx++ |
| 1442 |
packedLen |= int(b&0x7F) << shift |
| 1443 |
if b < 0x80 { |
| 1444 |
break |
| 1445 |
} |
| 1446 |
} |
| 1447 |
if packedLen < 0 { |
| 1448 |
return ErrInvalidLengthNebula |
| 1449 |
} |
| 1450 |
postIndex := iNdEx + packedLen |
| 1451 |
if postIndex < 0 { |
| 1452 |
return ErrInvalidLengthNebula |
| 1453 |
} |
| 1454 |
if postIndex > l { |
| 1455 |
return io.ErrUnexpectedEOF |
| 1456 |
} |
| 1457 |
var elementCount int |
| 1458 |
var count int |
| 1459 |
for _, integer := range dAtA[iNdEx:postIndex] { |
| 1460 |
if integer < 128 { |
| 1461 |
count++ |
| 1462 |
} |
| 1463 |
} |
| 1464 |
elementCount = count |
| 1465 |
if elementCount != 0 && len(m.OldRelayVpnAddrs) == 0 { |
| 1466 |
m.OldRelayVpnAddrs = make([]uint32, 0, elementCount) |
| 1467 |
} |
| 1468 |
for iNdEx < postIndex { |
| 1469 |
var v uint32 |
| 1470 |
for shift := uint(0); ; shift += 7 { |
| 1471 |
if shift >= 64 { |
| 1472 |
return ErrIntOverflowNebula |
| 1473 |
} |
| 1474 |
if iNdEx >= l { |
| 1475 |
return io.ErrUnexpectedEOF |
| 1476 |
} |
| 1477 |
b := dAtA[iNdEx] |
| 1478 |
iNdEx++ |
| 1479 |
v |= uint32(b&0x7F) << shift |
| 1480 |
if b < 0x80 { |
| 1481 |
break |
| 1482 |
} |
| 1483 |
} |
| 1484 |
m.OldRelayVpnAddrs = append(m.OldRelayVpnAddrs, v) |
| 1485 |
} |
| 1486 |
} else { |
| 1487 |
return fmt.Errorf("proto: wrong wireType = %d for field OldRelayVpnAddrs", wireType) |
| 1488 |
} |
| 1489 |
case 6: |
| 1490 |
if wireType != 2 { |
| 1491 |
return fmt.Errorf("proto: wrong wireType = %d for field VpnAddr", wireType) |
| 1492 |
} |
| 1493 |
var msglen int |
| 1494 |
for shift := uint(0); ; shift += 7 { |
| 1495 |
if shift >= 64 { |
| 1496 |
return ErrIntOverflowNebula |
| 1497 |
} |
| 1498 |
if iNdEx >= l { |
| 1499 |
return io.ErrUnexpectedEOF |
| 1500 |
} |
| 1501 |
b := dAtA[iNdEx] |
| 1502 |
iNdEx++ |
| 1503 |
msglen |= int(b&0x7F) << shift |
| 1504 |
if b < 0x80 { |
| 1505 |
break |
| 1506 |
} |
| 1507 |
} |
| 1508 |
if msglen < 0 { |
| 1509 |
return ErrInvalidLengthNebula |
| 1510 |
} |
| 1511 |
postIndex := iNdEx + msglen |
| 1512 |
if postIndex < 0 { |
| 1513 |
return ErrInvalidLengthNebula |
| 1514 |
} |
| 1515 |
if postIndex > l { |
| 1516 |
return io.ErrUnexpectedEOF |
| 1517 |
} |
| 1518 |
if m.VpnAddr == nil { |
| 1519 |
m.VpnAddr = &Addr{} |
| 1520 |
} |
| 1521 |
if err := m.VpnAddr.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 1522 |
return err |
| 1523 |
} |
| 1524 |
iNdEx = postIndex |
| 1525 |
case 7: |
| 1526 |
if wireType != 2 { |
| 1527 |
return fmt.Errorf("proto: wrong wireType = %d for field RelayVpnAddrs", wireType) |
| 1528 |
} |
| 1529 |
var msglen int |
| 1530 |
for shift := uint(0); ; shift += 7 { |
| 1531 |
if shift >= 64 { |
| 1532 |
return ErrIntOverflowNebula |
| 1533 |
} |
| 1534 |
if iNdEx >= l { |
| 1535 |
return io.ErrUnexpectedEOF |
| 1536 |
} |
| 1537 |
b := dAtA[iNdEx] |
| 1538 |
iNdEx++ |
| 1539 |
msglen |= int(b&0x7F) << shift |
| 1540 |
if b < 0x80 { |
| 1541 |
break |
| 1542 |
} |
| 1543 |
} |
| 1544 |
if msglen < 0 { |
| 1545 |
return ErrInvalidLengthNebula |
| 1546 |
} |
| 1547 |
postIndex := iNdEx + msglen |
| 1548 |
if postIndex < 0 { |
| 1549 |
return ErrInvalidLengthNebula |
| 1550 |
} |
| 1551 |
if postIndex > l { |
| 1552 |
return io.ErrUnexpectedEOF |
| 1553 |
} |
| 1554 |
m.RelayVpnAddrs = append(m.RelayVpnAddrs, &Addr{}) |
| 1555 |
if err := m.RelayVpnAddrs[len(m.RelayVpnAddrs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 1556 |
return err |
| 1557 |
} |
| 1558 |
iNdEx = postIndex |
| 1559 |
default: |
| 1560 |
iNdEx = preIndex |
| 1561 |
skippy, err := skipNebula(dAtA[iNdEx:]) |
| 1562 |
if err != nil { |
| 1563 |
return err |
| 1564 |
} |
| 1565 |
if (skippy < 0) || (iNdEx+skippy) < 0 { |
| 1566 |
return ErrInvalidLengthNebula |
| 1567 |
} |
| 1568 |
if (iNdEx + skippy) > l { |
| 1569 |
return io.ErrUnexpectedEOF |
| 1570 |
} |
| 1571 |
iNdEx += skippy |
| 1572 |
} |
| 1573 |
} |
| 1574 |
|
| 1575 |
if iNdEx > l { |
| 1576 |
return io.ErrUnexpectedEOF |
| 1577 |
} |
| 1578 |
return nil |
| 1579 |
} |
| 1580 |
func (m *Addr) Unmarshal(dAtA []byte) error { |
| 1581 |
l := len(dAtA) |
| 1582 |
iNdEx := 0 |
| 1583 |
for iNdEx < l { |
| 1584 |
preIndex := iNdEx |
| 1585 |
var wire uint64 |
| 1586 |
for shift := uint(0); ; shift += 7 { |
| 1587 |
if shift >= 64 { |
| 1588 |
return ErrIntOverflowNebula |
| 1589 |
} |
| 1590 |
if iNdEx >= l { |
| 1591 |
return io.ErrUnexpectedEOF |
| 1592 |
} |
| 1593 |
b := dAtA[iNdEx] |
| 1594 |
iNdEx++ |
| 1595 |
wire |= uint64(b&0x7F) << shift |
| 1596 |
if b < 0x80 { |
| 1597 |
break |
| 1598 |
} |
| 1599 |
} |
| 1600 |
fieldNum := int32(wire >> 3) |
| 1601 |
wireType := int(wire & 0x7) |
| 1602 |
if wireType == 4 { |
| 1603 |
return fmt.Errorf("proto: Addr: wiretype end group for non-group") |
| 1604 |
} |
| 1605 |
if fieldNum <= 0 { |
| 1606 |
return fmt.Errorf("proto: Addr: illegal tag %d (wire type %d)", fieldNum, wire) |
| 1607 |
} |
| 1608 |
switch fieldNum { |
| 1609 |
case 1: |
| 1610 |
if wireType != 0 { |
| 1611 |
return fmt.Errorf("proto: wrong wireType = %d for field Hi", wireType) |
| 1612 |
} |
| 1613 |
m.Hi = 0 |
| 1614 |
for shift := uint(0); ; shift += 7 { |
| 1615 |
if shift >= 64 { |
| 1616 |
return ErrIntOverflowNebula |
| 1617 |
} |
| 1618 |
if iNdEx >= l { |
| 1619 |
return io.ErrUnexpectedEOF |
| 1620 |
} |
| 1621 |
b := dAtA[iNdEx] |
| 1622 |
iNdEx++ |
| 1623 |
m.Hi |= uint64(b&0x7F) << shift |
| 1624 |
if b < 0x80 { |
| 1625 |
break |
| 1626 |
} |
| 1627 |
} |
| 1628 |
case 2: |
| 1629 |
if wireType != 0 { |
| 1630 |
return fmt.Errorf("proto: wrong wireType = %d for field Lo", wireType) |
| 1631 |
} |
| 1632 |
m.Lo = 0 |
| 1633 |
for shift := uint(0); ; shift += 7 { |
| 1634 |
if shift >= 64 { |
| 1635 |
return ErrIntOverflowNebula |
| 1636 |
} |
| 1637 |
if iNdEx >= l { |
| 1638 |
return io.ErrUnexpectedEOF |
| 1639 |
} |
| 1640 |
b := dAtA[iNdEx] |
| 1641 |
iNdEx++ |
| 1642 |
m.Lo |= uint64(b&0x7F) << shift |
| 1643 |
if b < 0x80 { |
| 1644 |
break |
| 1645 |
} |
| 1646 |
} |
| 1647 |
default: |
| 1648 |
iNdEx = preIndex |
| 1649 |
skippy, err := skipNebula(dAtA[iNdEx:]) |
| 1650 |
if err != nil { |
| 1651 |
return err |
| 1652 |
} |
| 1653 |
if (skippy < 0) || (iNdEx+skippy) < 0 { |
| 1654 |
return ErrInvalidLengthNebula |
| 1655 |
} |
| 1656 |
if (iNdEx + skippy) > l { |
| 1657 |
return io.ErrUnexpectedEOF |
| 1658 |
} |
| 1659 |
iNdEx += skippy |
| 1660 |
} |
| 1661 |
} |
| 1662 |
|
| 1663 |
if iNdEx > l { |
| 1664 |
return io.ErrUnexpectedEOF |
| 1665 |
} |
| 1666 |
return nil |
| 1667 |
} |
| 1668 |
func (m *V4AddrPort) Unmarshal(dAtA []byte) error { |
| 1669 |
l := len(dAtA) |
| 1670 |
iNdEx := 0 |
| 1671 |
for iNdEx < l { |
| 1672 |
preIndex := iNdEx |
| 1673 |
var wire uint64 |
| 1674 |
for shift := uint(0); ; shift += 7 { |
| 1675 |
if shift >= 64 { |
| 1676 |
return ErrIntOverflowNebula |
| 1677 |
} |
| 1678 |
if iNdEx >= l { |
| 1679 |
return io.ErrUnexpectedEOF |
| 1680 |
} |
| 1681 |
b := dAtA[iNdEx] |
| 1682 |
iNdEx++ |
| 1683 |
wire |= uint64(b&0x7F) << shift |
| 1684 |
if b < 0x80 { |
| 1685 |
break |
| 1686 |
} |
| 1687 |
} |
| 1688 |
fieldNum := int32(wire >> 3) |
| 1689 |
wireType := int(wire & 0x7) |
| 1690 |
if wireType == 4 { |
| 1691 |
return fmt.Errorf("proto: V4AddrPort: wiretype end group for non-group") |
| 1692 |
} |
| 1693 |
if fieldNum <= 0 { |
| 1694 |
return fmt.Errorf("proto: V4AddrPort: illegal tag %d (wire type %d)", fieldNum, wire) |
| 1695 |
} |
| 1696 |
switch fieldNum { |
| 1697 |
case 1: |
| 1698 |
if wireType != 0 { |
| 1699 |
return fmt.Errorf("proto: wrong wireType = %d for field Addr", wireType) |
| 1700 |
} |
| 1701 |
m.Addr = 0 |
| 1702 |
for shift := uint(0); ; shift += 7 { |
| 1703 |
if shift >= 64 { |
| 1704 |
return ErrIntOverflowNebula |
| 1705 |
} |
| 1706 |
if iNdEx >= l { |
| 1707 |
return io.ErrUnexpectedEOF |
| 1708 |
} |
| 1709 |
b := dAtA[iNdEx] |
| 1710 |
iNdEx++ |
| 1711 |
m.Addr |= uint32(b&0x7F) << shift |
| 1712 |
if b < 0x80 { |
| 1713 |
break |
| 1714 |
} |
| 1715 |
} |
| 1716 |
case 2: |
| 1717 |
if wireType != 0 { |
| 1718 |
return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) |
| 1719 |
} |
| 1720 |
m.Port = 0 |
| 1721 |
for shift := uint(0); ; shift += 7 { |
| 1722 |
if shift >= 64 { |
| 1723 |
return ErrIntOverflowNebula |
| 1724 |
} |
| 1725 |
if iNdEx >= l { |
| 1726 |
return io.ErrUnexpectedEOF |
| 1727 |
} |
| 1728 |
b := dAtA[iNdEx] |
| 1729 |
iNdEx++ |
| 1730 |
m.Port |= uint32(b&0x7F) << shift |
| 1731 |
if b < 0x80 { |
| 1732 |
break |
| 1733 |
} |
| 1734 |
} |
| 1735 |
default: |
| 1736 |
iNdEx = preIndex |
| 1737 |
skippy, err := skipNebula(dAtA[iNdEx:]) |
| 1738 |
if err != nil { |
| 1739 |
return err |
| 1740 |
} |
| 1741 |
if (skippy < 0) || (iNdEx+skippy) < 0 { |
| 1742 |
return ErrInvalidLengthNebula |
| 1743 |
} |
| 1744 |
if (iNdEx + skippy) > l { |
| 1745 |
return io.ErrUnexpectedEOF |
| 1746 |
} |
| 1747 |
iNdEx += skippy |
| 1748 |
} |
| 1749 |
} |
| 1750 |
|
| 1751 |
if iNdEx > l { |
| 1752 |
return io.ErrUnexpectedEOF |
| 1753 |
} |
| 1754 |
return nil |
| 1755 |
} |
| 1756 |
func (m *V6AddrPort) Unmarshal(dAtA []byte) error { |
| 1757 |
l := len(dAtA) |
| 1758 |
iNdEx := 0 |
| 1759 |
for iNdEx < l { |
| 1760 |
preIndex := iNdEx |
| 1761 |
var wire uint64 |
| 1762 |
for shift := uint(0); ; shift += 7 { |
| 1763 |
if shift >= 64 { |
| 1764 |
return ErrIntOverflowNebula |
| 1765 |
} |
| 1766 |
if iNdEx >= l { |
| 1767 |
return io.ErrUnexpectedEOF |
| 1768 |
} |
| 1769 |
b := dAtA[iNdEx] |
| 1770 |
iNdEx++ |
| 1771 |
wire |= uint64(b&0x7F) << shift |
| 1772 |
if b < 0x80 { |
| 1773 |
break |
| 1774 |
} |
| 1775 |
} |
| 1776 |
fieldNum := int32(wire >> 3) |
| 1777 |
wireType := int(wire & 0x7) |
| 1778 |
if wireType == 4 { |
| 1779 |
return fmt.Errorf("proto: V6AddrPort: wiretype end group for non-group") |
| 1780 |
} |
| 1781 |
if fieldNum <= 0 { |
| 1782 |
return fmt.Errorf("proto: V6AddrPort: illegal tag %d (wire type %d)", fieldNum, wire) |
| 1783 |
} |
| 1784 |
switch fieldNum { |
| 1785 |
case 1: |
| 1786 |
if wireType != 0 { |
| 1787 |
return fmt.Errorf("proto: wrong wireType = %d for field Hi", wireType) |
| 1788 |
} |
| 1789 |
m.Hi = 0 |
| 1790 |
for shift := uint(0); ; shift += 7 { |
| 1791 |
if shift >= 64 { |
| 1792 |
return ErrIntOverflowNebula |
| 1793 |
} |
| 1794 |
if iNdEx >= l { |
| 1795 |
return io.ErrUnexpectedEOF |
| 1796 |
} |
| 1797 |
b := dAtA[iNdEx] |
| 1798 |
iNdEx++ |
| 1799 |
m.Hi |= uint64(b&0x7F) << shift |
| 1800 |
if b < 0x80 { |
| 1801 |
break |
| 1802 |
} |
| 1803 |
} |
| 1804 |
case 2: |
| 1805 |
if wireType != 0 { |
| 1806 |
return fmt.Errorf("proto: wrong wireType = %d for field Lo", wireType) |
| 1807 |
} |
| 1808 |
m.Lo = 0 |
| 1809 |
for shift := uint(0); ; shift += 7 { |
| 1810 |
if shift >= 64 { |
| 1811 |
return ErrIntOverflowNebula |
| 1812 |
} |
| 1813 |
if iNdEx >= l { |
| 1814 |
return io.ErrUnexpectedEOF |
| 1815 |
} |
| 1816 |
b := dAtA[iNdEx] |
| 1817 |
iNdEx++ |
| 1818 |
m.Lo |= uint64(b&0x7F) << shift |
| 1819 |
if b < 0x80 { |
| 1820 |
break |
| 1821 |
} |
| 1822 |
} |
| 1823 |
case 3: |
| 1824 |
if wireType != 0 { |
| 1825 |
return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) |
| 1826 |
} |
| 1827 |
m.Port = 0 |
| 1828 |
for shift := uint(0); ; shift += 7 { |
| 1829 |
if shift >= 64 { |
| 1830 |
return ErrIntOverflowNebula |
| 1831 |
} |
| 1832 |
if iNdEx >= l { |
| 1833 |
return io.ErrUnexpectedEOF |
| 1834 |
} |
| 1835 |
b := dAtA[iNdEx] |
| 1836 |
iNdEx++ |
| 1837 |
m.Port |= uint32(b&0x7F) << shift |
| 1838 |
if b < 0x80 { |
| 1839 |
break |
| 1840 |
} |
| 1841 |
} |
| 1842 |
default: |
| 1843 |
iNdEx = preIndex |
| 1844 |
skippy, err := skipNebula(dAtA[iNdEx:]) |
| 1845 |
if err != nil { |
| 1846 |
return err |
| 1847 |
} |
| 1848 |
if (skippy < 0) || (iNdEx+skippy) < 0 { |
| 1849 |
return ErrInvalidLengthNebula |
| 1850 |
} |
| 1851 |
if (iNdEx + skippy) > l { |
| 1852 |
return io.ErrUnexpectedEOF |
| 1853 |
} |
| 1854 |
iNdEx += skippy |
| 1855 |
} |
| 1856 |
} |
| 1857 |
|
| 1858 |
if iNdEx > l { |
| 1859 |
return io.ErrUnexpectedEOF |
| 1860 |
} |
| 1861 |
return nil |
| 1862 |
} |
| 1863 |
func (m *NebulaPing) Unmarshal(dAtA []byte) error { |
| 1864 |
l := len(dAtA) |
| 1865 |
iNdEx := 0 |
| 1866 |
for iNdEx < l { |
| 1867 |
preIndex := iNdEx |
| 1868 |
var wire uint64 |
| 1869 |
for shift := uint(0); ; shift += 7 { |
| 1870 |
if shift >= 64 { |
| 1871 |
return ErrIntOverflowNebula |
| 1872 |
} |
| 1873 |
if iNdEx >= l { |
| 1874 |
return io.ErrUnexpectedEOF |
| 1875 |
} |
| 1876 |
b := dAtA[iNdEx] |
| 1877 |
iNdEx++ |
| 1878 |
wire |= uint64(b&0x7F) << shift |
| 1879 |
if b < 0x80 { |
| 1880 |
break |
| 1881 |
} |
| 1882 |
} |
| 1883 |
fieldNum := int32(wire >> 3) |
| 1884 |
wireType := int(wire & 0x7) |
| 1885 |
if wireType == 4 { |
| 1886 |
return fmt.Errorf("proto: NebulaPing: wiretype end group for non-group") |
| 1887 |
} |
| 1888 |
if fieldNum <= 0 { |
| 1889 |
return fmt.Errorf("proto: NebulaPing: illegal tag %d (wire type %d)", fieldNum, wire) |
| 1890 |
} |
| 1891 |
switch fieldNum { |
| 1892 |
case 1: |
| 1893 |
if wireType != 0 { |
| 1894 |
return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) |
| 1895 |
} |
| 1896 |
m.Type = 0 |
| 1897 |
for shift := uint(0); ; shift += 7 { |
| 1898 |
if shift >= 64 { |
| 1899 |
return ErrIntOverflowNebula |
| 1900 |
} |
| 1901 |
if iNdEx >= l { |
| 1902 |
return io.ErrUnexpectedEOF |
| 1903 |
} |
| 1904 |
b := dAtA[iNdEx] |
| 1905 |
iNdEx++ |
| 1906 |
m.Type |= NebulaPing_MessageType(b&0x7F) << shift |
| 1907 |
if b < 0x80 { |
| 1908 |
break |
| 1909 |
} |
| 1910 |
} |
| 1911 |
case 2: |
| 1912 |
if wireType != 0 { |
| 1913 |
return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) |
| 1914 |
} |
| 1915 |
m.Time = 0 |
| 1916 |
for shift := uint(0); ; shift += 7 { |
| 1917 |
if shift >= 64 { |
| 1918 |
return ErrIntOverflowNebula |
| 1919 |
} |
| 1920 |
if iNdEx >= l { |
| 1921 |
return io.ErrUnexpectedEOF |
| 1922 |
} |
| 1923 |
b := dAtA[iNdEx] |
| 1924 |
iNdEx++ |
| 1925 |
m.Time |= uint64(b&0x7F) << shift |
| 1926 |
if b < 0x80 { |
| 1927 |
break |
| 1928 |
} |
| 1929 |
} |
| 1930 |
default: |
| 1931 |
iNdEx = preIndex |
| 1932 |
skippy, err := skipNebula(dAtA[iNdEx:]) |
| 1933 |
if err != nil { |
| 1934 |
return err |
| 1935 |
} |
| 1936 |
if (skippy < 0) || (iNdEx+skippy) < 0 { |
| 1937 |
return ErrInvalidLengthNebula |
| 1938 |
} |
| 1939 |
if (iNdEx + skippy) > l { |
| 1940 |
return io.ErrUnexpectedEOF |
| 1941 |
} |
| 1942 |
iNdEx += skippy |
| 1943 |
} |
| 1944 |
} |
| 1945 |
|
| 1946 |
if iNdEx > l { |
| 1947 |
return io.ErrUnexpectedEOF |
| 1948 |
} |
| 1949 |
return nil |
| 1950 |
} |
| 1951 |
func (m *NebulaControl) Unmarshal(dAtA []byte) error { |
| 1952 |
l := len(dAtA) |
| 1953 |
iNdEx := 0 |
| 1954 |
for iNdEx < l { |
| 1955 |
preIndex := iNdEx |
| 1956 |
var wire uint64 |
| 1957 |
for shift := uint(0); ; shift += 7 { |
| 1958 |
if shift >= 64 { |
| 1959 |
return ErrIntOverflowNebula |
| 1960 |
} |
| 1961 |
if iNdEx >= l { |
| 1962 |
return io.ErrUnexpectedEOF |
| 1963 |
} |
| 1964 |
b := dAtA[iNdEx] |
| 1965 |
iNdEx++ |
| 1966 |
wire |= uint64(b&0x7F) << shift |
| 1967 |
if b < 0x80 { |
| 1968 |
break |
| 1969 |
} |
| 1970 |
} |
| 1971 |
fieldNum := int32(wire >> 3) |
| 1972 |
wireType := int(wire & 0x7) |
| 1973 |
if wireType == 4 { |
| 1974 |
return fmt.Errorf("proto: NebulaControl: wiretype end group for non-group") |
| 1975 |
} |
| 1976 |
if fieldNum <= 0 { |
| 1977 |
return fmt.Errorf("proto: NebulaControl: illegal tag %d (wire type %d)", fieldNum, wire) |
| 1978 |
} |
| 1979 |
switch fieldNum { |
| 1980 |
case 1: |
| 1981 |
if wireType != 0 { |
| 1982 |
return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) |
| 1983 |
} |
| 1984 |
m.Type = 0 |
| 1985 |
for shift := uint(0); ; shift += 7 { |
| 1986 |
if shift >= 64 { |
| 1987 |
return ErrIntOverflowNebula |
| 1988 |
} |
| 1989 |
if iNdEx >= l { |
| 1990 |
return io.ErrUnexpectedEOF |
| 1991 |
} |
| 1992 |
b := dAtA[iNdEx] |
| 1993 |
iNdEx++ |
| 1994 |
m.Type |= NebulaControl_MessageType(b&0x7F) << shift |
| 1995 |
if b < 0x80 { |
| 1996 |
break |
| 1997 |
} |
| 1998 |
} |
| 1999 |
case 2: |
| 2000 |
if wireType != 0 { |
| 2001 |
return fmt.Errorf("proto: wrong wireType = %d for field InitiatorRelayIndex", wireType) |
| 2002 |
} |
| 2003 |
m.InitiatorRelayIndex = 0 |
| 2004 |
for shift := uint(0); ; shift += 7 { |
| 2005 |
if shift >= 64 { |
| 2006 |
return ErrIntOverflowNebula |
| 2007 |
} |
| 2008 |
if iNdEx >= l { |
| 2009 |
return io.ErrUnexpectedEOF |
| 2010 |
} |
| 2011 |
b := dAtA[iNdEx] |
| 2012 |
iNdEx++ |
| 2013 |
m.InitiatorRelayIndex |= uint32(b&0x7F) << shift |
| 2014 |
if b < 0x80 { |
| 2015 |
break |
| 2016 |
} |
| 2017 |
} |
| 2018 |
case 3: |
| 2019 |
if wireType != 0 { |
| 2020 |
return fmt.Errorf("proto: wrong wireType = %d for field ResponderRelayIndex", wireType) |
| 2021 |
} |
| 2022 |
m.ResponderRelayIndex = 0 |
| 2023 |
for shift := uint(0); ; shift += 7 { |
| 2024 |
if shift >= 64 { |
| 2025 |
return ErrIntOverflowNebula |
| 2026 |
} |
| 2027 |
if iNdEx >= l { |
| 2028 |
return io.ErrUnexpectedEOF |
| 2029 |
} |
| 2030 |
b := dAtA[iNdEx] |
| 2031 |
iNdEx++ |
| 2032 |
m.ResponderRelayIndex |= uint32(b&0x7F) << shift |
| 2033 |
if b < 0x80 { |
| 2034 |
break |
| 2035 |
} |
| 2036 |
} |
| 2037 |
case 4: |
| 2038 |
if wireType != 0 { |
| 2039 |
return fmt.Errorf("proto: wrong wireType = %d for field OldRelayToAddr", wireType) |
| 2040 |
} |
| 2041 |
m.OldRelayToAddr = 0 |
| 2042 |
for shift := uint(0); ; shift += 7 { |
| 2043 |
if shift >= 64 { |
| 2044 |
return ErrIntOverflowNebula |
| 2045 |
} |
| 2046 |
if iNdEx >= l { |
| 2047 |
return io.ErrUnexpectedEOF |
| 2048 |
} |
| 2049 |
b := dAtA[iNdEx] |
| 2050 |
iNdEx++ |
| 2051 |
m.OldRelayToAddr |= uint32(b&0x7F) << shift |
| 2052 |
if b < 0x80 { |
| 2053 |
break |
| 2054 |
} |
| 2055 |
} |
| 2056 |
case 5: |
| 2057 |
if wireType != 0 { |
| 2058 |
return fmt.Errorf("proto: wrong wireType = %d for field OldRelayFromAddr", wireType) |
| 2059 |
} |
| 2060 |
m.OldRelayFromAddr = 0 |
| 2061 |
for shift := uint(0); ; shift += 7 { |
| 2062 |
if shift >= 64 { |
| 2063 |
return ErrIntOverflowNebula |
| 2064 |
} |
| 2065 |
if iNdEx >= l { |
| 2066 |
return io.ErrUnexpectedEOF |
| 2067 |
} |
| 2068 |
b := dAtA[iNdEx] |
| 2069 |
iNdEx++ |
| 2070 |
m.OldRelayFromAddr |= uint32(b&0x7F) << shift |
| 2071 |
if b < 0x80 { |
| 2072 |
break |
| 2073 |
} |
| 2074 |
} |
| 2075 |
case 6: |
| 2076 |
if wireType != 2 { |
| 2077 |
return fmt.Errorf("proto: wrong wireType = %d for field RelayToAddr", wireType) |
| 2078 |
} |
| 2079 |
var msglen int |
| 2080 |
for shift := uint(0); ; shift += 7 { |
| 2081 |
if shift >= 64 { |
| 2082 |
return ErrIntOverflowNebula |
| 2083 |
} |
| 2084 |
if iNdEx >= l { |
| 2085 |
return io.ErrUnexpectedEOF |
| 2086 |
} |
| 2087 |
b := dAtA[iNdEx] |
| 2088 |
iNdEx++ |
| 2089 |
msglen |= int(b&0x7F) << shift |
| 2090 |
if b < 0x80 { |
| 2091 |
break |
| 2092 |
} |
| 2093 |
} |
| 2094 |
if msglen < 0 { |
| 2095 |
return ErrInvalidLengthNebula |
| 2096 |
} |
| 2097 |
postIndex := iNdEx + msglen |
| 2098 |
if postIndex < 0 { |
| 2099 |
return ErrInvalidLengthNebula |
| 2100 |
} |
| 2101 |
if postIndex > l { |
| 2102 |
return io.ErrUnexpectedEOF |
| 2103 |
} |
| 2104 |
if m.RelayToAddr == nil { |
| 2105 |
m.RelayToAddr = &Addr{} |
| 2106 |
} |
| 2107 |
if err := m.RelayToAddr.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 2108 |
return err |
| 2109 |
} |
| 2110 |
iNdEx = postIndex |
| 2111 |
case 7: |
| 2112 |
if wireType != 2 { |
| 2113 |
return fmt.Errorf("proto: wrong wireType = %d for field RelayFromAddr", wireType) |
| 2114 |
} |
| 2115 |
var msglen int |
| 2116 |
for shift := uint(0); ; shift += 7 { |
| 2117 |
if shift >= 64 { |
| 2118 |
return ErrIntOverflowNebula |
| 2119 |
} |
| 2120 |
if iNdEx >= l { |
| 2121 |
return io.ErrUnexpectedEOF |
| 2122 |
} |
| 2123 |
b := dAtA[iNdEx] |
| 2124 |
iNdEx++ |
| 2125 |
msglen |= int(b&0x7F) << shift |
| 2126 |
if b < 0x80 { |
| 2127 |
break |
| 2128 |
} |
| 2129 |
} |
| 2130 |
if msglen < 0 { |
| 2131 |
return ErrInvalidLengthNebula |
| 2132 |
} |
| 2133 |
postIndex := iNdEx + msglen |
| 2134 |
if postIndex < 0 { |
| 2135 |
return ErrInvalidLengthNebula |
| 2136 |
} |
| 2137 |
if postIndex > l { |
| 2138 |
return io.ErrUnexpectedEOF |
| 2139 |
} |
| 2140 |
if m.RelayFromAddr == nil { |
| 2141 |
m.RelayFromAddr = &Addr{} |
| 2142 |
} |
| 2143 |
if err := m.RelayFromAddr.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| 2144 |
return err |
| 2145 |
} |
| 2146 |
iNdEx = postIndex |
| 2147 |
default: |
| 2148 |
iNdEx = preIndex |
| 2149 |
skippy, err := skipNebula(dAtA[iNdEx:]) |
| 2150 |
if err != nil { |
| 2151 |
return err |
| 2152 |
} |
| 2153 |
if (skippy < 0) || (iNdEx+skippy) < 0 { |
| 2154 |
return ErrInvalidLengthNebula |
| 2155 |
} |
| 2156 |
if (iNdEx + skippy) > l { |
| 2157 |
return io.ErrUnexpectedEOF |
| 2158 |
} |
| 2159 |
iNdEx += skippy |
| 2160 |
} |
| 2161 |
} |
| 2162 |
|
| 2163 |
if iNdEx > l { |
| 2164 |
return io.ErrUnexpectedEOF |
| 2165 |
} |
| 2166 |
return nil |
| 2167 |
} |
| 2168 |
func skipNebula(dAtA []byte) (n int, err error) { |
| 2169 |
l := len(dAtA) |
| 2170 |
iNdEx := 0 |
| 2171 |
depth := 0 |
| 2172 |
for iNdEx < l { |
| 2173 |
var wire uint64 |
| 2174 |
for shift := uint(0); ; shift += 7 { |
| 2175 |
if shift >= 64 { |
| 2176 |
return 0, ErrIntOverflowNebula |
| 2177 |
} |
| 2178 |
if iNdEx >= l { |
| 2179 |
return 0, io.ErrUnexpectedEOF |
| 2180 |
} |
| 2181 |
b := dAtA[iNdEx] |
| 2182 |
iNdEx++ |
| 2183 |
wire |= (uint64(b) & 0x7F) << shift |
| 2184 |
if b < 0x80 { |
| 2185 |
break |
| 2186 |
} |
| 2187 |
} |
| 2188 |
wireType := int(wire & 0x7) |
| 2189 |
switch wireType { |
| 2190 |
case 0: |
| 2191 |
for shift := uint(0); ; shift += 7 { |
| 2192 |
if shift >= 64 { |
| 2193 |
return 0, ErrIntOverflowNebula |
| 2194 |
} |
| 2195 |
if iNdEx >= l { |
| 2196 |
return 0, io.ErrUnexpectedEOF |
| 2197 |
} |
| 2198 |
iNdEx++ |
| 2199 |
if dAtA[iNdEx-1] < 0x80 { |
| 2200 |
break |
| 2201 |
} |
| 2202 |
} |
| 2203 |
case 1: |
| 2204 |
iNdEx += 8 |
| 2205 |
case 2: |
| 2206 |
var length int |
| 2207 |
for shift := uint(0); ; shift += 7 { |
| 2208 |
if shift >= 64 { |
| 2209 |
return 0, ErrIntOverflowNebula |
| 2210 |
} |
| 2211 |
if iNdEx >= l { |
| 2212 |
return 0, io.ErrUnexpectedEOF |
| 2213 |
} |
| 2214 |
b := dAtA[iNdEx] |
| 2215 |
iNdEx++ |
| 2216 |
length |= (int(b) & 0x7F) << shift |
| 2217 |
if b < 0x80 { |
| 2218 |
break |
| 2219 |
} |
| 2220 |
} |
| 2221 |
if length < 0 { |
| 2222 |
return 0, ErrInvalidLengthNebula |
| 2223 |
} |
| 2224 |
iNdEx += length |
| 2225 |
case 3: |
| 2226 |
depth++ |
| 2227 |
case 4: |
| 2228 |
if depth == 0 { |
| 2229 |
return 0, ErrUnexpectedEndOfGroupNebula |
| 2230 |
} |
| 2231 |
depth-- |
| 2232 |
case 5: |
| 2233 |
iNdEx += 4 |
| 2234 |
default: |
| 2235 |
return 0, fmt.Errorf("proto: illegal wireType %d", wireType) |
| 2236 |
} |
| 2237 |
if iNdEx < 0 { |
| 2238 |
return 0, ErrInvalidLengthNebula |
| 2239 |
} |
| 2240 |
if depth == 0 { |
| 2241 |
return iNdEx, nil |
| 2242 |
} |
| 2243 |
} |
| 2244 |
return 0, io.ErrUnexpectedEOF |
| 2245 |
} |
| 2246 |
|
| 2247 |
var ( |
| 2248 |
ErrInvalidLengthNebula = fmt.Errorf("proto: negative length found during unmarshaling") |
| 2249 |
ErrIntOverflowNebula = fmt.Errorf("proto: integer overflow") |
| 2250 |
ErrUnexpectedEndOfGroupNebula = fmt.Errorf("proto: unexpected end of group") |
| 2251 |
) |