![]() | ![]() | ![]() | Tentacles Reference Manual | ![]() |
---|
tnt-net-db —
#define TNT_NET_DB (object) struct TntNetDB; gboolean tnt_net_db_init (TntNetDB *net_db, TntStorage *storage); TntNetDB* tnt_net_db_new (TntStorage *storage); void tnt_net_db_finalize (FluxObject *net_db); TntNodeMeta* tnt_net_db_get_node_meta (TntNetDB *net_db, TntNodeID node_id); void tnt_net_db_set_node_meta (TntNetDB *net_db, TntNodeID node_id, TntNodeMeta *node_meta); void tnt_net_db_forget_node (TntNetDB *net_db, TntNodeID node_id); TntNodeID tnt_net_db_get_random_node_id (TntNetDB *net_db); void tnt_net_db_add_address (TntNetDB *net_db, const TntNodeAddress4 *address);
struct TntNetDB { FluxObject object; TntStorage *storage; GList *node_meta_list; GHashTable *node_meta_table; GHashTable *blocked_addresses; GHashTable *unblocked_addresses; GList *address_subsets; gint n_nodes; guint save_timeout_id; };
gboolean tnt_net_db_init (TntNetDB *net_db, TntStorage *storage);
net_db : | |
storage : | |
Returns : |
TntNodeMeta* tnt_net_db_get_node_meta (TntNetDB *net_db, TntNodeID node_id);
net_db : | |
node_id : | |
Returns : |
void tnt_net_db_set_node_meta (TntNetDB *net_db, TntNodeID node_id, TntNodeMeta *node_meta);
net_db : | |
node_id : | |
node_meta : |
void tnt_net_db_forget_node (TntNetDB *net_db, TntNodeID node_id);
net_db : | |
node_id : |
TntNodeID tnt_net_db_get_random_node_id (TntNetDB *net_db);
net_db : | |
Returns : |
void tnt_net_db_add_address (TntNetDB *net_db, const TntNodeAddress4 *address);
net_db : | |
address : |
<< tnt-bandwidth-group-list | tnt-node-meta >> |