Statistics
| Branch: | Revision:

streamers / topology.h @ 9a1f5816

History | View | Annotate | Download (1.32 KB)

1
/*
2
 * Copyright (c) 2010-2011 Csaba Kiraly
3
 * Copyright (c) 2010-2011 Luca Abeni
4
 * Copyright (c) 2014-2015 Luca Baldesi
5
 *
6
 * This file is part of PeerStreamer.
7
 *
8
 * PeerStreamer is free software: you can redistribute it and/or
9
 * modify it under the terms of the GNU Affero General Public License as
10
 * published by the Free Software Foundation, either version 3 of the
11
 * License, or (at your option) any later version.
12
 *
13
 * PeerStreamer is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero
16
 * General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU Affero General Public License
19
 * along with PeerStreamer.  If not, see <http://www.gnu.org/licenses/>.
20
 *
21
 */
22
#ifndef TOPOLOGY_H
23
#define TOPOLOGY_H
24

    
25
#include <stdint.h>
26

    
27
#define MSG_TYPE_NEIGHBOURHOOD   0x22
28

    
29
struct peerset *topology_get_neighbours(void);
30
void topology_update();
31
struct peer *nodeid_to_peer(const struct nodeID* id, int reg);
32
int topology_node_insert(struct nodeID *neighbour);
33
int topology_init(struct nodeID *myID, const char *config);
34
void topology_message_parse(struct nodeID *from, const uint8_t *buff, int len);
35
void peerset_print(const struct peerset * pset,const char * name);
36

    
37
#endif        /* TOPOLOGY_H */