internal definitions for module Topology More...
#include <Padico/Puk.h>#include <Padico/PadicoTM.h>#include "Topology.h"#include <netdb.h>#include <linux/if.h>#include <net/if_arp.h>

Go to the source code of this file.
Macros | |
| #define | TOPO_HWADDR_PADDING 16 |
| storage size for hardware address- sockaddr_ll has 8 bytes | |
| #define | TOPO_HWADDR_NAMSIZ 16 |
Detailed Description
internal definitions for module Topology
Definition in file Topology-internals.h.
Macro Definition Documentation
◆ TOPO_HWADDR_NAMSIZ
| #define TOPO_HWADDR_NAMSIZ 16 |
Definition at line 57 of file Topology-internals.h.
◆ TOPO_HWADDR_PADDING
| #define TOPO_HWADDR_PADDING 16 |
storage size for hardware address- sockaddr_ll has 8 bytes
Definition at line 51 of file Topology-internals.h.
Typedef Documentation
◆ topo_host_by_name_hash_destructor_t
Definition at line 268 of file Topology-internals.h.
◆ topo_host_by_name_hash_entry_allocator_t
Definition at line 268 of file Topology-internals.h.
◆ topo_host_by_name_hash_entry_block_lfstack_t
| typedef struct topo_host_by_name_hash_entry_block_lfstack_s topo_host_by_name_hash_entry_block_lfstack_t |
Definition at line 268 of file Topology-internals.h.
◆ topo_host_by_name_hash_entry_slice_lfstack_t
| typedef struct topo_host_by_name_hash_entry_slice_lfstack_s topo_host_by_name_hash_entry_slice_lfstack_t |
Definition at line 268 of file Topology-internals.h.
◆ topo_host_by_name_hash_eqfunc_t
Definition at line 268 of file Topology-internals.h.
◆ topo_host_by_name_hash_hfunc_t
Definition at line 268 of file Topology-internals.h.
◆ topo_host_by_name_hashtable_enumerator_t
Definition at line 268 of file Topology-internals.h.
◆ topo_host_by_name_hashtable_t
Definition at line 268 of file Topology-internals.h.
◆ topo_net_entity_t
Definition at line 115 of file Topology-internals.h.
◆ topo_node_by_name_hash_destructor_t
Definition at line 265 of file Topology-internals.h.
◆ topo_node_by_name_hash_entry_allocator_t
Definition at line 265 of file Topology-internals.h.
◆ topo_node_by_name_hash_entry_block_lfstack_t
| typedef struct topo_node_by_name_hash_entry_block_lfstack_s topo_node_by_name_hash_entry_block_lfstack_t |
Definition at line 265 of file Topology-internals.h.
◆ topo_node_by_name_hash_entry_slice_lfstack_t
| typedef struct topo_node_by_name_hash_entry_slice_lfstack_s topo_node_by_name_hash_entry_slice_lfstack_t |
Definition at line 265 of file Topology-internals.h.
◆ topo_node_by_name_hash_eqfunc_t
Definition at line 265 of file Topology-internals.h.
◆ topo_node_by_name_hash_hfunc_t
Definition at line 265 of file Topology-internals.h.
◆ topo_node_by_name_hashtable_enumerator_t
Definition at line 265 of file Topology-internals.h.
◆ topo_node_by_name_hashtable_t
Definition at line 265 of file Topology-internals.h.
◆ topo_node_by_uuid_hash_destructor_t
| typedef void(* topo_node_by_uuid_hash_destructor_t) (const struct topo_uuid_s *key, padico_topo_node_t data) |
Definition at line 262 of file Topology-internals.h.
◆ topo_node_by_uuid_hash_entry_allocator_t
Definition at line 262 of file Topology-internals.h.
◆ topo_node_by_uuid_hash_entry_block_lfstack_t
| typedef struct topo_node_by_uuid_hash_entry_block_lfstack_s topo_node_by_uuid_hash_entry_block_lfstack_t |
Definition at line 262 of file Topology-internals.h.
◆ topo_node_by_uuid_hash_entry_slice_lfstack_t
| typedef struct topo_node_by_uuid_hash_entry_slice_lfstack_s topo_node_by_uuid_hash_entry_slice_lfstack_t |
Definition at line 262 of file Topology-internals.h.
◆ topo_node_by_uuid_hash_eqfunc_t
| typedef int(* topo_node_by_uuid_hash_eqfunc_t) (const struct topo_uuid_s *key1, const struct topo_uuid_s *key2) |
Definition at line 262 of file Topology-internals.h.
◆ topo_node_by_uuid_hash_hfunc_t
Definition at line 262 of file Topology-internals.h.
◆ topo_node_by_uuid_hashtable_enumerator_t
Definition at line 262 of file Topology-internals.h.
◆ topo_node_by_uuid_hashtable_t
Definition at line 262 of file Topology-internals.h.
Enumeration Type Documentation
◆ topo_property_kind_t
Definition at line 117 of file Topology-internals.h.
Function Documentation
◆ __attribute__() [1/4]
| struct topo_node_by_uuid_hash_entry_block_lfstack_cell_s __attribute__ | ( | (aligned(16)) | ) |
◆ __attribute__() [2/4]
insert an entry into a hashtable
returns <key,value> associated with given key, outkey is set to NULL if key not found
probes whether an entry with given key exists in the hashtable
returns value associated with key, NULL if not found
◆ __attribute__() [3/4]
initialize a new hashtable
deallocate a hashtable
destroy a hashtable
Definition at line 262 of file Topology-internals.h.
◆ __attribute__() [4/4]
| __attribute__ | ( | (visibility("internal")) | ) |
add a binding to a node; take ownership of binding
Init the parser.
Definition at line 37 of file ns-basic-common.c.
◆ assert() [1/5]
◆ assert() [2/5]
◆ assert() [3/5]
◆ assert() [4/5]
| assert | ( | key ! | = ((const struct topo_uuid_s *) 0) | ) |
◆ assert() [5/5]
| assert | ( | slab_size | , |
| 0 | |||
| ) |
Referenced by topo_address_as_inaddr().
◆ cell() [1/3]
◆ cell() [2/3]
◆ cell() [3/3]
◆ if() [1/12]
| if | ( | ! | single | ) | & -> _lock) |
◆ if() [2/12]
Definition at line 262 of file Topology-internals.h.
◆ if() [3/12]
◆ if() [4/12]
| if | ( | check && | rblocks !=allocated_blocks | ) |
Definition at line 262 of file Topology-internals.h.
◆ if() [5/12]
| if | ( | data | ) |
◆ if() [6/12]
Definition at line 262 of file Topology-internals.h.
◆ if() [7/12]
| if | ( | e | ) |
Definition at line 262 of file Topology-internals.h.
◆ if() [8/12]
◆ if() [9/12]
◆ if() [10/12]
◆ if() [11/12]
Definition at line 262 of file Topology-internals.h.
◆ if() [12/12]
| if | ( | source->key ! | = (( const struct topo_uuid_s* )0) | ) |
Definition at line 262 of file Topology-internals.h.
◆ padico_free_func()
| padico_free_func | ( | slice | , |
| puk_mod_binary_get_profile() | , | ||
| padico_module_self_name() | , | ||
| __func__ | , | ||
| __FILE__ | , | ||
| __LINE__ | |||
| ) |
◆ return()
◆ topo_address_as_inaddr()
|
inlinestatic |
Definition at line 409 of file Topology-internals.h.
References topo_address_s::_addr_storage, assert(), done, topo_address_s::family, and topo_address_s::size.
Referenced by padico_topo_host_getaddr(), and padico_topo_host_getaddr2().
◆ topo_binding_create()
|
inlinestatic |
Definition at line 419 of file Topology-internals.h.
References topo_net_entity_s::as_ptr, topo_network_s::bindings, done, topo_binding_s::entity, topo_net_entity_s::kind, network, topo_binding_s::network, NULL, and topo_binding_s::props.
Referenced by padico_topo_host_bind(), padico_topo_node_bind(), topo_binding_end_handler(), and topo_inet_route_detect().
◆ topo_filter_policy_getbyname()
|
inlinestatic |
Definition at line 344 of file Topology-internals.h.
References _PADICO_TOPO_FILTER_MAX, _PADICO_TOPO_FILTER_NONE, done, i, name, NULL, and topo_filter_policy_names.
Referenced by topo_property_end_handler().
◆ topo_filter_policy_getname()
|
inlinestatic |
Definition at line 358 of file Topology-internals.h.
References _PADICO_TOPO_FILTER_MAX, _PADICO_TOPO_FILTER_NONE, int, NULL, and topo_filter_policy_names.
Referenced by topo_binding_serialize().
◆ topo_filter_protocol_getname()
frontend for getprotobynumber(), working even in the absence of /etc/protocols
Definition at line 387 of file Topology-internals.h.
Referenced by topo_binding_serialize().
◆ topo_filter_protocol_getnumber()
frontend for getprotobyname(), working even in the absence of /etc/protocols
Definition at line 367 of file Topology-internals.h.
Referenced by topo_property_end_handler().
◆ topo_host_by_name_hash_entry_allocator_init_thread()
◆ topo_host_by_name_hash_entry_insert()
|
inlinestatic |
◆ topo_host_by_name_hash_entry_lookup()
|
inlinestatic |
◆ topo_host_by_name_hash_entry_oldprobe()
|
inlinestatic |
◆ topo_host_by_name_hash_entry_rehash_flush() [1/2]
| topo_host_by_name_hash_entry_rehash_flush | ( | h | ) |
◆ topo_host_by_name_hash_entry_rehash_flush() [2/2]
|
inlinestatic |
◆ topo_host_by_name_hash_entry_rehash_n()
|
inlinestatic |
◆ topo_host_by_name_hash_entry_rehash_row()
|
inlinestatic |
◆ topo_host_by_name_hashtable_remove()
| topo_host_by_name_hashtable_remove | ( | h | , |
| * | key | ||
| ) |
◆ topo_hwaddr_getbyindex()
|
inlinestatic |
Definition at line 320 of file Topology-internals.h.
References done, host, topo_host_s::hwaddrs, i, and NULL.
Referenced by topo_inet_route_detect().
◆ topo_hwaddr_getbyname()
|
inlinestatic |
Definition at line 310 of file Topology-internals.h.
References done, host, topo_host_s::hwaddrs, i, name, and NULL.
Referenced by padico_topo_hwaddr_add(), topo_binding_bind_host(), and topo_inet_addr_detect_getifaddrs().
◆ topo_node_by_name_hash_entry_allocator_init_thread()
◆ topo_node_by_name_hash_entry_insert()
|
inlinestatic |
◆ topo_node_by_name_hash_entry_lookup()
|
inlinestatic |
◆ topo_node_by_name_hash_entry_oldprobe()
|
inlinestatic |
◆ topo_node_by_name_hash_entry_rehash_flush() [1/2]
| topo_node_by_name_hash_entry_rehash_flush | ( | h | ) |
◆ topo_node_by_name_hash_entry_rehash_flush() [2/2]
|
inlinestatic |
◆ topo_node_by_name_hash_entry_rehash_n()
|
inlinestatic |
◆ topo_node_by_name_hash_entry_rehash_row()
|
inlinestatic |
◆ topo_node_by_name_hashtable_remove()
| topo_node_by_name_hashtable_remove | ( | h | , |
| * | key | ||
| ) |
◆ topo_node_by_uuid_hash_entry_allocator_init_thread()
◆ topo_node_by_uuid_hash_entry_insert()
|
inlinestatic |
◆ topo_node_by_uuid_hash_entry_lookup()
|
inlinestatic |
◆ topo_node_by_uuid_hash_entry_oldprobe()
|
inlinestatic |
◆ topo_node_by_uuid_hash_entry_rehash_flush() [1/2]
| topo_node_by_uuid_hash_entry_rehash_flush | ( | h | ) |
◆ topo_node_by_uuid_hash_entry_rehash_flush() [2/2]
|
inlinestatic |
◆ topo_node_by_uuid_hash_entry_rehash_n()
|
inlinestatic |
◆ topo_node_by_uuid_hash_entry_rehash_row()
|
inlinestatic |
◆ topo_node_by_uuid_hashtable_remove()
| topo_node_by_uuid_hashtable_remove | ( | h | , |
| * | key | ||
| ) |
◆ topo_uuid_eq()
|
inlinestatic |
Definition at line 252 of file Topology-internals.h.
References done, and PADICO_TOPO_UUID_SIZE.
◆ topo_uuid_hash()
|
inlinestatic |
Definition at line 256 of file Topology-internals.h.
References done, PADICO_TOPO_UUID_SIZE, and uuid.
◆ while() [1/8]
| while | ( | 0 | ) |
◆ while() [2/8]
◆ while() [3/8]
| while | ( | e && | e->key !=((const char *) 0) | ) |
Definition at line 265 of file Topology-internals.h.
◆ while() [4/8]
| while | ( | e && | e->key !=((const struct topo_uuid_s *) 0) | ) |
Definition at line 262 of file Topology-internals.h.
◆ while() [5/8]
◆ while() [6/8]
| while | ( | topo_host_by_name_hash_entry_oldprobe(h, key) | ) |
◆ while() [7/8]
| while | ( | topo_node_by_name_hash_entry_oldprobe(h, key) | ) |
◆ while() [8/8]
| while | ( | topo_node_by_uuid_hash_entry_oldprobe(h, key) | ) |
Variable Documentation
◆ __attribute__
| struct topo_host_by_name_hash_entry_slice_lfstack_s __attribute__ |
◆ _cell
| return _cell { topo_node_by_uuid_hash_entry_block_lfstack_push_ext(_stack, _cell, 0) |
Definition at line 262 of file Topology-internals.h.
◆ _head
Definition at line 262 of file Topology-internals.h.
◆ _next
Definition at line 262 of file Topology-internals.h.
◆ a
Definition at line 262 of file Topology-internals.h.
◆ allocated_blocks
| int allocated_blocks = 0 |
Definition at line 262 of file Topology-internals.h.
◆ b
Definition at line 262 of file Topology-internals.h.
◆ b2
Definition at line 303 of file Topology-internals.h.
Referenced by findfirstdiff(), padico_topo_network_get_common_host(), and topo_binding_merge().
◆ block
Definition at line 262 of file Topology-internals.h.
◆ boot_id
| padico_topo_host_t const char const char* boot_id |
Definition at line 295 of file Topology-internals.h.
Referenced by topo_node_create(), topo_node_start_handler(), and topology_populate().
◆ check
Definition at line 262 of file Topology-internals.h.
◆ current
Definition at line 262 of file Topology-internals.h.
◆ data
| const char padico_topo_host_t* data { topo_node_by_uuid_hash_entry_rehash_n(h, 16 ) |
Definition at line 262 of file Topology-internals.h.
◆ do
| do { block = topo_node_by_uuid_hash_entry_block_lfstack_pop_ext(&a->blocks, a->single) |
Definition at line 262 of file Topology-internals.h.
◆ e
Definition at line 262 of file Topology-internals.h.
◆ else
| else { if(h->load >= h->size * 3 / 4) { topo_node_by_uuid_hash_rehash_trigger(h); } topo_node_by_uuid_hash_entry_insert(h, key, data) |
Definition at line 262 of file Topology-internals.h.
◆ h
Definition at line 262 of file Topology-internals.h.
◆ host
| padico_topo_host_t host |
Definition at line 294 of file Topology-internals.h.
Referenced by __attribute__(), control_bootstrap_init(), g5k_compute_networks(), g5k_compute_nodes(), ns_basic_assembly_host(), ns_basic_host_assembly(), ns_basic_host_start_handler(), ns_besteffort_getnetworks(), ns_besteffort_selector_2networks(), ns_besteffort_selector_host(), ns_node_in_entity(), nsbe_dijkstra_vertex_add(), nsdb_create_host(), padico_control_connector_connect(), padico_control_connector_new(), padico_na_topology_serialize(), padico_ns_host_selector(), padico_nsbe_rule_resolve(), padico_topo_gethosts(), padico_topo_getnodebyname(), padico_topo_host_add_name(), padico_topo_host_add_property(), padico_topo_host_add_service(), padico_topo_host_bind(), padico_topo_host_can_input(), padico_topo_host_can_output(), padico_topo_host_create(), padico_topo_host_getaddr(), padico_topo_host_getaddr2(), padico_topo_host_getbindings(), padico_topo_host_getbyin6addr(), padico_topo_host_getbyinaddr(), padico_topo_host_getname(), padico_topo_host_getname2(), padico_topo_host_getnetworks(), padico_topo_host_getnode(), padico_topo_host_getnodes(), padico_topo_host_getproperty(), padico_topo_host_getservice(), padico_topo_host_policy(), padico_topo_host_resolve_byin6addr(), padico_topo_host_resolve_byinaddr(), padico_topo_host_resolvebyname(), padico_topo_host_serialize(), padico_topo_hwaddr_add(), padico_topo_network_contains_host(), padico_topology_finalize(), router_update_end_handler(), secondary_connector_connect(), sfsnc_connect(), sfssh2_connect(), ssh2_control_bootstrap_connect(), sysio_control_bootstrap_connect(), topo_binding_bind_host(), topo_host_destroy(), topo_host_end_handler(), topo_host_from_hostent(), topo_host_lookup(), topo_host_start_handler(), topo_hwaddr_getbyindex(), topo_hwaddr_getbyname(), topo_node_create(), topo_node_start_handler(), vlink_resolver_resolve_host(), and vlink_resolver_resolve_node().
◆ i
| e i = -1 |
Definition at line 262 of file Topology-internals.h.
Referenced by topo_filter_policy_getbyname(), topo_hwaddr_getbyindex(), and topo_hwaddr_getbyname().
◆ key
| const char* * key { if(h->oldtable) { const uint32_t z = (*( &topo_uuid_hash ))(key); const ssize_t index = puk_hash_to_index(z, h->oldsize); struct topo_node_by_uuid_hash_entry_s*e = h->oldtable + index; while(e && (e->key != (( const struct topo_uuid_s* )0) )) { if((*( &topo_uuid_eq ))(key, e->key)) { topo_node_by_uuid_hash_entry_rehash_row(h, index); topo_node_by_uuid_hash_entry_rehash_n(h, 16 ); return 1; } e = e->next; } } return 0 |
Definition at line 262 of file Topology-internals.h.
◆ load
| h load |
Definition at line 262 of file Topology-internals.h.
◆ n
Definition at line 262 of file Topology-internals.h.
◆ new_slab
| a new_slab = 0 |
Definition at line 262 of file Topology-internals.h.
◆ node
| padico_topo_node_t node |
Definition at line 302 of file Topology-internals.h.
◆ outkey
◆ prev
| prev = NULL |
Definition at line 262 of file Topology-internals.h.
◆ single
| a single { if(!single) pthread_spin_lock(&_stack->_lock) |
Definition at line 262 of file Topology-internals.h.
◆ slab_size
| a slab_size = slab_size |
Definition at line 262 of file Topology-internals.h.
◆ slice
Definition at line 262 of file Topology-internals.h.
◆ source
| struct topo_host_by_name_hash_entry_s* source = h->oldtable + z |
Definition at line 262 of file Topology-internals.h.
◆ topo_filter_policy_names
Definition at line 334 of file Topology-internals.h.
Referenced by topo_filter_policy_getbyname(), and topo_filter_policy_getname().
◆ topo_hostname_vect_t
| typdef struct topo_hostname_vect_s* topo_hostname_vect_t |
Definition at line 198 of file Topology-internals.h.
◆ topo_hwaddr_vect_t
| typdef struct topo_hwaddr_vect_s* topo_hwaddr_vect_t |
Definition at line 48 of file Topology-internals.h.
◆ topo_property_vect_t
| typdef struct topo_property_vect_s* topo_property_vect_t |
Definition at line 183 of file Topology-internals.h.
◆ uuid
| padico_topo_host_t const char* uuid |
Definition at line 295 of file Topology-internals.h.
Referenced by na_control_event_listener(), na_control_request_handler(), padico_shm_directory_node_lookup(), padico_topo_getnodebyuuid(), padico_topology_finalize(), secondary_connector_connect(), secondary_connector_new(), topo_node_create(), topo_node_start_handler(), topo_uuid_hash(), topology_populate(), vlink_fwd_bind(), vlink_fwd_connect(), vlink_fwd_init(), and vlink_status_lookup().
◆ void
| void |
Definition at line 262 of file Topology-internals.h.