mirror of
https://github.com/slackhq/nebula.git
synced 2026-08-16 01:27:04 +02:00
42 lines
1.5 KiB
Protocol Buffer
42 lines
1.5 KiB
Protocol Buffer
// This file documents the wire format the nebula handshake speaks. It is
|
|
// not run through protoc; the encoder/decoder in payload.go is hand-written
|
|
// against this shape directly to keep the parser narrow and panic-free.
|
|
//
|
|
// Any change to the wire format must be reflected here, and adding a new
|
|
// field requires updating MarshalPayload / unmarshalPayloadDetails together
|
|
// with the field-uniqueness and wire-type checks in those functions.
|
|
|
|
syntax = "proto3";
|
|
package nebula.handshake;
|
|
|
|
message NebulaHandshake {
|
|
NebulaHandshakeDetails Details = 1;
|
|
bytes Hmac = 2;
|
|
}
|
|
|
|
message NebulaHandshakeDetails {
|
|
bytes Cert = 1;
|
|
uint32 InitiatorIndex = 2;
|
|
uint32 ResponderIndex = 3;
|
|
// Cookie was reserved for an anti-DoS mechanism that was never
|
|
// implemented. No released version of nebula has ever populated it; the
|
|
// hand-written parser silently skips it on read.
|
|
uint64 Cookie = 4 [deprecated = true];
|
|
uint64 Time = 5;
|
|
// Multiport lane negotiation. Absent on hosts without multiport enabled;
|
|
// vanilla nebula treats 6 and 7 as unknown fields and skips them.
|
|
LaneDetails InitiatorLanes = 6;
|
|
LaneDetails ResponderLanes = 7;
|
|
uint32 CertVersion = 8;
|
|
}
|
|
|
|
// LaneDetails advertises a host's multiport lane capability. On a base
|
|
// handshake LaneIndex is 0 and PortCount/BasePort describe the sender's
|
|
// consecutively bound UDP ports. On a lane handshake the initiator sets
|
|
// LaneIndex to its (nonzero) lane number.
|
|
message LaneDetails {
|
|
uint32 PortCount = 1;
|
|
uint32 BasePort = 2;
|
|
uint32 LaneIndex = 3;
|
|
}
|