1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: source/libsweatyballs/link/message/types/protobufs/link.proto
3 
4 module link;
5 
6 import google.protobuf;
7 
8 enum protocVersion = 3014000;
9 
10 class LinkMessage
11 {
12     @Proto(1) LinkMessageType type = protoDefaultValue!LinkMessageType;
13     @Proto(2) bytes payload = protoDefaultValue!bytes;
14     @Proto(3) string publicKey = protoDefaultValue!string;
15     @Proto(4) string signature = protoDefaultValue!string;
16     @Proto(5) string neighborPort = protoDefaultValue!string;
17 }
18 
19 class Advertisement
20 {
21     @Proto(2) RouteEntry[] routes = protoDefaultValue!(RouteEntry[]);
22 }
23 
24 class RouteEntry
25 {
26     @Proto(1) string address = protoDefaultValue!string;
27     @Proto(2) uint metric = protoDefaultValue!uint;
28     @Proto(3) string creationTime = protoDefaultValue!string;
29 }
30 
31 class Packet
32 {
33     @Proto(1) string fromKey = protoDefaultValue!string;
34     @Proto(2) string toKey = protoDefaultValue!string;
35     @Proto(3) string siganture = protoDefaultValue!string;
36     @Proto(4) bytes payload = protoDefaultValue!bytes;
37     @Proto(5) ulong ttl = protoDefaultValue!ulong;
38 }
39 
40 class PacketPayload
41 {
42     @Proto(1) PacketPayloadType type = protoDefaultValue!PacketPayloadType;
43     @Proto(2) bytes payload = protoDefaultValue!bytes;
44 }
45 
46 class SessionCTLMessage
47 {
48     @Proto(1) SessionCTLType type = protoDefaultValue!SessionCTLType;
49     @Proto(2) uint sessionCTRLID = protoDefaultValue!uint;
50 }
51 
52 class SessionMessage
53 {
54     @Proto(1) bytes payload = protoDefaultValue!bytes;
55 }
56 
57 enum LinkMessageType
58 {
59     ADVERTISEMENT = 0,
60     PACKET = 1,
61     SESSION = 2,
62 }
63 
64 enum PacketPayloadType
65 {
66     SESSION_CONTROL = 0,
67 }
68 
69 enum SessionCTLType
70 {
71     SESSION_CREATE = 0,
72     SESSION_CTL_ACK = 1,
73     SESSION_DESTROY = 2,
74     SESSION_SETNEWKEY = 3,
75 }