summaryrefslogtreecommitdiff
path: root/src/lib/pb
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/pb')
-rw-r--r--src/lib/pb/cep.proto39
-rw-r--r--src/lib/pb/enroll.proto41
-rw-r--r--src/lib/pb/ipcp.proto59
-rw-r--r--src/lib/pb/ipcp_config.proto93
-rw-r--r--src/lib/pb/irm.proto98
-rw-r--r--src/lib/pb/model.proto64
6 files changed, 394 insertions, 0 deletions
diff --git a/src/lib/pb/cep.proto b/src/lib/pb/cep.proto
new file mode 100644
index 00000000..d31cf4f7
--- /dev/null
+++ b/src/lib/pb/cep.proto
@@ -0,0 +1,39 @@
+/*
+ * Ouroboros - Copyright (C) 2016 - 2024
+ *
+ * Message for Connection Information in OCEP
+ *
+ * Dimitri Staessens <dimitri@ouroboros.rocks>
+ * Sander Vrijders <sander@ouroboros.rocks>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., http://www.fsf.org/about/contact/.
+ */
+
+syntax = "proto2";
+
+message fixed_conc_syntax_msg {
+ repeated uint32 fids = 1;
+ repeated uint32 lens = 2;
+}
+
+message cep_msg {
+ required string comp_name = 1;
+ required string protocol = 2;
+ required int32 pref_version = 3;
+ repeated int32 supp_version = 4;
+ required int32 pref_syntax = 5;
+ repeated int32 supp_syntax = 6;
+ optional fixed_conc_syntax_msg syntax_spec = 7;
+ required uint64 address = 8;
+}
diff --git a/src/lib/pb/enroll.proto b/src/lib/pb/enroll.proto
new file mode 100644
index 00000000..60e964c6
--- /dev/null
+++ b/src/lib/pb/enroll.proto
@@ -0,0 +1,41 @@
+/*
+ * Ouroboros - Copyright (C) 2016 - 2024
+ *
+ * Enrollment protocol
+ *
+ * Dimitri Staessens <dimitri@ouroboros.rocks>
+ * Sander Vrijders <sander@ouroboros.rocks>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., http://www.fsf.org/about/contact/.
+ */
+
+syntax = "proto2";
+import "ipcp_config.proto";
+
+message enroll_req_msg {
+ required bytes id = 1;
+}
+
+message enroll_resp_msg {
+ required bytes id = 1;
+ required int64 t_sec = 2;
+ required int32 t_nsec = 3;
+ required int32 response = 4;
+ optional ipcp_config_msg conf = 5;
+}
+
+message enroll_ack_msg {
+ required bytes id = 1;
+ required int32 result = 2;
+}
diff --git a/src/lib/pb/ipcp.proto b/src/lib/pb/ipcp.proto
new file mode 100644
index 00000000..c2c7f48b
--- /dev/null
+++ b/src/lib/pb/ipcp.proto
@@ -0,0 +1,59 @@
+/*
+ * Ouroboros - Copyright (C) 2016 - 2024
+ *
+ * Messages sent to IPCPds
+ *
+ * Dimitri Staessens <dimitri@ouroboros.rocks>
+ * Sander Vrijders <sander@ouroboros.rocks>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., http://www.fsf.org/about/contact/.
+ */
+
+syntax = "proto2";
+
+import "ipcp_config.proto";
+import "model.proto";
+
+
+enum ipcp_msg_code {
+ IPCP_BOOTSTRAP = 1;
+ IPCP_ENROLL = 2;
+ IPCP_REG = 3;
+ IPCP_UNREG = 4;
+ IPCP_QUERY = 5;
+ IPCP_FLOW_ALLOC = 6;
+ IPCP_FLOW_JOIN = 7;
+ IPCP_FLOW_ALLOC_RESP = 8;
+ IPCP_FLOW_DEALLOC = 9;
+ IPCP_CONNECT = 10;
+ IPCP_DISCONNECT = 11;
+ IPCP_REPLY = 12;
+}
+
+message ipcp_msg {
+ required ipcp_msg_code code = 1;
+ optional bytes hash = 2;
+ optional int32 flow_id = 3;
+ optional string dst = 4;
+ optional qosspec_msg qosspec = 5;
+ optional bytes pk = 6; /* piggyback */
+ optional ipcp_config_msg conf = 7;
+ optional int32 pid = 8;
+ optional layer_info_msg layer_info = 9;
+ optional int32 response = 10;
+ optional string comp = 11;
+ optional uint32 timeo_sec = 12;
+ optional sint32 mpl = 13;
+ optional int32 result = 14;
+}
diff --git a/src/lib/pb/ipcp_config.proto b/src/lib/pb/ipcp_config.proto
new file mode 100644
index 00000000..1308c6d1
--- /dev/null
+++ b/src/lib/pb/ipcp_config.proto
@@ -0,0 +1,93 @@
+/*
+ * Ouroboros - Copyright (C) 2016 - 2024
+ *
+ * Layer configuration message
+ *
+ * Dimitri Staessens <dimitri@ouroboros.rocks>
+ * Sander Vrijders <sander@ouroboros.rocks>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., http://www.fsf.org/about/contact/.
+ */
+
+syntax = "proto2";
+
+import "model.proto";
+
+
+message ls_config_msg {
+ required uint32 pol = 1;
+ required uint32 t_recalc = 2;
+ required uint32 t_update = 3;
+ required uint32 t_timeo = 4;
+}
+
+message routing_config_msg {
+ required uint32 pol = 1;
+ optional ls_config_msg ls = 2;
+}
+
+message dt_config_msg {
+ required uint32 addr_size = 1;
+ required uint32 eid_size = 2;
+ required uint32 max_ttl = 3;
+ required routing_config_msg routing = 4;
+}
+
+message dir_dht_config_msg {
+ required uint32 alpha = 1;
+ required uint32 k = 2;
+ required uint32 t_expire = 3;
+ required uint32 t_refresh = 4;
+ required uint32 t_replicate = 5;
+ required uint64 peer = 6;
+}
+
+message dir_config_msg {
+ required uint32 pol = 1;
+ optional dir_dht_config_msg dht = 2;
+}
+
+message uni_config_msg {
+ required dt_config_msg dt = 1;
+ required dir_config_msg dir = 2;
+ required uint32 addr_auth_type = 3;
+ required uint32 cong_avoid = 4;
+}
+
+message eth_config_msg {
+ required string dev = 1;
+ required uint32 ethertype = 2;
+}
+
+message udp4_config_msg {
+ required uint32 ip_addr = 1;
+ required uint32 port = 2;
+ required uint32 dns_addr = 3; /* set to 0 if unused */
+}
+
+message udp6_config_msg {
+ required bytes ip_addr = 1;
+ required uint32 port = 2;
+ required bytes dns_addr = 3; /* set to NULL if unused */
+}
+
+
+message ipcp_config_msg {
+ required layer_info_msg layer_info = 1;
+ required uint32 ipcp_type = 2;
+ optional uni_config_msg unicast = 3;
+ optional udp4_config_msg udp4 = 4;
+ optional udp6_config_msg udp6 = 5;
+ optional eth_config_msg eth = 6;
+}
diff --git a/src/lib/pb/irm.proto b/src/lib/pb/irm.proto
new file mode 100644
index 00000000..75f5f350
--- /dev/null
+++ b/src/lib/pb/irm.proto
@@ -0,0 +1,98 @@
+/*
+ * Ouroboros - Copyright (C) 2016 - 2024
+ *
+ * Messages sent to IRMd
+ *
+ * Dimitri Staessens <dimitri@ouroboros.rocks>
+ * Sander Vrijders <sander@ouroboros.rocks>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., http://www.fsf.org/about/contact/.
+ */
+
+syntax = "proto2";
+
+import "ipcp_config.proto";
+import "model.proto";
+
+enum irm_msg_code {
+ IRM_CREATE_IPCP = 1;
+ IPCP_CREATE_R = 2;
+ IRM_DESTROY_IPCP = 3;
+ IRM_LIST_IPCPS = 4;
+ IRM_BOOTSTRAP_IPCP = 5;
+ IRM_ENROLL_IPCP = 6;
+ IRM_CONNECT_IPCP = 7;
+ IRM_DISCONNECT_IPCP = 8;
+ IRM_BIND_PROGRAM = 9;
+ IRM_UNBIND_PROGRAM = 10;
+ IRM_PROC_ANNOUNCE = 11;
+ IRM_PROC_EXIT = 12;
+ IRM_BIND_PROCESS = 13;
+ IRM_UNBIND_PROCESS = 14;
+ IRM_CREATE_NAME = 15;
+ IRM_DESTROY_NAME = 16;
+ IRM_LIST_NAMES = 17;
+ IRM_REG_NAME = 18;
+ IRM_UNREG_NAME = 19;
+ IRM_FLOW_ALLOC = 20;
+ IRM_FLOW_ACCEPT = 21;
+ IRM_FLOW_JOIN = 22;
+ IRM_FLOW_DEALLOC = 23;
+ IPCP_FLOW_DEALLOC = 24;
+ IPCP_FLOW_REQ_ARR = 25;
+ IPCP_FLOW_ALLOC_REPLY = 26;
+ IRM_REPLY = 27;
+}
+
+message timespec_msg {
+ required uint64 tv_sec = 1;
+ required uint32 tv_nsec = 2;
+}
+
+message ipcp_list_msg {
+ required uint32 pid = 1;
+ required uint32 type = 2;
+ required string name = 3;
+ required string layer = 4;
+ required uint32 hash_algo = 5;
+}
+
+message irm_msg {
+ required irm_msg_code code = 1;
+ optional string prog = 2;
+ optional sint32 pid = 3;
+ optional string name = 4;
+ optional flow_info_msg flow_info = 5;
+ optional ipcp_info_msg ipcp_info = 6;
+ optional name_info_msg name_info = 7;
+ optional string layer = 8;
+ repeated string exec = 9;
+ optional sint32 response = 10;
+ optional string dst = 11;
+ optional bytes hash = 12;
+ optional sint32 flow_id = 13;
+ optional qosspec_msg qosspec = 14;
+ optional ipcp_config_msg conf = 15;
+ optional uint32 opts = 16;
+ repeated ipcp_list_msg ipcps = 17;
+ repeated name_info_msg names = 18;
+ optional timespec_msg timeo = 19;
+ optional sint32 mpl = 20;
+ optional string comp = 21;
+ optional bytes pk = 22; /* piggyback */
+ optional bytes symmkey = 23;
+ optional uint32 timeo_sec = 24;
+ optional uint32 timeo_nsec = 25;
+ optional sint32 result = 26;
+}
diff --git a/src/lib/pb/model.proto b/src/lib/pb/model.proto
new file mode 100644
index 00000000..7b06e434
--- /dev/null
+++ b/src/lib/pb/model.proto
@@ -0,0 +1,64 @@
+/*
+ * Ouroboros - Copyright (C) 2016 - 2024
+ *
+ * Model description messages
+ *
+ * Dimitri Staessens <dimitri@ouroboros.rocks>
+ * Sander Vrijders <sander@ouroboros.rocks>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., http://www.fsf.org/about/contact/.
+ */
+
+syntax = "proto2";
+
+message qosspec_msg {
+ required uint32 delay = 1; /* In ms. */
+ required uint64 bandwidth = 2; /* In bits/s. */
+ required uint32 availability = 3; /* Class of 9s. */
+ required uint32 loss = 4; /* Packet loss. */
+ required uint32 ber = 5; /* Bit error rate, ppb. */
+ required uint32 in_order = 6; /* In-order delivery. */
+ required uint32 max_gap = 7; /* In ms. */
+ required uint32 timeout = 8; /* Timeout in ms. */
+}
+
+message flow_info_msg {
+ required uint32 id = 1;
+ required uint32 n_pid = 2;
+ required uint32 n_1_pid = 3;
+ required uint32 mpl = 4;
+ required uint32 state = 5;
+ required qosspec_msg qos = 6;
+}
+
+message name_info_msg {
+ required string name = 1;
+ required uint32 pol_lb = 2;
+ required string skey = 3;
+ required string scrt = 4;
+ required string ckey = 5;
+ required string ccrt = 6;
+}
+
+message layer_info_msg {
+ required string name = 1;
+ required uint32 dir_hash_algo = 2;
+}
+
+message ipcp_info_msg {
+ required uint32 type = 1;
+ required string name = 2;
+ required uint32 pid = 3;
+ required uint32 state = 4;
+}