diff options
author | Tushar Pankaj <tushar.s.pankaj@gmail.com> | 2018-10-31 20:08:05 -0500 |
---|---|---|
committer | Tushar Pankaj <tushar.s.pankaj@gmail.com> | 2018-11-06 20:12:49 -0600 |
commit | 2352cbc91e6be9bcd73ca2794372b1ed8361448e (patch) | |
tree | 33b310b3377409857b1b85db0687c14d853bf42b | |
parent | Write basic Makefile (diff) | |
download | wg-dynamic-2352cbc91e6be9bcd73ca2794372b1ed8361448e.tar.xz wg-dynamic-2352cbc91e6be9bcd73ca2794372b1ed8361448e.zip |
First draft of protocol
Signed-off-by: Tushar Pankaj <tushar.s.pankaj@gmail.com>
-rw-r--r-- | protocol.h | 23 |
1 files changed, 21 insertions, 2 deletions
@@ -3,7 +3,26 @@ * Copyright (C) 2018 Wireguard LLC */ -#ifndef NEGOTIATION_H -#define NEGOTIATION_H +#ifndef PROTOCOL_H +#define PROTOCOL_H + +#include <stdint.h> + +/* possible types of requests the client can make */ +enum wg_client_request = { WG_MINIMAL = 0 }; + +/* client request message */ +struct wg_client_message { + uint32_t request; /* what type of request to make */ +}; + +/* server request message */ +struct wg_server_message { + uint32_t leased_ip; /* dynamic IP leased to client */ + uint32_t leased_ip_cidr; /* CIDR of dynamic IP leased to client */ + uint32_t lease_timeout; /* activity timeout for the IP lease in seconds */ + uint32_t route; /* route for client */ + uint32_t route_cidr; /* CIDR of route for client */ +}; #endif |