66e55b9bb6726184689d761993f4472b0bf42118
[platform/upstream/connman.git] / plugins / ipv4.c
1 /*
2  *
3  *  Connection Manager
4  *
5  *  Copyright (C) 2007-2008  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 #ifdef HAVE_CONFIG_H
23 #include <config.h>
24 #endif
25
26 #include <connman/plugin.h>
27 #include <connman/driver.h>
28 #include <connman/log.h>
29
30 static int ipv4_probe(struct connman_element *element)
31 {
32         DBG("element %p name %s", element, element->name);
33
34         DBG("address %s", element->ipv4.address);
35         DBG("netmask %s", element->ipv4.netmask);
36         DBG("gateway %s", element->ipv4.gateway);
37
38         return 0;
39 }
40
41 static void ipv4_remove(struct connman_element *element)
42 {
43         DBG("element %p name %s", element, element->name);
44 }
45
46 static struct connman_driver ipv4_driver = {
47         .name           = "ipv4",
48         .type           = CONNMAN_ELEMENT_TYPE_IPV4,
49         .probe          = ipv4_probe,
50         .remove         = ipv4_remove,
51 };
52
53 static int ipv4_init(void)
54 {
55         return connman_driver_register(&ipv4_driver);
56 }
57
58 static void ipv4_exit(void)
59 {
60         connman_driver_unregister(&ipv4_driver);
61 }
62
63 CONNMAN_PLUGIN_DEFINE("ipv4", "IPv4 configuration plugin", VERSION,
64                                                         ipv4_init, ipv4_exit)