5 * Copyright (C) 2007-2010 Intel Corporation. All rights reserved.
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.
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.
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
22 #ifndef __CONNMAN_INET_H
23 #define __CONNMAN_INET_H
25 #include <arpa/inet.h>
26 #include <linux/netlink.h>
27 #include <linux/rtnetlink.h>
29 #include <connman/device.h>
30 #include <connman/ipconfig.h>
36 int connman_inet_ifindex(const char *name);
37 char *connman_inet_ifname(int index);
39 short int connman_inet_ifflags(int index);
41 int connman_inet_ifup(int index);
42 int connman_inet_ifdown(int index);
44 struct connman_device *connman_inet_create_device(int index);
45 connman_bool_t connman_inet_is_cfg80211(int index);
47 int connman_inet_set_address(int index, struct connman_ipaddress *ipaddress);
48 int connman_inet_clear_address(int index, struct connman_ipaddress *ipaddress);
49 int connman_inet_add_host_route(int index, const char *host, const char *gateway);
50 int connman_inet_del_host_route(int index, const char *host);
51 int connman_inet_set_gateway_address(int index, const char *gateway);
52 int connman_inet_clear_gateway_address(int index, const char *gateway);
53 int connman_inet_set_gateway_interface(int index);
54 int connman_inet_clear_gateway_interface(int index);
55 connman_bool_t connman_inet_compare_subnet(int index, const char *host);
56 int connman_inet_set_ipv6_address(int index,
57 struct connman_ipaddress *ipaddress);
58 int connman_inet_clear_ipv6_address(int index,
59 const char *address, int prefix_len);
60 int connman_inet_add_ipv6_host_route(int index, const char *host,
62 int connman_inet_del_ipv6_host_route(int index, const char *host);
63 int connman_inet_set_ipv6_gateway_address(int index, const char *gateway);
64 int connman_inet_clear_ipv6_gateway_address(int index, const char *gateway);
66 void connman_ipaddress_set_ipv4(struct connman_ipaddress *ipaddress,
67 const char *address, const char *netmask, const char *gateway);
73 #endif /* __CONNMAN_INET_H */