From 2352cbc91e6be9bcd73ca2794372b1ed8361448e Mon Sep 17 00:00:00 2001 From: Tushar Pankaj Date: Wed, 31 Oct 2018 20:08:05 -0500 Subject: First draft of protocol Signed-off-by: Tushar Pankaj --- protocol.h | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/protocol.h b/protocol.h index 47199cd..2edb942 100644 --- a/protocol.h +++ b/protocol.h @@ -3,7 +3,26 @@ * Copyright (C) 2018 Wireguard LLC */ -#ifndef NEGOTIATION_H -#define NEGOTIATION_H +#ifndef PROTOCOL_H +#define PROTOCOL_H + +#include + +/* 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 -- cgit v1.2.3-59-g8ed1b