diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/Makefile.am | 14 | ||||
| -rw-r--r-- | include/Makefile.in | 529 | ||||
| -rw-r--r-- | include/NetworkManager.h | 391 | ||||
| -rw-r--r-- | include/NetworkManagerVPN.h | 173 | ||||
| -rw-r--r-- | include/nm-dbus-glib-types.h | 43 | ||||
| -rw-r--r-- | include/nm-glib-compat.h | 37 | ||||
| -rw-r--r-- | include/nm-test-helpers.h | 48 | ||||
| -rw-r--r-- | include/wireless-helper.h | 32 |
8 files changed, 1267 insertions, 0 deletions
diff --git a/include/Makefile.am b/include/Makefile.am new file mode 100644 index 00000000..54c4d1dc --- /dev/null +++ b/include/Makefile.am @@ -0,0 +1,14 @@ +EXTRA_DIST = \ + NetworkManager.h \ + NetworkManagerVPN.h \ + wireless-helper.h \ + nm-dbus-glib-types.h \ + nm-glib-compat.h \ + nm-test-helpers.h + +NetworkManagerincludedir=$(includedir)/NetworkManager + +NetworkManagerinclude_HEADERS = \ + NetworkManager.h \ + NetworkManagerVPN.h + diff --git a/include/Makefile.in b/include/Makefile.in new file mode 100644 index 00000000..6a914fe8 --- /dev/null +++ b/include/Makefile.in @@ -0,0 +1,529 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = include +DIST_COMMON = $(NetworkManagerinclude_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.m4 \ + $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/intltool.m4 \ + $(top_srcdir)/m4/libnl-check.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(NetworkManagerincludedir)" +HEADERS = $(NetworkManagerinclude_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIRNAME = @DATADIRNAME@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DBUS_SYS_DIR = @DBUS_SYS_DIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DHCLIENT_PATH = @DHCLIENT_PATH@ +DHCPCD_PATH = @DHCPCD_PATH@ +DISABLE_DEPRECATED = @DISABLE_DEPRECATED@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GIO_CFLAGS = @GIO_CFLAGS@ +GIO_LIBS = @GIO_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ +GLIB_LIBS = @GLIB_LIBS@ +GMODULE_CFLAGS = @GMODULE_CFLAGS@ +GMODULE_LIBS = @GMODULE_LIBS@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GNUTLS_CFLAGS = @GNUTLS_CFLAGS@ +GNUTLS_LIBS = @GNUTLS_LIBS@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +GUDEV_CFLAGS = @GUDEV_CFLAGS@ +GUDEV_LIBS = @GUDEV_LIBS@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +IPTABLES_PATH = @IPTABLES_PATH@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBDL = @LIBDL@ +LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ +LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ +LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ +LIBM = @LIBM@ +LIBNL_CFLAGS = @LIBNL_CFLAGS@ +LIBNL_LIBS = @LIBNL_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +NSS_CFLAGS = @NSS_CFLAGS@ +NSS_LIBS = @NSS_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POLKIT_CFLAGS = @POLKIT_CFLAGS@ +POLKIT_LIBS = @POLKIT_LIBS@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +PPPD_PLUGIN_DIR = @PPPD_PLUGIN_DIR@ +RANLIB = @RANLIB@ +RESOLVCONF_PATH = @RESOLVCONF_PATH@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYSTEM_CA_PATH = @SYSTEM_CA_PATH@ +UDEV_BASE_DIR = @UDEV_BASE_DIR@ +USE_NLS = @USE_NLS@ +UUID_CFLAGS = @UUID_CFLAGS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = \ + NetworkManager.h \ + NetworkManagerVPN.h \ + wireless-helper.h \ + nm-dbus-glib-types.h \ + nm-glib-compat.h \ + nm-test-helpers.h + +NetworkManagerincludedir = $(includedir)/NetworkManager +NetworkManagerinclude_HEADERS = \ + NetworkManager.h \ + NetworkManagerVPN.h + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu include/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-NetworkManagerincludeHEADERS: $(NetworkManagerinclude_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(NetworkManagerincludedir)" || $(MKDIR_P) "$(DESTDIR)$(NetworkManagerincludedir)" + @list='$(NetworkManagerinclude_HEADERS)'; test -n "$(NetworkManagerincludedir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(NetworkManagerincludedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(NetworkManagerincludedir)" || exit $$?; \ + done + +uninstall-NetworkManagerincludeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(NetworkManagerinclude_HEADERS)'; test -n "$(NetworkManagerincludedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(NetworkManagerincludedir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(NetworkManagerincludedir)" && rm -f $$files + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(NetworkManagerincludedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-NetworkManagerincludeHEADERS + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-NetworkManagerincludeHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool ctags distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install \ + install-NetworkManagerincludeHEADERS install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-NetworkManagerincludeHEADERS uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/include/NetworkManager.h b/include/NetworkManager.h new file mode 100644 index 00000000..9df444f2 --- /dev/null +++ b/include/NetworkManager.h @@ -0,0 +1,391 @@ +/* NetworkManager -- Network link manager + * + * Dan Williams <dcbw@redhat.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * (C) Copyright 2004 - 2008 Red Hat, Inc. + */ + +#ifndef NETWORK_MANAGER_H +#define NETWORK_MANAGER_H + +/* + * dbus services details + */ +#define NM_DBUS_SERVICE "org.freedesktop.NetworkManager" + +#define NM_DBUS_PATH "/org/freedesktop/NetworkManager" +#define NM_DBUS_INTERFACE "org.freedesktop.NetworkManager" +#define NM_DBUS_INTERFACE_DEVICE NM_DBUS_INTERFACE ".Device" +#define NM_DBUS_INTERFACE_DEVICE_WIRED NM_DBUS_INTERFACE_DEVICE ".Wired" +#define NM_DBUS_INTERFACE_DEVICE_WIRELESS NM_DBUS_INTERFACE_DEVICE ".Wireless" +#define NM_DBUS_INTERFACE_DEVICE_BLUETOOTH NM_DBUS_INTERFACE_DEVICE ".Bluetooth" +#define NM_DBUS_PATH_ACCESS_POINT NM_DBUS_PATH "/AccessPoint" +#define NM_DBUS_INTERFACE_ACCESS_POINT NM_DBUS_INTERFACE ".AccessPoint" +#define NM_DBUS_INTERFACE_SERIAL_DEVICE NM_DBUS_INTERFACE_DEVICE ".Serial" +#define NM_DBUS_INTERFACE_GSM_DEVICE NM_DBUS_INTERFACE_DEVICE ".Gsm" +#define NM_DBUS_INTERFACE_CDMA_DEVICE NM_DBUS_INTERFACE_DEVICE ".Cdma" +#define NM_DBUS_INTERFACE_ACTIVE_CONNECTION NM_DBUS_INTERFACE ".Connection.Active" +#define NM_DBUS_INTERFACE_IP4_CONFIG NM_DBUS_INTERFACE ".IP4Config" +#define NM_DBUS_INTERFACE_DHCP4_CONFIG NM_DBUS_INTERFACE ".DHCP4Config" +#define NM_DBUS_INTERFACE_IP6_CONFIG NM_DBUS_INTERFACE ".IP6Config" +#define NM_DBUS_INTERFACE_DHCP6_CONFIG NM_DBUS_INTERFACE ".DHCP6Config" + + +#define NM_DBUS_SERVICE_USER_SETTINGS "org.freedesktop.NetworkManagerUserSettings" +#define NM_DBUS_SERVICE_SYSTEM_SETTINGS "org.freedesktop.NetworkManagerSystemSettings" +#define NM_DBUS_IFACE_SETTINGS "org.freedesktop.NetworkManagerSettings" +#define NM_DBUS_IFACE_SETTINGS_SYSTEM "org.freedesktop.NetworkManagerSettings.System" +#define NM_DBUS_PATH_SETTINGS "/org/freedesktop/NetworkManagerSettings" + +#define NM_DBUS_IFACE_SETTINGS_CONNECTION "org.freedesktop.NetworkManagerSettings.Connection" +#define NM_DBUS_PATH_SETTINGS_CONNECTION "/org/freedesktop/NetworkManagerSettings/Connection" +#define NM_DBUS_IFACE_SETTINGS_CONNECTION_SECRETS "org.freedesktop.NetworkManagerSettings.Connection.Secrets" + + +/* + * Types of NetworkManager states + */ +typedef enum NMState +{ + NM_STATE_UNKNOWN = 0, + NM_STATE_ASLEEP, + NM_STATE_CONNECTING, + NM_STATE_CONNECTED, + NM_STATE_DISCONNECTED +} NMState; + + +/* + * Types of NetworkManager devices + */ +typedef enum NMDeviceType +{ + NM_DEVICE_TYPE_UNKNOWN = 0, + NM_DEVICE_TYPE_ETHERNET, + NM_DEVICE_TYPE_WIFI, + NM_DEVICE_TYPE_GSM, + NM_DEVICE_TYPE_CDMA, + NM_DEVICE_TYPE_BT, /* Bluetooth */ + NM_DEVICE_TYPE_OLPC_MESH +} NMDeviceType; + +/* DEPRECATED TYPE NAMES */ +#define DEVICE_TYPE_UNKNOWN NM_DEVICE_TYPE_UNKNOWN +#define DEVICE_TYPE_802_3_ETHERNET NM_DEVICE_TYPE_ETHERNET +#define DEVICE_TYPE_802_11_WIRELESS NM_DEVICE_TYPE_WIFI +#define DEVICE_TYPE_GSM NM_DEVICE_TYPE_GSM +#define DEVICE_TYPE_CDMA NM_DEVICE_TYPE_CDMA + + +/* + * General device capability bits + * + */ +#define NM_DEVICE_CAP_NONE 0x00000000 +#define NM_DEVICE_CAP_NM_SUPPORTED 0x00000001 +#define NM_DEVICE_CAP_CARRIER_DETECT 0x00000002 + + +/* 802.11 wireless device-specific capabilities */ +#define NM_WIFI_DEVICE_CAP_NONE 0x00000000 +#define NM_WIFI_DEVICE_CAP_CIPHER_WEP40 0x00000001 +#define NM_WIFI_DEVICE_CAP_CIPHER_WEP104 0x00000002 +#define NM_WIFI_DEVICE_CAP_CIPHER_TKIP 0x00000004 +#define NM_WIFI_DEVICE_CAP_CIPHER_CCMP 0x00000008 +#define NM_WIFI_DEVICE_CAP_WPA 0x00000010 +#define NM_WIFI_DEVICE_CAP_RSN 0x00000020 + + +/* + * 802.11 Access Point flags + * + */ +#define NM_802_11_AP_FLAGS_NONE 0x00000000 +#define NM_802_11_AP_FLAGS_PRIVACY 0x00000001 + +/* + * 802.11 Access Point security flags + * + * These describe the current security requirements of the BSSID as extracted + * from various pieces of beacon information, like beacon flags and various + * information elements. + */ +#define NM_802_11_AP_SEC_NONE 0x00000000 +#define NM_802_11_AP_SEC_PAIR_WEP40 0x00000001 +#define NM_802_11_AP_SEC_PAIR_WEP104 0x00000002 +#define NM_802_11_AP_SEC_PAIR_TKIP 0x00000004 +#define NM_802_11_AP_SEC_PAIR_CCMP 0x00000008 +#define NM_802_11_AP_SEC_GROUP_WEP40 0x00000010 +#define NM_802_11_AP_SEC_GROUP_WEP104 0x00000020 +#define NM_802_11_AP_SEC_GROUP_TKIP 0x00000040 +#define NM_802_11_AP_SEC_GROUP_CCMP 0x00000080 +#define NM_802_11_AP_SEC_KEY_MGMT_PSK 0x00000100 +#define NM_802_11_AP_SEC_KEY_MGMT_802_1X 0x00000200 + +/* + * 802.11 AP and Station modes + * + */ +typedef enum { + NM_802_11_MODE_UNKNOWN = 0, + NM_802_11_MODE_ADHOC, + NM_802_11_MODE_INFRA +} NM80211Mode; + +/** + * NMBluetoothCapabilities: + * @NM_BT_CAPABILITY_NONE: device has no usable capabilities + * @NM_BT_CAPABILITY_DUN: device provides Dial-Up Networking capability + * @NM_BT_CAPABILITY_PAN: device provides Personal Area Networking capability + * + * #NMBluetoothCapabilities values indicate the usable capabilities of a + * Bluetooth device. + */ +typedef enum { + NM_BT_CAPABILITY_NONE = 0x00000000, + NM_BT_CAPABILITY_DUN = 0x00000001, + NM_BT_CAPABILITY_NAP = 0x00000002, +} NMBluetoothCapabilities; + + +/* + * Device states + */ +typedef enum +{ + NM_DEVICE_STATE_UNKNOWN = 0, + + /* Initial state of all devices and the only state for devices not + * managed by NetworkManager. + * + * Allowed next states: + * UNAVAILABLE: the device is now managed by NetworkManager + */ + NM_DEVICE_STATE_UNMANAGED = 1, + + /* Indicates the device is not yet ready for use, but is managed by + * NetworkManager. For Ethernet devices, the device may not have an + * active carrier. For WiFi devices, the device may not have it's radio + * enabled. + * + * Allowed next states: + * UNMANAGED: the device is no longer managed by NetworkManager + * DISCONNECTED: the device is now ready for use + */ + NM_DEVICE_STATE_UNAVAILABLE = 2, + + /* Indicates the device does not have an activate connection to anything. + * + * Allowed next states: + * UNMANAGED: the device is no longer managed by NetworkManager + * UNAVAILABLE: the device is no longer ready for use (rfkill, no carrier, etc) + * PREPARE: the device has started activation + */ + NM_DEVICE_STATE_DISCONNECTED = 3, + + /* Indicate states in device activation. + * + * Allowed next states: + * UNMANAGED: the device is no longer managed by NetworkManager + * UNAVAILABLE: the device is no longer ready for use (rfkill, no carrier, etc) + * FAILED: an error ocurred during activation + * NEED_AUTH: authentication/secrets are needed + * ACTIVATED: (IP_CONFIG only) activation was successful + * DISCONNECTED: the device's connection is no longer valid, or NetworkManager went to sleep + */ + NM_DEVICE_STATE_PREPARE = 4, + NM_DEVICE_STATE_CONFIG = 5, + NM_DEVICE_STATE_NEED_AUTH = 6, + NM_DEVICE_STATE_IP_CONFIG = 7, + + /* Indicates the device is part of an active network connection. + * + * Allowed next states: + * UNMANAGED: the device is no longer managed by NetworkManager + * UNAVAILABLE: the device is no longer ready for use (rfkill, no carrier, etc) + * FAILED: a DHCP lease was not renewed, or another error + * DISCONNECTED: the device's connection is no longer valid, or NetworkManager went to sleep + */ + NM_DEVICE_STATE_ACTIVATED = 8, + + /* Indicates the device's activation failed. + * + * Allowed next states: + * UNMANAGED: the device is no longer managed by NetworkManager + * UNAVAILABLE: the device is no longer ready for use (rfkill, no carrier, etc) + * DISCONNECTED: the device's connection is ready for activation, or NetworkManager went to sleep + */ + NM_DEVICE_STATE_FAILED = 9 +} NMDeviceState; + + +/* + * Device state change reason codes + */ +typedef enum { + /* No reason given */ + NM_DEVICE_STATE_REASON_NONE = 0, + + /* Unknown error */ + NM_DEVICE_STATE_REASON_UNKNOWN = 1, + + /* Device is now managed */ + NM_DEVICE_STATE_REASON_NOW_MANAGED = 2, + + /* Device is now managed unmanaged */ + NM_DEVICE_STATE_REASON_NOW_UNMANAGED = 3, + + /* The device could not be readied for configuration */ + NM_DEVICE_STATE_REASON_CONFIG_FAILED = 4, + + /* IP configuration could not be reserved (no available address, timeout, etc) */ + NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE = 5, + + /* The IP config is no longer valid */ + NM_DEVICE_STATE_REASON_IP_CONFIG_EXPIRED = 6, + + /* Secrets were required, but not provided */ + NM_DEVICE_STATE_REASON_NO_SECRETS = 7, + + /* 802.1x supplicant disconnected */ + NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT = 8, + + /* 802.1x supplicant configuration failed */ + NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED = 9, + + /* 802.1x supplicant failed */ + NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED = 10, + + /* 802.1x supplicant took too long to authenticate */ + NM_DEVICE_STATE_REASON_SUPPLICANT_TIMEOUT = 11, + + /* PPP service failed to start */ + NM_DEVICE_STATE_REASON_PPP_START_FAILED = 12, + + /* PPP service disconnected */ + NM_DEVICE_STATE_REASON_PPP_DISCONNECT = 13, + + /* PPP failed */ + NM_DEVICE_STATE_REASON_PPP_FAILED = 14, + + /* DHCP client failed to start */ + NM_DEVICE_STATE_REASON_DHCP_START_FAILED = 15, + + /* DHCP client error */ + NM_DEVICE_STATE_REASON_DHCP_ERROR = 16, + + /* DHCP client failed */ + NM_DEVICE_STATE_REASON_DHCP_FAILED = 17, + + /* Shared connection service failed to start */ + NM_DEVICE_STATE_REASON_SHARED_START_FAILED = 18, + + /* Shared connection service failed */ + NM_DEVICE_STATE_REASON_SHARED_FAILED = 19, + + /* AutoIP service failed to start */ + NM_DEVICE_STATE_REASON_AUTOIP_START_FAILED = 20, + + /* AutoIP service error */ + NM_DEVICE_STATE_REASON_AUTOIP_ERROR = 21, + + /* AutoIP service failed */ + NM_DEVICE_STATE_REASON_AUTOIP_FAILED = 22, + + /* The line is busy */ + NM_DEVICE_STATE_REASON_MODEM_BUSY = 23, + + /* No dial tone */ + NM_DEVICE_STATE_REASON_MODEM_NO_DIAL_TONE = 24, + + /* No carrier could be established */ + NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER = 25, + + /* The dialing request timed out */ + NM_DEVICE_STATE_REASON_MODEM_DIAL_TIMEOUT = 26, + + /* The dialing attempt failed */ + NM_DEVICE_STATE_REASON_MODEM_DIAL_FAILED = 27, + + /* Modem initialization failed */ + NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED = 28, + + /* Failed to select the specified APN */ + NM_DEVICE_STATE_REASON_GSM_APN_FAILED = 29, + + /* Not searching for networks */ + NM_DEVICE_STATE_REASON_GSM_REGISTRATION_NOT_SEARCHING = 30, + + /* Network registration denied */ + NM_DEVICE_STATE_REASON_GSM_REGISTRATION_DENIED = 31, + + /* Network registration timed out */ + NM_DEVICE_STATE_REASON_GSM_REGISTRATION_TIMEOUT = 32, + + /* Failed to register with the requested network */ + NM_DEVICE_STATE_REASON_GSM_REGISTRATION_FAILED = 33, + + /* PIN check failed */ + NM_DEVICE_STATE_REASON_GSM_PIN_CHECK_FAILED = 34, + + /* Necessary firmware for the device may be missing */ + NM_DEVICE_STATE_REASON_FIRMWARE_MISSING = 35, + + /* The device was removed */ + NM_DEVICE_STATE_REASON_REMOVED = 36, + + /* NetworkManager went to sleep */ + NM_DEVICE_STATE_REASON_SLEEPING = 37, + + /* The device's active connection disappeared */ + NM_DEVICE_STATE_REASON_CONNECTION_REMOVED = 38, + + /* Device disconnected by user or client */ + NM_DEVICE_STATE_REASON_USER_REQUESTED = 39, + + /* Carrier/link changed */ + NM_DEVICE_STATE_REASON_CARRIER = 40, + + /* The device's existing connection was assumed */ + NM_DEVICE_STATE_REASON_CONNECTION_ASSUMED = 41, + + /* The supplicant is now available */ + NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE = 42, + + /* The modem could not be found */ + NM_DEVICE_STATE_REASON_MODEM_NOT_FOUND = 43, + + /* The Bluetooth connection failed or timed out */ + NM_DEVICE_STATE_REASON_BT_FAILED = 44, + + /* Unused */ + NM_DEVICE_STATE_REASON_LAST = 0xFFFF +} NMDeviceStateReason; + + +typedef enum { + NM_ACTIVE_CONNECTION_STATE_UNKNOWN = 0, + + /* Indicates the connection is activating */ + NM_ACTIVE_CONNECTION_STATE_ACTIVATING, + + /* Indicates the connection is currently active */ + NM_ACTIVE_CONNECTION_STATE_ACTIVATED +} NMActiveConnectionState; + +#endif /* NETWORK_MANAGER_H */ + diff --git a/include/NetworkManagerVPN.h b/include/NetworkManagerVPN.h new file mode 100644 index 00000000..d792847d --- /dev/null +++ b/include/NetworkManagerVPN.h @@ -0,0 +1,173 @@ +/* NetworkManager -- Network link manager + * + * Dan Williams <dcbw@redhat.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * (C) Copyright 2004 Red Hat, Inc. + */ + +#ifndef NETWORK_MANAGER_VPN_H +#define NETWORK_MANAGER_VPN_H + +/* + * dbus services details + */ +#define NM_DBUS_PATH_VPN "/org/freedesktop/NetworkManager/VPN/Manager" +#define NM_DBUS_INTERFACE_VPN "org.freedesktop.NetworkManager.VPN.Manager" + +#define NM_DBUS_PATH_VPN_CONNECTION "/org/freedesktop/NetworkManager/VPN/Connection" +#define NM_DBUS_INTERFACE_VPN_CONNECTION "org.freedesktop.NetworkManager.VPN.Connection" + +#define NM_VPN_DBUS_PLUGIN_PATH "/org/freedesktop/NetworkManager/VPN/Plugin" +#define NM_VPN_DBUS_PLUGIN_INTERFACE "org.freedesktop.NetworkManager.VPN.Plugin" + +/* + * VPN Errors + */ +#define NM_DBUS_NO_ACTIVE_VPN_CONNECTION "org.freedesktop.NetworkManager.VPNConnections.NoActiveVPNConnection" +#define NM_DBUS_NO_VPN_CONNECTIONS "org.freedesktop.NetworkManager.VPNConnections.NoVPNConnections" +#define NM_DBUS_INVALID_VPN_CONNECTION "org.freedesktop.NetworkManager.VPNConnections.InvalidVPNConnection" + +#define NM_DBUS_VPN_STARTING_IN_PROGRESS "StartingInProgress" +#define NM_DBUS_VPN_ALREADY_STARTED "AlreadyStarted" +#define NM_DBUS_VPN_STOPPING_IN_PROGRESS "StoppingInProgress" +#define NM_DBUS_VPN_ALREADY_STOPPED "AlreadyStopped" +#define NM_DBUS_VPN_WRONG_STATE "WrongState" +#define NM_DBUS_VPN_BAD_ARGUMENTS "BadArguments" + + +/* + * VPN daemon signals + */ +#define NM_DBUS_VPN_SIGNAL_LOGIN_BANNER "LoginBanner" +#define NM_DBUS_VPN_SIGNAL_LOGIN_FAILED "LoginFailed" +#define NM_DBUS_VPN_SIGNAL_LAUNCH_FAILED "LaunchFailed" +#define NM_DBUS_VPN_SIGNAL_CONNECT_FAILED "ConnectFailed" +#define NM_DBUS_VPN_SIGNAL_VPN_CONFIG_BAD "VPNConfigBad" +#define NM_DBUS_VPN_SIGNAL_IP_CONFIG_BAD "IPConfigBad" +#define NM_DBUS_VPN_SIGNAL_STATE_CHANGE "StateChange" +#define NM_DBUS_VPN_SIGNAL_IP4_CONFIG "IP4Config" + +/* + * VPN daemon states + */ +typedef enum NMVPNServiceState +{ + NM_VPN_SERVICE_STATE_UNKNOWN = 0, + NM_VPN_SERVICE_STATE_INIT, + NM_VPN_SERVICE_STATE_SHUTDOWN, + NM_VPN_SERVICE_STATE_STARTING, + NM_VPN_SERVICE_STATE_STARTED, + NM_VPN_SERVICE_STATE_STOPPING, + NM_VPN_SERVICE_STATE_STOPPED +} NMVPNServiceState; + + +/* + * VPN connection states + */ +typedef enum NMVPNConnectionState +{ + NM_VPN_CONNECTION_STATE_UNKNOWN = 0, + NM_VPN_CONNECTION_STATE_PREPARE, + NM_VPN_CONNECTION_STATE_NEED_AUTH, + NM_VPN_CONNECTION_STATE_CONNECT, + NM_VPN_CONNECTION_STATE_IP_CONFIG_GET, + NM_VPN_CONNECTION_STATE_ACTIVATED, + NM_VPN_CONNECTION_STATE_FAILED, + NM_VPN_CONNECTION_STATE_DISCONNECTED +} NMVPNConnectionState; + +typedef enum NMVPNConnectionStateReason +{ + NM_VPN_CONNECTION_STATE_REASON_UNKNOWN = 0, + NM_VPN_CONNECTION_STATE_REASON_NONE, + NM_VPN_CONNECTION_STATE_REASON_USER_DISCONNECTED, + NM_VPN_CONNECTION_STATE_REASON_DEVICE_DISCONNECTED, + NM_VPN_CONNECTION_STATE_REASON_SERVICE_STOPPED, + NM_VPN_CONNECTION_STATE_REASON_IP_CONFIG_INVALID, + NM_VPN_CONNECTION_STATE_REASON_CONNECT_TIMEOUT, + NM_VPN_CONNECTION_STATE_REASON_SERVICE_START_TIMEOUT, + NM_VPN_CONNECTION_STATE_REASON_SERVICE_START_FAILED, + NM_VPN_CONNECTION_STATE_REASON_NO_SECRETS, + NM_VPN_CONNECTION_STATE_REASON_LOGIN_FAILED, + NM_VPN_CONNECTION_STATE_REASON_CONNECTION_REMOVED +} NMVPNConnectionStateReason; + +typedef enum { + NM_VPN_PLUGIN_FAILURE_LOGIN_FAILED, + NM_VPN_PLUGIN_FAILURE_CONNECT_FAILED, + NM_VPN_PLUGIN_FAILURE_BAD_IP_CONFIG +} NMVPNPluginFailure; + + +/* uint32: IP address of the public external VPN gateway (network byte order) */ +#define NM_VPN_PLUGIN_IP4_CONFIG_EXT_GATEWAY "gateway" + +/* uint32: IP address of the internal gateway of the subnet the VPN interface is + * on, if the VPN uses subnet configuration (network byte order) + */ +#define NM_VPN_PLUGIN_IP4_CONFIG_INT_GATEWAY "internal-gateway" + +/* uint32: internal IP address of the local VPN interface (network byte order) */ +#define NM_VPN_PLUGIN_IP4_CONFIG_ADDRESS "address" + +/* uint32: IP address of the other side of Point-to-Point connection if the VPN + * uses Point-to-Point configuration. (network byte order) + */ +#define NM_VPN_PLUGIN_IP4_CONFIG_PTP "ptp" + +/* uint32: IP prefix of the VPN interface; 1 - 32 inclusive */ +#define NM_VPN_PLUGIN_IP4_CONFIG_PREFIX "prefix" + +/* array of uint32: IP addresses of DNS servers for the VPN (network byte order) */ +#define NM_VPN_PLUGIN_IP4_CONFIG_DNS "dns" + +/* array of uint32: IP addresses of NBNS/WINS servers for the VPN (network byte order) */ +#define NM_VPN_PLUGIN_IP4_CONFIG_NBNS "nbns" + +/* uint32: Message Segment Size that the VPN interface should use */ +#define NM_VPN_PLUGIN_IP4_CONFIG_MSS "mss" + +/* uint32: Maximum Transfer Unit that the VPN interface should use */ +#define NM_VPN_PLUGIN_IP4_CONFIG_MTU "mtu" + +/* string: VPN interface name (tun0, tap0, etc) */ +#define NM_VPN_PLUGIN_IP4_CONFIG_TUNDEV "tundev" + +/* string: DNS domain name */ +#define NM_VPN_PLUGIN_IP4_CONFIG_DOMAIN "domain" + +/* string: Login message */ +#define NM_VPN_PLUGIN_IP4_CONFIG_BANNER "banner" + +/* array of array of uint32: custom routes the client should apply. NOTE: NM + * expects the D-Bus argument signature "aau" here. i.e., an array of + * routes, where each route is a 4-element array of uint32 values. + * + * Each route consists of the following 4 uint32 values, in this order: + * 1: destination IP address (network byte order) + * 2: destination prefix (1 - 32 inclusive) + * 3: IP address of next hop (network byte order) + * 4: route metric + */ +#define NM_VPN_PLUGIN_IP4_CONFIG_ROUTES "routes" + +/* Deprecated */ +#define NM_VPN_PLUGIN_IP4_CONFIG_GATEWAY NM_VPN_PLUGIN_IP4_CONFIG_EXT_GATEWAY + + +#endif /* NETWORK_MANAGER_VPN_H */ diff --git a/include/nm-dbus-glib-types.h b/include/nm-dbus-glib-types.h new file mode 100644 index 00000000..0f8c542e --- /dev/null +++ b/include/nm-dbus-glib-types.h @@ -0,0 +1,43 @@ +/* NetworkManager -- Network link manager + * + * Dan Williams <dcbw@redhat.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * (C) Copyright 2008 Red Hat, Inc. + */ + +#ifndef DBUS_GLIB_TYPES_H +#define DBUS_GLIB_TYPES_H + +#include <dbus/dbus-glib.h> + +#define DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH (dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH)) +#define DBUS_TYPE_G_ARRAY_OF_STRING (dbus_g_type_get_collection ("GPtrArray", G_TYPE_STRING)) +#define DBUS_TYPE_G_ARRAY_OF_UINT (dbus_g_type_get_collection ("GArray", G_TYPE_UINT)) +#define DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UCHAR (dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_UCHAR_ARRAY)) +#define DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UINT (dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_ARRAY_OF_UINT)) +#define DBUS_TYPE_G_MAP_OF_VARIANT (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE)) +#define DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, DBUS_TYPE_G_MAP_OF_VARIANT)) +#define DBUS_TYPE_G_MAP_OF_STRING (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_STRING)) +#define DBUS_TYPE_G_LIST_OF_STRING (dbus_g_type_get_collection ("GSList", G_TYPE_STRING)) + +#define DBUS_TYPE_G_IP6_ADDRESS (dbus_g_type_get_struct ("GValueArray", DBUS_TYPE_G_UCHAR_ARRAY, G_TYPE_UINT, DBUS_TYPE_G_UCHAR_ARRAY, G_TYPE_INVALID)) +#define DBUS_TYPE_G_ARRAY_OF_IP6_ADDRESS (dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_IP6_ADDRESS)) +#define DBUS_TYPE_G_IP6_ROUTE (dbus_g_type_get_struct ("GValueArray", DBUS_TYPE_G_UCHAR_ARRAY, G_TYPE_UINT, DBUS_TYPE_G_UCHAR_ARRAY, G_TYPE_UINT, G_TYPE_INVALID)) +#define DBUS_TYPE_G_ARRAY_OF_IP6_ROUTE (dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_IP6_ROUTE)) + +#endif /* DBUS_GLIB_TYPES_H */ + diff --git a/include/nm-glib-compat.h b/include/nm-glib-compat.h new file mode 100644 index 00000000..9c1fe347 --- /dev/null +++ b/include/nm-glib-compat.h @@ -0,0 +1,37 @@ +/* NetworkManager -- Network link manager + * + * Dan Williams <dcbw@redhat.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * (C) Copyright 2008 Red Hat, Inc. + */ + +#ifndef NM_GLIB_COMPAT_H +#define NM_GLIB_COMPAT_H + +#include <glib.h> + +#if !GLIB_CHECK_VERSION(2,14,0) + +#define g_timeout_add_seconds(i, f, d) \ + g_timeout_add (i * G_USEC_PER_SEC, f, d) + +#define g_timeout_add_seconds_full(p, i, f, d, n) \ + g_timeout_add_full (p, i * G_USEC_PER_SEC, f, d, n) + +#endif /* !GLIB_CHECK_VERSION(2,14,0) */ + +#endif /* NM_GLIB_COMPAT_H */ diff --git a/include/nm-test-helpers.h b/include/nm-test-helpers.h new file mode 100644 index 00000000..91286b58 --- /dev/null +++ b/include/nm-test-helpers.h @@ -0,0 +1,48 @@ +/* NetworkManager -- Network link manager + * + * Dan Williams <dcbw@redhat.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * (C) Copyright 2008 Red Hat, Inc. + */ + +#ifndef NM_TEST_HELPERS_H +#define NM_TEST_HELPERS_H + +#include <stdio.h> +#include <unistd.h> + +static void +FAIL(const char *test_name, const char *fmt, ...) +{ + va_list args; + char buf[500]; + + snprintf (buf, 500, "FAIL: (%s) %s\n", test_name, fmt); + + va_start (args, fmt); + vfprintf (stderr, buf, args); + va_end (args); + _exit (1); +} + +#define ASSERT(x, test_name, fmt, ...) \ + if (!(x)) { \ + FAIL (test_name, fmt, ## __VA_ARGS__); \ + } + +#endif /* NM_TEST_HELPERS_H */ + diff --git a/include/wireless-helper.h b/include/wireless-helper.h new file mode 100644 index 00000000..d150ef7d --- /dev/null +++ b/include/wireless-helper.h @@ -0,0 +1,32 @@ +/* NetworkManager -- Network link manager + * + * Dan Williams <dcbw@redhat.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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 Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * (C) Copyright 2008 Red Hat, Inc. + */ + +/* Hacks necessary to #include wireless.h; yay for WEXT */ + +#ifndef __user +#define __user +#endif +#include <sys/types.h> +#include <linux/types.h> +#include <sys/socket.h> +#include <net/if.h> +#include <wireless.h> + |