PadicoTM

Documentation

« back to PM2 home.
Ns-basic-internals.h
Go to the documentation of this file.
1/*
2 * Padico -- a High Performance Parallel and Distributed Computing Environment
3 * Copyright (c) 2002-2025 INRIA and the University of Rennes 1
4 * Alexandre DENIS <Alexandre.Denis@inria.fr>
5 * Christian PEREZ <Christian.Perez@inria.fr>
6 *
7 * The software has been registered at the Agency for the Protection of
8 * Programs (APP) under the number IDDN.FR.001.260013.000.S.P.2002.000.10000.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 */
24
31#ifndef NS_BASIC_H
32#define NS_BASIC_H
33
34#include <stdlib.h>
35#include <string.h>
36#include <netinet/in.h>
37#include <arpa/inet.h>
38
39#include <Padico/Puk.h>
40#include <Padico/Module.h>
41#include <Padico/PadicoTM.h>
42#include <Padico/Topology.h>
43#include <Padico/NetSelector.h>
44
45
46typedef struct ns_entity_s*ns_entity_t;
47
50
52{
53 const char*name;
55};
56
58{
59 const char*name;
61};
62
64{
65 const char*name;
68};
69
81
110
114 );
115
117{
118 const char*profile;
120};
121
123{
125 return z;
126}
127
128static inline int ns_rulebucket_eq(const struct ns_rule_bucket_s*r1, const struct ns_rule_bucket_s*r2)
129{
130 return ( (r1->iface == r2->iface) && (strcmp(r1->profile, r2->profile) == 0));
131}
132
135
138
140{
141 /* ** tables used for selection */
143 /* ** tables used during parsing */
147};
148
149/* ** internal status of NetSelector_basic */
150
152extern struct padico_ns_database_s nsdb;
153
154#define PADICO_NS_DEFAULT_PROFILE "default"
155
158
160
161#ifndef NDEBUG
163#endif
164
168 const char* profile,
170
173 const char* profile,
175
176
177#endif /* NS_BASIC_H */
ssize_t z
padico_topo_node_t const char * profile
padico_topo_node_t node2
static int ns_rulebucket_eq(const struct ns_rule_bucket_s *r1, const struct ns_rule_bucket_s *r2)
puk_component_t assembly
Serial assembly used.
struct padico_ns_database_s nsdb
the internal database of rules and nodes/hosts/groups
typdef struct ns_entity_vect_s * ns_entity_vect_t
struct ns_target_vect_s targets
static uint32_t ns_rulebucket_hash(const struct ns_rule_bucket_s *r)
struct ns_entity_s * ns_entity_t
padico_topo_node_t const char puk_iface_t iface
return NULL
Definition Shm.h:88
int r
Definition Shm.h:88
padico_topo_host_t host
static int done
Definition console-mod.c:49
puk_component_t ns_basic_host_assembly(padico_topo_host_t host, const char *profile, puk_iface_t iface)
puk_component_t ns_basic_assembly(padico_topo_node_t n1, padico_topo_node_t n2, const char *profile, puk_iface_t iface)
void ns_basic_debug_init(void)
int ns_basic_parse_init(void)
int ns_basic_parse_finalize(void)
struct ns_group_s group
struct ns_entity_vect_s contained
enum ns_entity_s::ns_entity_kind_e kind
struct ns_node_s node
struct ns_host_s host
struct ns_entity_vect_s entities
enclosed entities as described in the rules
const char * name
struct ns_entity_vect_s leaves
flattened vector of all contained terminal entities
const char * name
padico_topo_host_t host
const char * name
padico_topo_node_t node
puk_iface_t iface
Iface matched by this rule.
const char * profile
Profile matched by this set of rules.
struct ns_target_s::@37::@41 arrow
struct ns_target_s::@37::@39 clique
ns_entity_t entity
ns_entity_vect_t subsets
enum ns_target_s::@36 kind
@ NS_TARGET_CLIQUE
communication between all nodes of a set
@ NS_TARGET_ARROW
directed edge between two sets
@ NS_TARGET_NONE
not initialized
@ NS_TARGET_MULTIPARTITE
communication between sets
@ NS_TARGET_UNKNOWN
default assembly, when the node is unknown
struct ns_target_s::@37::@40 multipartite
const char * profile
struct ns_entity_byname_hashtable_s nodes_by_name
nodes found in the config- hashed by nodename
struct ns_rulebucket_hashtable_s rulebuckets
rules hashed by bucket [ (iface,profile) -> rule_list ]
struct ns_entity_byname_hashtable_s hosts_by_name
hosts found in the config- hashed by hostname
struct ns_entity_byname_hashtable_s groups_by_name
groups found in the config- hashed by group name