aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--protocol.capnp6
-rw-r--r--protocol.capnp.c24
-rw-r--r--protocol.capnp.h28
3 files changed, 29 insertions, 29 deletions
diff --git a/protocol.capnp b/protocol.capnp
index 69f5db4..cef43fa 100644
--- a/protocol.capnp
+++ b/protocol.capnp
@@ -10,7 +10,7 @@ struct WgClientMsg {
request @0 :WgClientRequestType;
enum WgClientRequestType {
- simple @0;
+ simpleIpv4 @0;
}
}
@@ -26,8 +26,8 @@ struct WgIpv6Addr {
cidr @1: UInt8; # CIDR of IPv6 address
}
-# server response message
-struct WgServerSimpleMsg {
+# server response messages
+struct WgServerSimpleIpv4Msg {
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
diff --git a/protocol.capnp.c b/protocol.capnp.c
index b13f7c6..908146a 100644
--- a/protocol.capnp.c
+++ b/protocol.capnp.c
@@ -106,37 +106,37 @@ void set_WgIpv6Addr(const struct WgIpv6Addr *s, WgIpv6Addr_list l, int i) {
write_WgIpv6Addr(s, p);
}
-WgServerSimpleMsg_ptr new_WgServerSimpleMsg(struct capn_segment *s) {
- WgServerSimpleMsg_ptr p;
+WgServerSimpleIpv4Msg_ptr new_WgServerSimpleIpv4Msg(struct capn_segment *s) {
+ WgServerSimpleIpv4Msg_ptr p;
p.p = capn_new_struct(s, 8, 2);
return p;
}
-WgServerSimpleMsg_list new_WgServerSimpleMsg_list(struct capn_segment *s, int len) {
- WgServerSimpleMsg_list p;
+WgServerSimpleIpv4Msg_list new_WgServerSimpleIpv4Msg_list(struct capn_segment *s, int len) {
+ WgServerSimpleIpv4Msg_list p;
p.p = capn_new_list(s, len, 8, 2);
return p;
}
-void read_WgServerSimpleMsg(struct WgServerSimpleMsg *s capnp_unused, WgServerSimpleMsg_ptr p) {
+void read_WgServerSimpleIpv4Msg(struct WgServerSimpleIpv4Msg *s capnp_unused, WgServerSimpleIpv4Msg_ptr p) {
capn_resolve(&p.p);
capnp_use(s);
s->leasedIpv4.p = capn_getp(p.p, 0, 0);
s->leaseTimeout = capn_read32(p.p, 0);
s->ipv4Routes.p = capn_getp(p.p, 1, 0);
}
-void write_WgServerSimpleMsg(const struct WgServerSimpleMsg *s capnp_unused, WgServerSimpleMsg_ptr p) {
+void write_WgServerSimpleIpv4Msg(const struct WgServerSimpleIpv4Msg *s capnp_unused, WgServerSimpleIpv4Msg_ptr p) {
capn_resolve(&p.p);
capnp_use(s);
capn_setp(p.p, 0, s->leasedIpv4.p);
capn_write32(p.p, 0, s->leaseTimeout);
capn_setp(p.p, 1, s->ipv4Routes.p);
}
-void get_WgServerSimpleMsg(struct WgServerSimpleMsg *s, WgServerSimpleMsg_list l, int i) {
- WgServerSimpleMsg_ptr p;
+void get_WgServerSimpleIpv4Msg(struct WgServerSimpleIpv4Msg *s, WgServerSimpleIpv4Msg_list l, int i) {
+ WgServerSimpleIpv4Msg_ptr p;
p.p = capn_getp(l.p, i, 0);
- read_WgServerSimpleMsg(s, p);
+ read_WgServerSimpleIpv4Msg(s, p);
}
-void set_WgServerSimpleMsg(const struct WgServerSimpleMsg *s, WgServerSimpleMsg_list l, int i) {
- WgServerSimpleMsg_ptr p;
+void set_WgServerSimpleIpv4Msg(const struct WgServerSimpleIpv4Msg *s, WgServerSimpleIpv4Msg_list l, int i) {
+ WgServerSimpleIpv4Msg_ptr p;
p.p = capn_getp(l.p, i, 0);
- write_WgServerSimpleMsg(s, p);
+ write_WgServerSimpleIpv4Msg(s, p);
}
diff --git a/protocol.capnp.h b/protocol.capnp.h
index bf8a949..e553913 100644
--- a/protocol.capnp.h
+++ b/protocol.capnp.h
@@ -23,20 +23,20 @@ extern "C" {
struct WgClientMsg;
struct WgIpv4Addr;
struct WgIpv6Addr;
-struct WgServerSimpleMsg;
+struct WgServerSimpleIpv4Msg;
typedef struct {capn_ptr p;} WgClientMsg_ptr;
typedef struct {capn_ptr p;} WgIpv4Addr_ptr;
typedef struct {capn_ptr p;} WgIpv6Addr_ptr;
-typedef struct {capn_ptr p;} WgServerSimpleMsg_ptr;
+typedef struct {capn_ptr p;} WgServerSimpleIpv4Msg_ptr;
typedef struct {capn_ptr p;} WgClientMsg_list;
typedef struct {capn_ptr p;} WgIpv4Addr_list;
typedef struct {capn_ptr p;} WgIpv6Addr_list;
-typedef struct {capn_ptr p;} WgServerSimpleMsg_list;
+typedef struct {capn_ptr p;} WgServerSimpleIpv4Msg_list;
enum WgClientMsg_WgClientRequestType {
- WgClientMsg_WgClientRequestType_simple = 0
+ WgClientMsg_WgClientRequestType_simpleIpv4 = 0
};
struct WgClientMsg {
@@ -71,47 +71,47 @@ static const size_t WgIpv6Addr_pointer_count = 1;
static const size_t WgIpv6Addr_struct_bytes_count = 16;
-struct WgServerSimpleMsg {
+struct WgServerSimpleIpv4Msg {
WgIpv4Addr_ptr leasedIpv4;
uint32_t leaseTimeout;
WgIpv4Addr_list ipv4Routes;
};
-static const size_t WgServerSimpleMsg_word_count = 1;
+static const size_t WgServerSimpleIpv4Msg_word_count = 1;
-static const size_t WgServerSimpleMsg_pointer_count = 2;
+static const size_t WgServerSimpleIpv4Msg_pointer_count = 2;
-static const size_t WgServerSimpleMsg_struct_bytes_count = 24;
+static const size_t WgServerSimpleIpv4Msg_struct_bytes_count = 24;
WgClientMsg_ptr new_WgClientMsg(struct capn_segment*);
WgIpv4Addr_ptr new_WgIpv4Addr(struct capn_segment*);
WgIpv6Addr_ptr new_WgIpv6Addr(struct capn_segment*);
-WgServerSimpleMsg_ptr new_WgServerSimpleMsg(struct capn_segment*);
+WgServerSimpleIpv4Msg_ptr new_WgServerSimpleIpv4Msg(struct capn_segment*);
WgClientMsg_list new_WgClientMsg_list(struct capn_segment*, int len);
WgIpv4Addr_list new_WgIpv4Addr_list(struct capn_segment*, int len);
WgIpv6Addr_list new_WgIpv6Addr_list(struct capn_segment*, int len);
-WgServerSimpleMsg_list new_WgServerSimpleMsg_list(struct capn_segment*, int len);
+WgServerSimpleIpv4Msg_list new_WgServerSimpleIpv4Msg_list(struct capn_segment*, int len);
void read_WgClientMsg(struct WgClientMsg*, WgClientMsg_ptr);
void read_WgIpv4Addr(struct WgIpv4Addr*, WgIpv4Addr_ptr);
void read_WgIpv6Addr(struct WgIpv6Addr*, WgIpv6Addr_ptr);
-void read_WgServerSimpleMsg(struct WgServerSimpleMsg*, WgServerSimpleMsg_ptr);
+void read_WgServerSimpleIpv4Msg(struct WgServerSimpleIpv4Msg*, WgServerSimpleIpv4Msg_ptr);
void write_WgClientMsg(const struct WgClientMsg*, WgClientMsg_ptr);
void write_WgIpv4Addr(const struct WgIpv4Addr*, WgIpv4Addr_ptr);
void write_WgIpv6Addr(const struct WgIpv6Addr*, WgIpv6Addr_ptr);
-void write_WgServerSimpleMsg(const struct WgServerSimpleMsg*, WgServerSimpleMsg_ptr);
+void write_WgServerSimpleIpv4Msg(const struct WgServerSimpleIpv4Msg*, WgServerSimpleIpv4Msg_ptr);
void get_WgClientMsg(struct WgClientMsg*, WgClientMsg_list, int i);
void get_WgIpv4Addr(struct WgIpv4Addr*, WgIpv4Addr_list, int i);
void get_WgIpv6Addr(struct WgIpv6Addr*, WgIpv6Addr_list, int i);
-void get_WgServerSimpleMsg(struct WgServerSimpleMsg*, WgServerSimpleMsg_list, int i);
+void get_WgServerSimpleIpv4Msg(struct WgServerSimpleIpv4Msg*, WgServerSimpleIpv4Msg_list, int i);
void set_WgClientMsg(const struct WgClientMsg*, WgClientMsg_list, int i);
void set_WgIpv4Addr(const struct WgIpv4Addr*, WgIpv4Addr_list, int i);
void set_WgIpv6Addr(const struct WgIpv6Addr*, WgIpv6Addr_list, int i);
-void set_WgServerSimpleMsg(const struct WgServerSimpleMsg*, WgServerSimpleMsg_list, int i);
+void set_WgServerSimpleIpv4Msg(const struct WgServerSimpleIpv4Msg*, WgServerSimpleIpv4Msg_list, int i);
#ifdef __cplusplus
}