From c80c93f11dbfb1b0c07f9a6f8b8d91024e5db507 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Sun, 8 Mar 2020 13:29:21 +0100 Subject: irm: Revise naming API This revises the naming API to treat names (or reg_name in the source) as first-class citizens of the architecture. This is more in line with the way they are described in the article. Operations have been added to create/destroy names independently of registering. This was previously done only as part of register, and there was no way to delete a name from the IRMd. The create call now allows specifying a policy for load-balancing incoming flows for a name. The default is the new round-robin load-balancer, the previous behaviour is still available as a spillover load-balancer. The register calls will still create a name if it doesn't exist, with the default round-robin load-balancer. The tools now have a "name" section, so the format is now irm name ... Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/lib/irmd_messages.proto | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) (limited to 'src/lib/irmd_messages.proto') diff --git a/src/lib/irmd_messages.proto b/src/lib/irmd_messages.proto index c8749699..5b23ee9d 100644 --- a/src/lib/irmd_messages.proto +++ b/src/lib/irmd_messages.proto @@ -39,15 +39,18 @@ enum irm_msg_code { IRM_PROC_ANNOUNCE = 11; IRM_BIND_PROCESS = 12; IRM_UNBIND_PROCESS = 13; - IRM_REG = 14; - IRM_UNREG = 15; - IRM_FLOW_ALLOC = 16; - IRM_FLOW_ACCEPT = 17; - IRM_FLOW_JOIN = 18; - IRM_FLOW_DEALLOC = 19; - IPCP_FLOW_REQ_ARR = 20; - IPCP_FLOW_ALLOC_REPLY = 21; - IRM_REPLY = 22; + IRM_CREATE_NAME = 14; + IRM_DESTROY_NAME = 15; + IRM_LIST_NAMES = 16; + IRM_REG_NAME = 17; + IRM_UNREG_NAME = 18; + IRM_FLOW_ALLOC = 19; + IRM_FLOW_ACCEPT = 20; + IRM_FLOW_JOIN = 21; + IRM_FLOW_DEALLOC = 22; + IPCP_FLOW_REQ_ARR = 23; + IPCP_FLOW_ALLOC_REPLY = 24; + IRM_REPLY = 25; }; message ipcp_info_msg { @@ -57,6 +60,11 @@ message ipcp_info_msg { required string layer = 4; }; +message name_info_msg { + required string name = 1; + required uint32 pol_lb = 2; +}; + message irm_msg { required irm_msg_code code = 1; optional string prog = 2; @@ -73,9 +81,10 @@ message irm_msg { optional ipcp_config_msg conf = 13; optional uint32 opts = 14; repeated ipcp_info_msg ipcps = 15; - optional uint32 timeo_sec = 16; - optional uint32 timeo_nsec = 17; - optional string comp = 18; - optional bytes pk = 19; /* piggyback */ - optional sint32 result = 20; + repeated name_info_msg names = 16; + optional uint32 timeo_sec = 17; + optional uint32 timeo_nsec = 18; + optional string comp = 19; + optional bytes pk = 20; /* piggyback */ + optional sint32 result = 21; }; -- cgit v1.2.3