summaryrefslogtreecommitdiffstats
path: root/src/peer.h
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2015-10-18 02:57:26 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2015-10-18 03:04:02 +0200
commitdf48485aeab897c50fd792a740d1a5aed4378fc9 (patch)
tree2de6c9e4847a54e0798a38a7976dc2a5ac89c7c3 /src/peer.h
parentd9a5267fceca6f46ee3005f7624fa92786a3c9b1 (diff)
downloadfastd-df48485aeab897c50fd792a740d1a5aed4378fc9.tar
fastd-df48485aeab897c50fd792a740d1a5aed4378fc9.zip
peer_group: move to a new header, add recursive lookup macros
Diffstat (limited to 'src/peer.h')
-rw-r--r--src/peer.h32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/peer.h b/src/peer.h
index ea1b950..298adf4 100644
--- a/src/peer.h
+++ b/src/peer.h
@@ -110,24 +110,6 @@ struct fastd_peer {
};
-/**
- A group of peers
-
- Peer groups may be nested and form a tree
-*/
-struct fastd_peer_group {
- fastd_peer_group_t *next; /**< The next sibling in the group tree */
- fastd_peer_group_t *parent; /**< The group's parent group */
- fastd_peer_group_t *children; /**< The group's first child */
-
- char *name; /**< The group's name; NULL for the root group */
- fastd_string_stack_t *peer_dirs; /**< List of peer directories which belong to this group */
-
- /* constraints */
- int max_connections; /**< The maximum number of connections to allow in this group; -1 for no limit */
- fastd_string_stack_t *methods; /**< The list of configured method names */
-};
-
/** An entry for a MAC address seen at another peer */
struct fastd_peer_eth_addr {
fastd_eth_addr_t addr; /**< The MAC address */
@@ -270,20 +252,6 @@ static inline bool fastd_peer_is_socket_dynamic(const fastd_peer_t *peer) {
return (!peer->sock || !peer->sock->addr);
}
-/** Returns the configured methods for a peer's group */
-static inline const fastd_string_stack_t * fastd_peer_get_methods(const fastd_peer_t *peer) {
- if (!peer)
- return conf.peer_group->methods;
-
- const fastd_peer_group_t *group;
- for (group = peer->group; group; group = group->parent) {
- if (group->methods)
- return group->methods;
- }
-
- return NULL;
-}
-
/** Returns the MTU to use for a peer */
static inline uint16_t fastd_peer_get_mtu(const fastd_peer_t *peer) {
if (conf.mode == MODE_TAP)