summaryrefslogtreecommitdiff
path: root/include/ipconfig.h
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-04-12 19:52:14 +0200
committerMarcel Holtmann <marcel@holtmann.org>2009-04-12 19:52:14 +0200
commit37fbd0590c56f5386bf16710568f6adf7153177c (patch)
tree337e87cb89a31e0b066dc4fd7edc3d7f064e93ad /include/ipconfig.h
parent5b0124db48a7ba6f4f704c546a48e3298941aae3 (diff)
downloadconnman-37fbd0590c56f5386bf16710568f6adf7153177c.tar.gz
connman-37fbd0590c56f5386bf16710568f6adf7153177c.tar.bz2
connman-37fbd0590c56f5386bf16710568f6adf7153177c.zip
Add basic IP configuration framework
Diffstat (limited to 'include/ipconfig.h')
-rw-r--r--include/ipconfig.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/include/ipconfig.h b/include/ipconfig.h
new file mode 100644
index 00000000..9e92c69d
--- /dev/null
+++ b/include/ipconfig.h
@@ -0,0 +1,54 @@
+/*
+ *
+ * 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
+ *
+ */
+
+#ifndef __CONNMAN_IPCONFIG_H
+#define __CONNMAN_IPCONFIG_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * SECTION:ipconfig
+ * @title: IP configuration premitives
+ * @short_description: Functions for registering IP configuration modules
+ */
+
+#define CONNMAN_IPCONFIG_PRIORITY_LOW -100
+#define CONNMAN_IPCONFIG_PRIORITY_DEFAULT 0
+#define CONNMAN_IPCONFIG_PRIORITY_HIGH 100
+
+struct connman_ipconfig {
+ const char *name;
+ int priority;
+ int (*request) (const char *interface);
+ int (*release) (const char *interface);
+ int (*renew) (const char *interface);
+};
+
+extern int connman_ipconfig_register(struct connman_ipconfig *ipconfig);
+extern void connman_ipconfig_unregister(struct connman_ipconfig *ipconfig);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CONNMAN_IPCONFIG_H */