Add helper for removing host routes
[platform/upstream/connman.git] / include / inet.h
1 /*
2  *
3  *  Connection Manager
4  *
5  *  Copyright (C) 2007-2010  Intel Corporation. All rights reserved.
6  *
7  *  This program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License version 2 as
9  *  published by the Free Software Foundation.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19  *
20  */
21
22 #ifndef __CONNMAN_INET_H
23 #define __CONNMAN_INET_H
24
25 #include <arpa/inet.h>
26
27 #include <connman/device.h>
28 #include <connman/ipconfig.h>
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 int connman_inet_ifindex(const char *name);
35 char *connman_inet_ifname(int index);
36
37 short int connman_inet_ifflags(int index);
38
39 int connman_inet_ifup(int index);
40 int connman_inet_ifdown(int index);
41
42 struct connman_device *connman_inet_create_device(int index);
43 connman_bool_t connman_inet_is_mac80211(int index);
44
45 int connman_inet_set_address(int index, struct connman_ipaddress *ipaddress);
46 int connman_inet_clear_address(int index);
47 int connman_inet_add_host_route(int index, const char *host);
48 int connman_inet_del_host_route(int index, const char *host);
49 int connman_inet_set_gateway_address(int index, const char *gateway);
50 int connman_inet_set_gateway_interface(int index);
51
52 #ifdef __cplusplus
53 }
54 #endif
55
56 #endif /* __CONNMAN_INET_H */