diff options
author | dimitri staessens <dimitri.staessens@ugent.be> | 2017-08-28 18:54:22 +0200 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@ugent.be> | 2017-08-28 20:49:34 +0200 |
commit | 9de8dc4948cf7ce239232aae0889c39ffa39ede2 (patch) | |
tree | 396295b2d36f69ee55e5080e556891f11210aed8 /include | |
parent | 176698e8c2fd7ab8007b8074515d6144e7177d8e (diff) | |
download | ouroboros-9de8dc4948cf7ce239232aae0889c39ffa39ede2.tar.gz ouroboros-9de8dc4948cf7ce239232aae0889c39ffa39ede2.zip |
tools: Add tool to connect IPCP components
This enables user-written tools to instruct IPCPs to establish and
tear down connections (a.k.a. adjacencies) between its internal
components (Management and Data Transfer).
For more info, do "irm ipcp connect" or "irm ipcp disconnect" on the
command line.
This commit exposes a deletion bug in the RIB where FSO's fail to
unpack/parse. This will be fixed when the RIB is deprecated.
Diffstat (limited to 'include')
-rw-r--r-- | include/ouroboros/cacep.h | 6 | ||||
-rw-r--r-- | include/ouroboros/irm.h | 13 |
2 files changed, 16 insertions, 3 deletions
diff --git a/include/ouroboros/cacep.h b/include/ouroboros/cacep.h index d2b0de9a..4b557b46 100644 --- a/include/ouroboros/cacep.h +++ b/include/ouroboros/cacep.h @@ -29,9 +29,11 @@ #include <stdint.h> #include <sys/types.h> +#define CACEP_BUF_STRLEN 64 + struct conn_info { - char ae_name[64]; - char protocol[64]; + char ae_name[CACEP_BUF_STRLEN + 1]; + char protocol[CACEP_BUF_STRLEN + 1]; uint32_t pref_version; enum proto_concrete_syntax pref_syntax; struct proto_field fixed_conc_syntax[PROTO_MAX_FIELDS]; diff --git a/include/ouroboros/irm.h b/include/ouroboros/irm.h index 5ad8f754..dc723fc0 100644 --- a/include/ouroboros/irm.h +++ b/include/ouroboros/irm.h @@ -28,8 +28,11 @@ #include <sys/types.h> -/* Name binding options */ +/* Normal IPCP components. */ +#define DT_AE "Data Transfer" +#define MGMT_AE "Management" +/* Name binding options. */ #define BIND_AP_AUTO 0x01 #define BIND_AP_UNIQUE 0x02 @@ -50,6 +53,14 @@ int irm_enroll_ipcp(pid_t api, int irm_bootstrap_ipcp(pid_t api, const struct ipcp_config * conf); +int irm_connect_ipcp(pid_t api, + const char * component, + const char * dst); + +int irm_disconnect_ipcp(pid_t api, + const char * component, + const char * dst); + int irm_bind_ap(const char * ap, const char * name, uint16_t opts, |