| /* |
| * |
| * Connection Manager |
| * |
| * Copyright (C) 2007-2009 Intel Corporation. All rights reserved. |
| * |
| * This program is free software; you can redistribute it and/or modify |
| * it under the terms of the GNU General Public License version 2 as |
| * published by the Free Software Foundation. |
| * |
| * This program is distributed in the hope that it will be useful, |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| * GNU General Public License for more details. |
| * |
| * You should have received a copy of the GNU General Public License |
| * along with this program; if not, write to the Free Software |
| * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| * |
| */ |
| |
| #ifdef HAVE_CONFIG_H |
| #include <config.h> |
| #endif |
| |
| #define CONNMAN_API_SUBJECT_TO_CHANGE |
| #include <connman/ipconfig.h> |
| #include <connman/plugin.h> |
| |
| static int ipv4_request(struct connman_ipconfig *ipconfig) |
| { |
| connman_ipconfig_bind(ipconfig, |
| connman_ipconfig_get_ipaddress(ipconfig)); |
| return 0; |
| } |
| |
| static struct connman_ipconfig_driver ipv4_driver = { |
| .name = "ipv4", |
| .type = CONNMAN_IPCONFIG_TYPE_IPV4, |
| .priority = CONNMAN_IPCONFIG_PRIORITY_DEFAULT, |
| .request = ipv4_request, |
| /* NB: nothing to do for renew or release */ |
| }; |
| |
| int __connman_ipv4_init(void) |
| { |
| return connman_ipconfig_driver_register(&ipv4_driver); |
| } |
| |
| void __connman_ipv4_cleanup(void) |
| { |
| connman_ipconfig_driver_unregister(&ipv4_driver); |
| } |