diff options
author | Tushar Pankaj <tushar.s.pankaj@gmail.com> | 2018-11-12 17:13:32 -0600 |
---|---|---|
committer | Tushar Pankaj <tushar.s.pankaj@gmail.com> | 2018-11-12 17:13:32 -0600 |
commit | 5d717e37baaa9882ea2356fa24a2b85beaf51558 (patch) | |
tree | 1e0d243960a62af56528c8e1ecdcb2d08c18046c /protocol.capnp | |
parent | Style fixes (diff) | |
download | wg-dynamic-5d717e37baaa9882ea2356fa24a2b85beaf51558.tar.xz wg-dynamic-5d717e37baaa9882ea2356fa24a2b85beaf51558.zip |
Add IP addr structs to protocol
Signed-off-by: Tushar Pankaj <tushar.s.pankaj@gmail.com>
Diffstat (limited to 'protocol.capnp')
-rw-r--r-- | protocol.capnp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/protocol.capnp b/protocol.capnp index 64463e9..69f5db4 100644 --- a/protocol.capnp +++ b/protocol.capnp @@ -14,11 +14,21 @@ struct WgClientMsg { } } +# IPv4 address +struct WgIpv4Addr { + addr @0 :UInt32; # IPv4 address + cidr @1 :UInt8; # CIDR of IPv4 address +} + +# IPv6 address +struct WgIpv6Addr { + addr @0 :Data; # IPv6 address + cidr @1: UInt8; # CIDR of IPv6 address +} + # server response message struct WgServerSimpleMsg { - leasedIpv4 @0 :UInt32; # dynamic IPv4 leased to client - leasedIpv4Cidr @1 :UInt32; # CIDR of dynamic IPv4 leased to client - leaseTimeout @2 :UInt32; # activity timeout for the IP lease in seconds - route @3 :UInt32; # route for client - routeCidr @4 :UInt32; # CIDR of route for client + leasedIpv4 @0 :WgIpv4Addr; # dynamic IPv4 leased to client + leaseTimeout @1 :UInt32; # activity timeout for the IP lease in seconds + ipv4Routes @2 :List(WgIpv4Addr); # IPv4 routes for client } |