Statistics
| Branch: | Revision:

pstreamer / src / net_helpers.h @ 662a3ab9

History | View | Annotate | Download (1.22 KB)

1
/*
2
 * Copyright (c) 2010-2011 Luca Abeni
3
 * Copyright (c) 2010-2011 Csaba Kiraly
4
 * Copyright (c) 2017 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 NET_HELPERS_H
23
#define NET_HELPERS_H
24

    
25
#include<net_helper.h>
26
#include<pstreamer_event.h>
27

    
28
#define NODE_STR_LENGTH 80
29

    
30
enum L3PROTOCOL {IP4, IP6};
31

    
32
char *iface_addr(const char *iface, enum L3PROTOCOL l3);
33
char *default_ip_addr(enum L3PROTOCOL l3);
34
char * nodeid_static_str(const struct nodeID * id);
35
int register_network_fds(const struct nodeID *s, fd_register_f func, void *handler);
36

    
37
#endif        /* NET_HELPERS_H */