5 * Copyright (C) 2007 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
28 static GSList *ipconfig_list = NULL;
30 static gint compare_priority(gconstpointer a, gconstpointer b)
32 const struct connman_ipconfig *ipconfig1 = a;
33 const struct connman_ipconfig *ipconfig2 = b;
35 return ipconfig2->priority - ipconfig1->priority;
39 * connman_ipconfig_register:
40 * @ipconfig: IP configuration module
42 * Register a new IP configuration module
44 * Returns: %0 on success
46 int connman_ipconfig_register(struct connman_ipconfig *ipconfig)
48 DBG("ipconfig %p name %s", ipconfig, ipconfig->name);
50 ipconfig_list = g_slist_insert_sorted(ipconfig_list, ipconfig,
57 * connman_ipconfig_unregister:
58 * @ipconfig: IP configuration module
60 * Remove a previously registered IP configuration module.
62 void connman_ipconfig_unregister(struct connman_ipconfig *ipconfig)
64 DBG("ipconfig %p name %s", ipconfig, ipconfig->name);
66 ipconfig_list = g_slist_remove(ipconfig_list, ipconfig);