| 1 |
// This file documents the wire format the nebula handshake speaks. It is |
| 2 |
// not run through protoc; the encoder/decoder in payload.go is hand-written |
| 3 |
// against this shape directly to keep the parser narrow and panic-free. |
| 4 |
// |
| 5 |
// Any change to the wire format must be reflected here, and adding a new |
| 6 |
// field requires updating MarshalPayload / unmarshalPayloadDetails together |
| 7 |
// with the field-uniqueness and wire-type checks in those functions. |
| 8 |
|
| 9 |
syntax = "proto3"; |
| 10 |
package nebula.handshake; |
| 11 |
|
| 12 |
message NebulaHandshake { |
| 13 |
NebulaHandshakeDetails Details = 1; |
| 14 |
bytes Hmac = 2; |
| 15 |
} |
| 16 |
|
| 17 |
message NebulaHandshakeDetails { |
| 18 |
bytes Cert = 1; |
| 19 |
uint32 InitiatorIndex = 2; |
| 20 |
uint32 ResponderIndex = 3; |
| 21 |
// Cookie was reserved for an anti-DoS mechanism that was never |
| 22 |
// implemented. No released version of nebula has ever populated it; the |
| 23 |
// hand-written parser silently skips it on read. |
| 24 |
uint64 Cookie = 4 [deprecated = true]; |
| 25 |
uint64 Time = 5; |
| 26 |
uint32 CertVersion = 8; |
| 27 |
// reserved for WIP multiport |
| 28 |
reserved 6, 7; |
| 29 |
} |