diff options
author | Ewan Mellor <ewan@xensource.com> | 2007-03-27 00:19:20 +0100 |
---|---|---|
committer | Ewan Mellor <ewan@xensource.com> | 2007-03-27 00:19:20 +0100 |
commit | 99b271fd7d5999dc54a6073da59983fc41b51af8 (patch) | |
tree | db3fd7a3d89771286a603c021adc2ddbdf2c7e98 /tools/libxen/include | |
parent | 6b8760eabada5dd7f76476a589e7425d64a80721 (diff) | |
download | xen-99b271fd7d5999dc54a6073da59983fc41b51af8.tar.gz xen-99b271fd7d5999dc54a6073da59983fc41b51af8.tar.bz2 xen-99b271fd7d5999dc54a6073da59983fc41b51af8.zip |
Added network.other_config map. To make this easier, add a new automatic
plumbing facility from the XendNetwork class into XendAPI (credit to Tom
Wilkie for the idea).
Signed-off-by: Ewan Mellor <ewan@xensource.com>
Diffstat (limited to 'tools/libxen/include')
-rw-r--r-- | tools/libxen/include/xen_network.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tools/libxen/include/xen_network.h b/tools/libxen/include/xen_network.h index f1bff0e229..988495f2f4 100644 --- a/tools/libxen/include/xen_network.h +++ b/tools/libxen/include/xen_network.h @@ -22,6 +22,7 @@ #include "xen_common.h" #include "xen_network_decl.h" #include "xen_pif_decl.h" +#include "xen_string_string_map.h" #include "xen_vif_decl.h" @@ -68,6 +69,7 @@ typedef struct xen_network_record char *name_description; struct xen_vif_record_opt_set *vifs; struct xen_pif_record_opt_set *pifs; + xen_string_string_map *other_config; } xen_network_record; /** @@ -220,6 +222,13 @@ xen_network_get_pifs(xen_session *session, struct xen_pif_set **result, xen_netw /** + * Get the other_config field of the given network. + */ +extern bool +xen_network_get_other_config(xen_session *session, xen_string_string_map **result, xen_network network); + + +/** * Set the name/label field of the given network. */ extern bool @@ -234,6 +243,30 @@ xen_network_set_name_description(xen_session *session, xen_network network, char /** + * Set the other_config field of the given network. + */ +extern bool +xen_network_set_other_config(xen_session *session, xen_network network, xen_string_string_map *other_config); + + +/** + * Add the given key-value pair to the other_config field of the given + * network. + */ +extern bool +xen_network_add_to_other_config(xen_session *session, xen_network network, char *key, char *value); + + +/** + * Remove the given key and its corresponding value from the + * other_config field of the given network. If the key is not in that Map, + * then do nothing. + */ +extern bool +xen_network_remove_from_other_config(xen_session *session, xen_network network, char *key); + + +/** * Return a list of all the networks known to the system. */ extern bool |