diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2007-12-22 22:10:15 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2007-12-22 22:10:15 +0100 |
commit | 56cf3e5a8c9403db1f1dd5c86367aba995d5fe7d (patch) | |
tree | 00c5404d961fce5b9f2e1cfbb37d5af05dca95f3 /include | |
parent | c33b387b3ed16bce4058b9088260c4ece1ff6342 (diff) | |
download | connman-56cf3e5a8c9403db1f1dd5c86367aba995d5fe7d.tar.gz connman-56cf3e5a8c9403db1f1dd5c86367aba995d5fe7d.tar.bz2 connman-56cf3e5a8c9403db1f1dd5c86367aba995d5fe7d.zip |
Add interface infrastructure
Diffstat (limited to 'include')
-rw-r--r-- | include/Makefile.am | 2 | ||||
-rw-r--r-- | include/iface.h | 66 |
2 files changed, 67 insertions, 1 deletions
diff --git a/include/Makefile.am b/include/Makefile.am index 55bf6b5a..ece5af1b 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1,7 +1,7 @@ includedir = @includedir@/connman -noinst_HEADERS = plugin.h +noinst_HEADERS = plugin.h iface.h MAINTAINERCLEANFILES = Makefile.in diff --git a/include/iface.h b/include/iface.h new file mode 100644 index 00000000..cc3ab0ce --- /dev/null +++ b/include/iface.h @@ -0,0 +1,66 @@ +/* + * + * Connection Manager + * + * Copyright (C) 2007 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_IFACE_H +#define __CONNMAN_IFACE_H + +#ifdef __cplusplus +extern "C" { +#endif + +enum connman_iface_type { + CONNMAN_IFACE_TYPE_UNKNOWN = 0, + CONNMAN_IFACE_TYPE_80203 = 1, + CONNMAN_IFACE_TYPE_80211 = 2, + CONNMAN_IFACE_TYPE_WIMAX = 3, + CONNMAN_IFACE_TYPE_BLUETOOTH = 4, +}; + +enum connman_iface_flags { + CONNMAN_IFACE_FLAGS_CARRIER_DETECT = (1 << 0), + CONNMAN_IFACE_FLAGS_IPV4 = (1 << 1), + CONNMAN_IFACE_FLAGS_IPV6 = (1 << 2), +}; + +struct connman_iface { + struct connman_iface_driver *driver; + char *path; + char *udi; + char *sysfs; + enum connman_iface_type type; + enum connman_iface_flags flags; +}; + +struct connman_iface_driver { + const char *name; + const char *capability; + int (*probe) (struct connman_iface *iface); + void (*remove) (struct connman_iface *iface); +}; + +extern int connman_iface_register(struct connman_iface_driver *driver); +extern void connman_iface_unregister(struct connman_iface_driver *driver); + +#ifdef __cplusplus +} +#endif + +#endif /* __CONNMAN_IFACE_H */ |