all: port everything to libnm
Since the API has not changed at this point, this is mostly just a matter of updating Makefiles, and changing references to the library name in comments. NetworkManager cannot link to libnm due to the duplicated type/symbol names. So it links to libnm-core.la directly, which means that NetworkManager gets a separate copy of that code from libnm.so. Everything else links to libnm.
This commit is contained in:
6
.gitignore
vendored
6
.gitignore
vendored
@@ -146,11 +146,11 @@ valgrind-*.log
|
|||||||
/docs/api/NetworkManager.types
|
/docs/api/NetworkManager.types
|
||||||
|
|
||||||
/examples/C/glib/add-connection-dbus-glib
|
/examples/C/glib/add-connection-dbus-glib
|
||||||
/examples/C/glib/add-connection-libnm-glib
|
/examples/C/glib/add-connection-libnm
|
||||||
/examples/C/glib/get-active-connections-dbus-glib
|
/examples/C/glib/get-active-connections-dbus-glib
|
||||||
/examples/C/glib/get-ap-info-libnm-glib
|
/examples/C/glib/get-ap-info-libnm
|
||||||
/examples/C/glib/list-connections-dbus-glib
|
/examples/C/glib/list-connections-dbus-glib
|
||||||
/examples/C/glib/list-connections-libnm-glib
|
/examples/C/glib/list-connections-libnm
|
||||||
/examples/C/glib/monitor-nm-running-GDBus
|
/examples/C/glib/monitor-nm-running-GDBus
|
||||||
/examples/C/glib/monitor-nm-running-dbus-glib
|
/examples/C/glib/monitor-nm-running-dbus-glib
|
||||||
/examples/C/glib/monitor-nm-state-GDBus
|
/examples/C/glib/monitor-nm-state-GDBus
|
||||||
|
@@ -2,8 +2,8 @@ SUBDIRS = . tests
|
|||||||
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-I${top_srcdir}/include \
|
-I${top_srcdir}/include \
|
||||||
-I${top_srcdir}/libnm-util \
|
-I${top_srcdir}/libnm-core \
|
||||||
-I${top_builddir}/libnm-util \
|
-I${top_builddir}/libnm-core \
|
||||||
$(GLIB_CFLAGS) \
|
$(GLIB_CFLAGS) \
|
||||||
$(DBUS_CFLAGS) \
|
$(DBUS_CFLAGS) \
|
||||||
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
||||||
@@ -44,7 +44,7 @@ nm_dispatcher_SOURCES = \
|
|||||||
nm-dispatcher-utils.h
|
nm-dispatcher-utils.h
|
||||||
|
|
||||||
nm_dispatcher_LDADD = \
|
nm_dispatcher_LDADD = \
|
||||||
$(top_builddir)/libnm-util/libnm-util.la \
|
$(top_builddir)/libnm/libnm.la \
|
||||||
$(DBUS_LIBS) \
|
$(DBUS_LIBS) \
|
||||||
$(GLIB_LIBS)
|
$(GLIB_LIBS)
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ libtest_dispatcher_envp_la_CPPFLAGS = \
|
|||||||
$(AM_CPPFLAGS)
|
$(AM_CPPFLAGS)
|
||||||
|
|
||||||
libtest_dispatcher_envp_la_LIBADD = \
|
libtest_dispatcher_envp_la_LIBADD = \
|
||||||
$(top_builddir)/libnm-util/libnm-util.la \
|
$(top_builddir)/libnm/libnm.la \
|
||||||
$(GLIB_LIBS) \
|
$(GLIB_LIBS) \
|
||||||
$(DBUS_LIBS)
|
$(DBUS_LIBS)
|
||||||
|
|
||||||
|
@@ -2,8 +2,8 @@ if ENABLE_TESTS
|
|||||||
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(top_srcdir)/libnm-util \
|
-I$(top_srcdir)/libnm-core \
|
||||||
-I$(top_builddir)/libnm-util \
|
-I$(top_builddir)/libnm-core \
|
||||||
-I$(top_srcdir)/callouts \
|
-I$(top_srcdir)/callouts \
|
||||||
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
||||||
$(GLIB_CFLAGS) \
|
$(GLIB_CFLAGS) \
|
||||||
@@ -18,7 +18,7 @@ test_dispatcher_envp_SOURCES = \
|
|||||||
test-dispatcher-envp.c
|
test-dispatcher-envp.c
|
||||||
|
|
||||||
test_dispatcher_envp_LDADD = \
|
test_dispatcher_envp_LDADD = \
|
||||||
$(top_builddir)/libnm-util/libnm-util.la \
|
$(top_builddir)/libnm/libnm.la \
|
||||||
$(top_builddir)/callouts/libtest-dispatcher-envp.la \
|
$(top_builddir)/callouts/libtest-dispatcher-envp.la \
|
||||||
$(GLIB_LIBS) \
|
$(GLIB_LIBS) \
|
||||||
$(DBUS_LIBS)
|
$(DBUS_LIBS)
|
||||||
|
@@ -1,12 +1,10 @@
|
|||||||
SUBDIRS = cli tui
|
SUBDIRS = cli tui
|
||||||
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-I${top_srcdir} \
|
-I${top_srcdir}/libnm-core \
|
||||||
-I${top_srcdir}/libnm-util \
|
-I${top_builddir}/libnm-core \
|
||||||
-I${top_builddir}/libnm-util \
|
-I${top_srcdir}/libnm \
|
||||||
-I${top_srcdir}/libnm-glib \
|
-I${top_builddir}/libnm \
|
||||||
-I${top_builddir}/libnm-glib \
|
|
||||||
-I${top_srcdir}/include \
|
|
||||||
$(DBUS_CFLAGS) \
|
$(DBUS_CFLAGS) \
|
||||||
$(GLIB_CFLAGS) \
|
$(GLIB_CFLAGS) \
|
||||||
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
||||||
@@ -20,7 +18,6 @@ nm_online_CPPFLAGS = \
|
|||||||
$(AM_CPPFLAGS)
|
$(AM_CPPFLAGS)
|
||||||
|
|
||||||
nm_online_LDADD = \
|
nm_online_LDADD = \
|
||||||
$(top_builddir)/libnm-glib/libnm-glib.la \
|
$(top_builddir)/libnm/libnm.la \
|
||||||
$(top_builddir)/libnm-util/libnm-util.la \
|
|
||||||
$(DBUS_LIBS) \
|
$(DBUS_LIBS) \
|
||||||
$(GLIB_LIBS)
|
$(GLIB_LIBS)
|
||||||
|
@@ -5,9 +5,10 @@ AM_CPPFLAGS = \
|
|||||||
-I${top_srcdir} \
|
-I${top_srcdir} \
|
||||||
-I${top_builddir} \
|
-I${top_builddir} \
|
||||||
-I${top_srcdir}/include \
|
-I${top_srcdir}/include \
|
||||||
-I${top_srcdir}/libnm-util \
|
-I${top_srcdir}/libnm-core \
|
||||||
-I${top_builddir}/libnm-util \
|
-I${top_builddir}/libnm-core \
|
||||||
-I${top_srcdir}/libnm-glib \
|
-I${top_srcdir}/libnm \
|
||||||
|
-I${top_builddir}/libnm \
|
||||||
$(DBUS_CFLAGS) \
|
$(DBUS_CFLAGS) \
|
||||||
$(GLIB_CFLAGS) \
|
$(GLIB_CFLAGS) \
|
||||||
-DG_LOG_DOMAIN=\""nmcli"\" \
|
-DG_LOG_DOMAIN=\""nmcli"\" \
|
||||||
@@ -34,8 +35,7 @@ nmcli_LDADD = \
|
|||||||
$(DBUS_LIBS) \
|
$(DBUS_LIBS) \
|
||||||
$(GLIB_LIBS) \
|
$(GLIB_LIBS) \
|
||||||
$(READLINE_LIBS) \
|
$(READLINE_LIBS) \
|
||||||
$(top_builddir)/libnm-util/libnm-util.la \
|
$(top_builddir)/libnm/libnm.la
|
||||||
$(top_builddir)/libnm-glib/libnm-glib.la
|
|
||||||
|
|
||||||
if BUILD_SETTING_DOCS
|
if BUILD_SETTING_DOCS
|
||||||
settings-docs.c: settings-docs.xsl $(top_builddir)/libnm-util/nm-setting-docs.xml
|
settings-docs.c: settings-docs.xsl $(top_builddir)/libnm-util/nm-setting-docs.xml
|
||||||
|
@@ -897,7 +897,7 @@ nmc_device_reason_to_string (NMDeviceStateReason reason)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Max priority values from libnm-util/nm-setting-vlan.c */
|
/* Max priority values from libnm-core/nm-setting-vlan.c */
|
||||||
#define MAX_SKB_PRIO G_MAXUINT32
|
#define MAX_SKB_PRIO G_MAXUINT32
|
||||||
#define MAX_8021P_PRIO 7 /* Max 802.1p priority */
|
#define MAX_8021P_PRIO 7 /* Max 802.1p priority */
|
||||||
|
|
||||||
|
@@ -2220,7 +2220,7 @@ static const NameItem nmc_adsl_settings [] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* PPPoE is a base connection type from historical reasons.
|
/* PPPoE is a base connection type from historical reasons.
|
||||||
* See libnm-util/nm-setting.c:_nm_setting_is_base_type()
|
* See libnm-core/nm-setting.c:_nm_setting_is_base_type()
|
||||||
*/
|
*/
|
||||||
static const NameItem nmc_pppoe_settings [] = {
|
static const NameItem nmc_pppoe_settings [] = {
|
||||||
{ NM_SETTING_CONNECTION_SETTING_NAME, NULL, NULL, TRUE },
|
{ NM_SETTING_CONNECTION_SETTING_NAME, NULL, NULL, TRUE },
|
||||||
|
@@ -105,7 +105,7 @@ typedef enum {
|
|||||||
|
|
||||||
/* NmCli - main structure */
|
/* NmCli - main structure */
|
||||||
typedef struct _NmCli {
|
typedef struct _NmCli {
|
||||||
NMClient *client; /* Pointer to NMClient of libnm-glib */
|
NMClient *client; /* Pointer to NMClient of libnm */
|
||||||
NMClient *(*get_client) (struct _NmCli *nmc); /* Pointer to function for creating NMClient */
|
NMClient *(*get_client) (struct _NmCli *nmc); /* Pointer to function for creating NMClient */
|
||||||
|
|
||||||
NMCResultCode return_value; /* Return code of nmcli */
|
NMCResultCode return_value; /* Return code of nmcli */
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
#include <libnm-util/nm-utils.h>
|
#include <nm-utils.h>
|
||||||
|
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
@@ -2340,7 +2340,7 @@ nmc_property_con_set_uuid (NMSetting *setting, const char *prop, const char *val
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* 'permissions' */
|
/* 'permissions' */
|
||||||
/* define from libnm-util/nm-setting-connection.c */
|
/* define from libnm-core/nm-setting-connection.c */
|
||||||
#define PERM_USER_PREFIX "user:"
|
#define PERM_USER_PREFIX "user:"
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@@ -3913,7 +3913,7 @@ nmc_property_wired_set_s390_subchannels (NMSetting *setting, const char *prop, c
|
|||||||
char **strv = NULL, **iter;
|
char **strv = NULL, **iter;
|
||||||
GPtrArray *s390_subchannels;
|
GPtrArray *s390_subchannels;
|
||||||
|
|
||||||
//FIXME: both libnm-util and ifcfg-rh also allow two strings (3rd is optional)
|
//FIXME: both libnm and ifcfg-rh also allow two strings (3rd is optional)
|
||||||
strv = nmc_strsplit_set (val, " ,\t", 0);
|
strv = nmc_strsplit_set (val, " ,\t", 0);
|
||||||
if (g_strv_length (strv) != 3) {
|
if (g_strv_length (strv) != 3) {
|
||||||
g_set_error (error, 1, 0, _("'%s' is not valid; 3 strings should be provided"),
|
g_set_error (error, 1, 0, _("'%s' is not valid; 3 strings should be provided"),
|
||||||
|
@@ -5,9 +5,10 @@ SUBDIRS = newt .
|
|||||||
AM_CPPFLAGS= \
|
AM_CPPFLAGS= \
|
||||||
-I$(top_srcdir) \
|
-I$(top_srcdir) \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(top_srcdir)/libnm-util \
|
-I$(top_srcdir)/libnm-core \
|
||||||
-I$(top_builddir)/libnm-util \
|
-I$(top_builddir)/libnm-core \
|
||||||
-I$(top_srcdir)/libnm-glib \
|
-I$(top_srcdir)/libnm \
|
||||||
|
-I$(top_builddir)/libnm \
|
||||||
-I$(srcdir)/newt \
|
-I$(srcdir)/newt \
|
||||||
$(GLIB_CFLAGS) \
|
$(GLIB_CFLAGS) \
|
||||||
$(NEWT_CFLAGS) \
|
$(NEWT_CFLAGS) \
|
||||||
@@ -113,8 +114,7 @@ nmtui_SOURCES = \
|
|||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
nmtui_LDADD = \
|
nmtui_LDADD = \
|
||||||
$(top_builddir)/libnm-util/libnm-util.la \
|
$(top_builddir)/libnm/libnm.la \
|
||||||
$(top_builddir)/libnm-glib/libnm-glib.la \
|
|
||||||
$(builddir)/newt/libnmt-newt.a \
|
$(builddir)/newt/libnmt-newt.a \
|
||||||
$(GUDEV_LIBS) \
|
$(GUDEV_LIBS) \
|
||||||
$(DBUS_LIBS) \
|
$(DBUS_LIBS) \
|
||||||
|
@@ -273,7 +273,7 @@ nmt_newt_form_destroy (NmtNewtForm *form)
|
|||||||
|
|
||||||
/* A "normal" newt program would call newtFormRun() to run newt's main loop
|
/* A "normal" newt program would call newtFormRun() to run newt's main loop
|
||||||
* and process events. But we want to let GLib's main loop control the program
|
* and process events. But we want to let GLib's main loop control the program
|
||||||
* (eg, so libnm-glib can process D-Bus notifications). So we call this function
|
* (eg, so libnm can process D-Bus notifications). So we call this function
|
||||||
* to run a single iteration of newt's main loop (or rather, to run newt's
|
* to run a single iteration of newt's main loop (or rather, to run newt's
|
||||||
* main loop for 1ms) whenever there are events for newt to process (redrawing
|
* main loop for 1ms) whenever there are events for newt to process (redrawing
|
||||||
* or keypresses).
|
* or keypresses).
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
* @short_description: VPN-related utilities
|
* @short_description: VPN-related utilities
|
||||||
*
|
*
|
||||||
* This is copied directly from libnm-gtk and should probably
|
* This is copied directly from libnm-gtk and should probably
|
||||||
* eventually move into libnm-glib.
|
* eventually move into libnm.
|
||||||
*
|
*
|
||||||
* It is also currently unused in nmtui.
|
* It is also currently unused in nmtui.
|
||||||
*
|
*
|
||||||
|
@@ -1,58 +1,56 @@
|
|||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-I${top_srcdir}/libnm-util \
|
|
||||||
-I${top_builddir}/libnm-util \
|
|
||||||
-I${top_srcdir}/libnm-glib \
|
|
||||||
-I${top_srcdir}/include \
|
-I${top_srcdir}/include \
|
||||||
|
-I${top_srcdir}/libnm-core \
|
||||||
|
-I${top_builddir}/libnm-core \
|
||||||
|
-I${top_srcdir}/libnm \
|
||||||
|
-I${top_builddir}/libnm \
|
||||||
$(DBUS_CFLAGS) \
|
$(DBUS_CFLAGS) \
|
||||||
$(GLIB_CFLAGS)
|
$(GLIB_CFLAGS)
|
||||||
|
|
||||||
noinst_PROGRAMS = \
|
noinst_PROGRAMS = \
|
||||||
add-connection-dbus-glib \
|
add-connection-dbus-glib \
|
||||||
add-connection-libnm-glib \
|
add-connection-libnm \
|
||||||
get-active-connections-dbus-glib \
|
get-active-connections-dbus-glib \
|
||||||
list-connections-dbus-glib \
|
list-connections-dbus-glib \
|
||||||
list-connections-libnm-glib \
|
list-connections-libnm \
|
||||||
get-ap-info-libnm-glib \
|
get-ap-info-libnm \
|
||||||
monitor-nm-running-dbus-glib \
|
monitor-nm-running-dbus-glib \
|
||||||
monitor-nm-running-GDBus \
|
monitor-nm-running-GDBus \
|
||||||
monitor-nm-state-GDBus
|
monitor-nm-state-GDBus
|
||||||
|
|
||||||
add_connection_dbus_glib_SOURCES = add-connection-dbus-glib.c
|
add_connection_dbus_glib_SOURCES = add-connection-dbus-glib.c
|
||||||
add_connection_dbus_glib_LDADD = \
|
add_connection_dbus_glib_LDADD = \
|
||||||
$(top_builddir)/libnm-util/libnm-util.la \
|
$(top_builddir)/libnm/libnm.la \
|
||||||
$(DBUS_LIBS) \
|
$(DBUS_LIBS) \
|
||||||
$(GLIB_LIBS)
|
$(GLIB_LIBS)
|
||||||
|
|
||||||
add_connection_libnm_glib_SOURCES = add-connection-libnm-glib.c
|
add_connection_libnm_SOURCES = add-connection-libnm.c
|
||||||
add_connection_libnm_glib_LDADD = \
|
add_connection_libnm_LDADD = \
|
||||||
$(top_builddir)/libnm-util/libnm-util.la \
|
$(top_builddir)/libnm/libnm.la \
|
||||||
$(top_builddir)/libnm-glib/libnm-glib.la \
|
|
||||||
$(DBUS_LIBS) \
|
$(DBUS_LIBS) \
|
||||||
$(GLIB_LIBS)
|
$(GLIB_LIBS)
|
||||||
|
|
||||||
get_active_connections_dbus_glib_SOURCES = get-active-connections-dbus-glib.c
|
get_active_connections_dbus_glib_SOURCES = get-active-connections-dbus-glib.c
|
||||||
get_active_connections_dbus_glib_LDADD = \
|
get_active_connections_dbus_glib_LDADD = \
|
||||||
$(top_builddir)/libnm-util/libnm-util.la \
|
$(top_builddir)/libnm/libnm.la \
|
||||||
$(DBUS_LIBS) \
|
$(DBUS_LIBS) \
|
||||||
$(GLIB_LIBS)
|
$(GLIB_LIBS)
|
||||||
|
|
||||||
list_connections_dbus_glib_SOURCES = list-connections-dbus-glib.c
|
list_connections_dbus_glib_SOURCES = list-connections-dbus-glib.c
|
||||||
list_connections_dbus_glib_LDADD = \
|
list_connections_dbus_glib_LDADD = \
|
||||||
$(top_builddir)/libnm-util/libnm-util.la \
|
$(top_builddir)/libnm/libnm.la \
|
||||||
$(DBUS_LIBS) \
|
$(DBUS_LIBS) \
|
||||||
$(GLIB_LIBS)
|
$(GLIB_LIBS)
|
||||||
|
|
||||||
list_connections_libnm_glib_SOURCES = list-connections-libnm-glib.c
|
list_connections_libnm_SOURCES = list-connections-libnm.c
|
||||||
list_connections_libnm_glib_LDADD = \
|
list_connections_libnm_LDADD = \
|
||||||
$(top_builddir)/libnm-util/libnm-util.la \
|
$(top_builddir)/libnm/libnm.la \
|
||||||
$(top_builddir)/libnm-glib/libnm-glib.la \
|
|
||||||
$(DBUS_LIBS) \
|
$(DBUS_LIBS) \
|
||||||
$(GLIB_LIBS)
|
$(GLIB_LIBS)
|
||||||
|
|
||||||
get_ap_info_libnm_glib_SOURCES = get-ap-info-libnm-glib.c
|
get_ap_info_libnm_SOURCES = get-ap-info-libnm.c
|
||||||
get_ap_info_libnm_glib_LDADD = \
|
get_ap_info_libnm_LDADD = \
|
||||||
$(top_builddir)/libnm-util/libnm-util.la \
|
$(top_builddir)/libnm/libnm.la \
|
||||||
$(top_builddir)/libnm-glib/libnm-glib.la \
|
|
||||||
$(DBUS_LIBS) \
|
$(DBUS_LIBS) \
|
||||||
$(GLIB_LIBS)
|
$(GLIB_LIBS)
|
||||||
|
|
||||||
@@ -71,11 +69,11 @@ monitor_nm_state_GDBus_LDADD = \
|
|||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
add-connection-dbus-glib.c \
|
add-connection-dbus-glib.c \
|
||||||
add-connection-libnm-glib.c \
|
add-connection-libnm.c \
|
||||||
get-active-connections-dbus-glib.c \
|
get-active-connections-dbus-glib.c \
|
||||||
list-connections-dbus-glib.c \
|
list-connections-dbus-glib.c \
|
||||||
list-connections-libnm-glib.c \
|
list-connections-libnm.c \
|
||||||
get-ap-info-libnm-glib.c \
|
get-ap-info-libnm.c \
|
||||||
monitor-nm-running-dbus-glib.c \
|
monitor-nm-running-dbus-glib.c \
|
||||||
monitor-nm-running-GDBus.c \
|
monitor-nm-running-GDBus.c \
|
||||||
monitor-nm-state-GDBus.c
|
monitor-nm-state-GDBus.c
|
||||||
|
@@ -19,11 +19,11 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* The example shows how to call AddConnection() D-Bus method to add
|
* The example shows how to call AddConnection() D-Bus method to add
|
||||||
* a connection to system settings service. It uses dbus-glib and libnm-util
|
* a connection to system settings service. It uses dbus-glib and libnm
|
||||||
* libraries.
|
* libraries.
|
||||||
*
|
*
|
||||||
* Compile with:
|
* Compile with:
|
||||||
* gcc -Wall `pkg-config --libs --cflags glib-2.0 dbus-glib-1 libnm-util` add-connection-glib.c -o add-connection-glib
|
* gcc -Wall `pkg-config --libs --cflags glib-2.0 dbus-glib-1 libnm` add-connection-glib.c -o add-connection-glib
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
@@ -18,13 +18,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The example shows how to add a new connection using libnm-glib and libnm-util.
|
* The example shows how to add a new connection using libnm.
|
||||||
* Contrast this example with add-connection-dbus-glib.c, which is a bit lower
|
* Contrast this example with add-connection-dbus-glib.c, which is a bit lower
|
||||||
* level and talks directly to NM using dbus-glib. This example is simpler
|
* level and talks directly to NM using dbus-glib. This example is simpler
|
||||||
* because libnm-glib handles much of the low-level stuff for you.
|
* because libnm handles much of the low-level stuff for you.
|
||||||
*
|
*
|
||||||
* Compile with:
|
* Compile with:
|
||||||
* gcc -Wall `pkg-config --libs --cflags glib-2.0 dbus-glib-1 libnm-util` add-connection-libnm-glib.c -o add-connection-libnm-glib
|
* gcc -Wall `pkg-config --libs --cflags glib-2.0 dbus-glib-1 libnm` add-connection-libnm.c -o add-connection-libnm
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
@@ -20,10 +20,10 @@
|
|||||||
/*
|
/*
|
||||||
* The example shows how to call the D-Bus properties interface to get the
|
* The example shows how to call the D-Bus properties interface to get the
|
||||||
* list of currently active connections known to NetworkManager. It uses
|
* list of currently active connections known to NetworkManager. It uses
|
||||||
* dbus-glib and libnm-util libraries.
|
* dbus-glib and libnm libraries.
|
||||||
*
|
*
|
||||||
* Compile with:
|
* Compile with:
|
||||||
* gcc -Wall `pkg-config --libs --cflags glib-2.0 dbus-glib-1 libnm-util` get-active-connections-dbus-glib.c -o get-active-connections-dbus-glib
|
* gcc -Wall `pkg-config --libs --cflags glib-2.0 dbus-glib-1 libnm` get-active-connections-dbus-glib.c -o get-active-connections-dbus-glib
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@@ -18,11 +18,10 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* The example shows how to get info about APs visible by Wi-Fi devices
|
* The example shows how to get info about APs visible by Wi-Fi devices
|
||||||
* using libnm-glib (that wraps direct D-Bus calls).
|
* using libnm (that wraps direct D-Bus calls).
|
||||||
* The example uses dbus-glib, libnm-util and libnm-glib libraries.
|
|
||||||
*
|
*
|
||||||
* Compile with:
|
* Compile with:
|
||||||
* gcc -Wall `pkg-config --libs --cflags glib-2.0 dbus-glib-1 libnm-util libnm-glib` get-ap-info-libnm-glib.c -o get-ap-info-libnm-glib
|
* gcc -Wall `pkg-config --libs --cflags glib-2.0 libnm` get-ap-info-libnm.c -o get-ap-info-libnm
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
@@ -195,7 +194,6 @@ show_wifi_device_info (NMDevice *device)
|
|||||||
|
|
||||||
int main (int argc, char *argv[])
|
int main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
DBusGConnection *bus;
|
|
||||||
NMClient *client;
|
NMClient *client;
|
||||||
const GPtrArray *devices;
|
const GPtrArray *devices;
|
||||||
int i;
|
int i;
|
||||||
@@ -205,13 +203,9 @@ int main (int argc, char *argv[])
|
|||||||
g_type_init ();
|
g_type_init ();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Get system bus */
|
|
||||||
bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);
|
|
||||||
|
|
||||||
/* Get NMClient object */
|
/* Get NMClient object */
|
||||||
client = nm_client_new ();
|
client = nm_client_new ();
|
||||||
if (!client) {
|
if (!client) {
|
||||||
dbus_g_connection_unref (bus);
|
|
||||||
g_message ("Error: Could not create NMClient.");
|
g_message ("Error: Could not create NMClient.");
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
@@ -227,7 +221,6 @@ int main (int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_object_unref (client);
|
g_object_unref (client);
|
||||||
dbus_g_connection_unref (bus);
|
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
@@ -19,10 +19,10 @@
|
|||||||
/*
|
/*
|
||||||
* The example shows how to list connections from System Settings service using direct
|
* The example shows how to list connections from System Settings service using direct
|
||||||
* D-Bus call of ListConnections method.
|
* D-Bus call of ListConnections method.
|
||||||
* The example uses dbus-glib, libnm-util libraries.
|
* The example uses dbus-glib libraries and libnm headers.
|
||||||
*
|
*
|
||||||
* Compile with:
|
* Compile with:
|
||||||
* gcc -Wall `pkg-config --libs --cflags glib-2.0 dbus-glib-1 libnm-util` list-connections-dbus.c -o list-connections-dbus
|
* gcc -Wall `pkg-config --libs --cflags glib-2.0 dbus-glib-1` `pkg-config --cflags libnm` list-connections-dbus.c -o list-connections-dbus
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
@@ -30,7 +30,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <NetworkManager.h>
|
#include <NetworkManager.h>
|
||||||
#include <nm-utils.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_OBJECT_PATH (dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH))
|
||||||
|
|
||||||
|
@@ -17,12 +17,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The example shows how to list connections from System Settings service using libnm-glib
|
* The example shows how to list connections from System Settings service using libnm
|
||||||
* (that wraps direct D-Bus calls).
|
* (that wraps direct D-Bus calls).
|
||||||
* The example uses dbus-glib, libnm-util and libnm-glib libraries.
|
|
||||||
*
|
*
|
||||||
* Compile with:
|
* Compile with:
|
||||||
* gcc -Wall `pkg-config --libs --cflags glib-2.0 dbus-glib-1 libnm-util libnm-glib` list-connections-libnm-glib.c -o list-connections-libnm-glib
|
* gcc -Wall `pkg-config --libs --cflags glib-2.0 dbus-glib-1 libnm` list-connections-libnm.c -o list-connections-libnm
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
@@ -21,13 +21,13 @@
|
|||||||
/*
|
/*
|
||||||
* This example monitors NM state via D-Bus "StateChanged" signal on
|
* This example monitors NM state via D-Bus "StateChanged" signal on
|
||||||
* "org.freedesktop.NetworkManager" object.
|
* "org.freedesktop.NetworkManager" object.
|
||||||
* It uses GDBus.
|
* It uses GDBus and the libnm headers.
|
||||||
|
|
||||||
* You don't need to have NetworkManager devel package installed. You can just
|
* You don't need to have NetworkManager devel package installed. You can just
|
||||||
* grab NetworkManager.h and put it in the path.
|
* grab NetworkManager.h and put it in the path.
|
||||||
*
|
*
|
||||||
* Standalone compilation:
|
* Standalone compilation:
|
||||||
* gcc -Wall `pkg-config --libs --cflags glib-2.0 gio-2.0 NetworkManager` monitor-nm-state-GDBus.c -o monitor-nm-state-GDBus
|
* gcc -Wall `pkg-config --libs --cflags glib-2.0 gio-2.0` `pkg-config --cflags libnm` monitor-nm-state-GDBus.c -o monitor-nm-state-GDBus
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <gio/gio.h>
|
#include <gio/gio.h>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-I${top_srcdir}/libnm-util \
|
-I${top_srcdir}/libnm-core \
|
||||||
-I${top_builddir}/libnm-util \
|
-I${top_builddir}/libnm-core \
|
||||||
$(DBUS_CFLAGS) \
|
$(DBUS_CFLAGS) \
|
||||||
$(QT_CFLAGS)
|
$(QT_CFLAGS)
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
* It uses Qt and D-Bus libraries to do that.
|
* It uses Qt and D-Bus libraries to do that.
|
||||||
*
|
*
|
||||||
* Standalone compilation:
|
* Standalone compilation:
|
||||||
* g++ -Wall `pkg-config --libs --cflags NetworkManager QtCore QtDBus QtNetwork` change-ipv4-addresses.cpp -o change-ipv4-addresses
|
* g++ -Wall `pkg-config --libs --cflags QtCore QtDBus QtNetwork` `pkg-config --cflags libnm` change-ipv4-addresses.cpp -o change-ipv4-addresses
|
||||||
*
|
*
|
||||||
* You don't need to have NetworkManager devel package installed; you can just
|
* You don't need to have NetworkManager devel package installed; you can just
|
||||||
* grab NetworkManager.h and put it in the path
|
* grab NetworkManager.h and put it in the path
|
||||||
|
@@ -20,16 +20,14 @@
|
|||||||
|
|
||||||
#
|
#
|
||||||
# This example shows how to add a new NM connection profile.
|
# This example shows how to add a new NM connection profile.
|
||||||
# The code uses libnm-util (NetworkManager) and libnm-glib (NMClient)
|
# The code uses libnm (NM) via GObject Introspection.
|
||||||
# via GObject Introspection.
|
|
||||||
#
|
#
|
||||||
# Documentation links:
|
# Documentation links:
|
||||||
# https://developer.gnome.org/libnm-glib/0.9/
|
# https://developer.gnome.org/libnm/1.0/
|
||||||
# https://developer.gnome.org/libnm-util/0.9/
|
# https://developer.gnome.org/NetworkManager/1.0/ref-settings.html
|
||||||
# https://developer.gnome.org/NetworkManager/0.9/ref-settings.html
|
|
||||||
#
|
#
|
||||||
|
|
||||||
from gi.repository import GLib, NetworkManager, NMClient
|
from gi.repository import GLib, NM
|
||||||
import sys, uuid
|
import sys, uuid
|
||||||
|
|
||||||
main_loop = None
|
main_loop = None
|
||||||
@@ -39,19 +37,19 @@ def print_values(setting, key, value, flags, data):
|
|||||||
|
|
||||||
# create an Ethernet connection and return it
|
# create an Ethernet connection and return it
|
||||||
def create_profile(name):
|
def create_profile(name):
|
||||||
profile = NetworkManager.Connection.new()
|
profile = NM.Connection.new()
|
||||||
s_con = NetworkManager.SettingConnection.new()
|
s_con = NM.SettingConnection.new()
|
||||||
s_con.set_property(NetworkManager.SETTING_CONNECTION_ID, name)
|
s_con.set_property(NM.SETTING_CONNECTION_ID, name)
|
||||||
s_con.set_property(NetworkManager.SETTING_CONNECTION_UUID, str(uuid.uuid4()))
|
s_con.set_property(NM.SETTING_CONNECTION_UUID, str(uuid.uuid4()))
|
||||||
s_con.set_property(NetworkManager.SETTING_CONNECTION_TYPE, "802-3-ethernet")
|
s_con.set_property(NM.SETTING_CONNECTION_TYPE, "802-3-ethernet")
|
||||||
|
|
||||||
s_wired = NetworkManager.SettingWired.new()
|
s_wired = NM.SettingWired.new()
|
||||||
|
|
||||||
s_ip4 = NetworkManager.SettingIP4Config.new()
|
s_ip4 = NM.SettingIP4Config.new()
|
||||||
s_ip4.set_property(NetworkManager.SETTING_IP4_CONFIG_METHOD, "auto")
|
s_ip4.set_property(NM.SETTING_IP4_CONFIG_METHOD, "auto")
|
||||||
|
|
||||||
s_ip6 = NetworkManager.SettingIP6Config.new()
|
s_ip6 = NM.SettingIP6Config.new()
|
||||||
s_ip6.set_property(NetworkManager.SETTING_IP6_CONFIG_METHOD, "auto")
|
s_ip6.set_property(NM.SETTING_IP6_CONFIG_METHOD, "auto")
|
||||||
|
|
||||||
profile.add_setting(s_con)
|
profile.add_setting(s_con)
|
||||||
profile.add_setting(s_ip4)
|
profile.add_setting(s_ip4)
|
||||||
@@ -86,7 +84,7 @@ if __name__ == "__main__":
|
|||||||
main_loop = GLib.MainLoop()
|
main_loop = GLib.MainLoop()
|
||||||
|
|
||||||
# create RemoteSettings object
|
# create RemoteSettings object
|
||||||
settings = NMClient.RemoteSettings.new(None);
|
settings = NM.RemoteSettings.new(None);
|
||||||
|
|
||||||
# create a connection profile for NM
|
# create a connection profile for NM
|
||||||
con = create_profile(profile_name)
|
con = create_profile(profile_name)
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
from gi.repository import GLib, NetworkManager, NMClient
|
from gi.repository import GLib, NM
|
||||||
|
|
||||||
#
|
#
|
||||||
# This example shows how to get NMIP4Config from NMDevice after it is activated.
|
# This example shows how to get NMIP4Config from NMDevice after it is activated.
|
||||||
@@ -51,7 +51,7 @@ if __name__ == "__main__":
|
|||||||
sys.exit('Usage: %s <interface>' % sys.argv[0])
|
sys.exit('Usage: %s <interface>' % sys.argv[0])
|
||||||
dev_iface = sys.argv[1]
|
dev_iface = sys.argv[1]
|
||||||
|
|
||||||
c = NMClient.Client.new()
|
c = NM.Client.new()
|
||||||
dev = c.get_device_by_iface(dev_iface)
|
dev = c.get_device_by_iface(dev_iface)
|
||||||
if dev is None:
|
if dev is None:
|
||||||
sys.exit('Device \'%s\' not found' % dev_iface)
|
sys.exit('Device \'%s\' not found' % dev_iface)
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
from gi.repository import GLib, NetworkManager, NMClient
|
from gi.repository import GLib, NM
|
||||||
|
|
||||||
#
|
#
|
||||||
# This example demonstrates how to get and change firewall zone in a
|
# This example demonstrates how to get and change firewall zone in a
|
||||||
@@ -32,7 +32,7 @@ from gi.repository import GLib, NetworkManager, NMClient
|
|||||||
# If you used D-Bus calls, you would call GetSettings() and then Update().
|
# If you used D-Bus calls, you would call GetSettings() and then Update().
|
||||||
#
|
#
|
||||||
# Links:
|
# Links:
|
||||||
# https://developer.gnome.org/libnm-glib/0.9/
|
# https://developer.gnome.org/libnm/1.0/
|
||||||
# https://wiki.gnome.org/GObjectIntrospection
|
# https://wiki.gnome.org/GObjectIntrospection
|
||||||
# https://wiki.gnome.org/PyGObject
|
# https://wiki.gnome.org/PyGObject
|
||||||
#
|
#
|
||||||
@@ -78,7 +78,7 @@ if __name__ == "__main__":
|
|||||||
sys.exit('Usage: %s <connection name or UUID> [new zone]' % sys.argv[0])
|
sys.exit('Usage: %s <connection name or UUID> [new zone]' % sys.argv[0])
|
||||||
|
|
||||||
main_loop = GLib.MainLoop()
|
main_loop = GLib.MainLoop()
|
||||||
settings = NMClient.RemoteSettings.new(None);
|
settings = NM.RemoteSettings.new(None);
|
||||||
|
|
||||||
# Connections are read asynchronously, so we have to wait for the
|
# Connections are read asynchronously, so we have to wait for the
|
||||||
# 'settings' object to tell us that all connections have been read.
|
# 'settings' object to tell us that all connections have been read.
|
||||||
|
@@ -21,10 +21,10 @@
|
|||||||
|
|
||||||
# This example lists currently active connections
|
# This example lists currently active connections
|
||||||
|
|
||||||
from gi.repository import GLib, NMClient
|
from gi.repository import GLib, NM
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
client = NMClient.Client.new()
|
client = NM.Client.new()
|
||||||
acons = client.get_active_connections()
|
acons = client.get_active_connections()
|
||||||
for ac in acons:
|
for ac in acons:
|
||||||
print "%s (%s) - %s" % (ac.get_id(), ac.get_uuid(), ac.get_connection_type())
|
print "%s (%s) - %s" % (ac.get_id(), ac.get_uuid(), ac.get_connection_type())
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
import sys, socket, struct
|
import sys, socket, struct
|
||||||
from gi.repository import GLib, NetworkManager, NMClient
|
from gi.repository import GLib, NM
|
||||||
|
|
||||||
#
|
#
|
||||||
# This example shows how to get addresses, routes and DNS information
|
# This example shows how to get addresses, routes and DNS information
|
||||||
@@ -124,7 +124,7 @@ if __name__ == "__main__":
|
|||||||
sys.exit('Usage: %s <interface>' % sys.argv[0])
|
sys.exit('Usage: %s <interface>' % sys.argv[0])
|
||||||
dev_iface = sys.argv[1]
|
dev_iface = sys.argv[1]
|
||||||
|
|
||||||
c = NMClient.Client.new()
|
c = NM.Client.new()
|
||||||
dev = c.get_device_by_iface(dev_iface)
|
dev = c.get_device_by_iface(dev_iface)
|
||||||
if dev is None:
|
if dev is None:
|
||||||
sys.exit('Device \'%s\' not found' % dev_iface)
|
sys.exit('Device \'%s\' not found' % dev_iface)
|
||||||
|
@@ -18,11 +18,11 @@
|
|||||||
# Copyright (C) 2012 Red Hat, Inc.
|
# Copyright (C) 2012 Red Hat, Inc.
|
||||||
#
|
#
|
||||||
|
|
||||||
from gi.repository import GLib, NetworkManager, NMClient
|
from gi.repository import GLib, NM
|
||||||
|
|
||||||
# This example asks settings service for all configured connections.
|
# This example asks settings service for all configured connections.
|
||||||
# Unfortunately, at this time since libnm-glib still makes heavy use of
|
# Unfortunately, at this time since libnm still makes heavy use of
|
||||||
# GValue and GHashTable (rather than GVariant), libnm-glib isn't fully
|
# GValue and GHashTable (rather than GVariant), libnm isn't fully
|
||||||
# usable from GObject Introspection-ready languages. Most functions will
|
# usable from GObject Introspection-ready languages. Most functions will
|
||||||
# work fine, but e. g. nm_connection_to_hash() causes assertion failures.
|
# work fine, but e. g. nm_connection_to_hash() causes assertion failures.
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ def connections_read(settings):
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main_loop = GLib.MainLoop()
|
main_loop = GLib.MainLoop()
|
||||||
settings = NMClient.RemoteSettings.new(None);
|
settings = NM.RemoteSettings.new(None);
|
||||||
|
|
||||||
# connections are read asynchronously, so we need to wait for the
|
# connections are read asynchronously, so we need to wait for the
|
||||||
# settings object to tell us that it's read all connections
|
# settings object to tell us that it's read all connections
|
||||||
|
@@ -20,11 +20,11 @@
|
|||||||
# Copyright (C) 2013 Red Hat, Inc.
|
# Copyright (C) 2013 Red Hat, Inc.
|
||||||
#
|
#
|
||||||
|
|
||||||
from gi.repository import NetworkManager, NMClient
|
from gi.repository import NM
|
||||||
|
|
||||||
#
|
#
|
||||||
# This example lists Wi-Fi access points NetworkManager scanned on Wi-Fi devices.
|
# This example lists Wi-Fi access points NetworkManager scanned on Wi-Fi devices.
|
||||||
# It calls libnm-glib functions using GObject introspection.
|
# It calls libnm functions using GObject introspection.
|
||||||
#
|
#
|
||||||
# Note the second line of the file: coding=utf-8
|
# Note the second line of the file: coding=utf-8
|
||||||
# It is necessary because we use unicode characters and python would produce
|
# It is necessary because we use unicode characters and python would produce
|
||||||
@@ -57,16 +57,16 @@ def print_ap_info(ap):
|
|||||||
print "SSID: %s" % (ap.get_ssid())
|
print "SSID: %s" % (ap.get_ssid())
|
||||||
print "BSSID: %s" % (ap.get_bssid())
|
print "BSSID: %s" % (ap.get_bssid())
|
||||||
print "Frequency: %s" % (frequency)
|
print "Frequency: %s" % (frequency)
|
||||||
print "Channel: %s" % (NetworkManager.utils_wifi_freq_to_channel(frequency))
|
print "Channel: %s" % (NM.utils_wifi_freq_to_channel(frequency))
|
||||||
print "Strength: %s %s%%" % (signal_bars[(clamp(strength-5, 0, 99)+24)/25], strength)
|
print "Strength: %s %s%%" % (signal_bars[(clamp(strength-5, 0, 99)+24)/25], strength)
|
||||||
print
|
print
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
nmc = NMClient.Client.new()
|
nmc = NM.Client.new()
|
||||||
devs = nmc.get_devices()
|
devs = nmc.get_devices()
|
||||||
|
|
||||||
for dev in devs:
|
for dev in devs:
|
||||||
if dev.get_device_type() == NetworkManager.DeviceType.WIFI:
|
if dev.get_device_type() == NM.DeviceType.WIFI:
|
||||||
print_device_info(dev)
|
print_device_info(dev)
|
||||||
for ap in dev.get_access_points():
|
for ap in dev.get_access_points():
|
||||||
print_ap_info(ap)
|
print_ap_info(ap)
|
||||||
|
@@ -20,13 +20,13 @@
|
|||||||
|
|
||||||
#
|
#
|
||||||
# This example updates a connection's IPv4 method with the Update() method
|
# This example updates a connection's IPv4 method with the Update() method
|
||||||
# using the libnm-glib GObject-based convenience APIs.
|
# using the libnm GObject-based convenience APIs.
|
||||||
#
|
#
|
||||||
# Configuration settings are described at
|
# Configuration settings are described at
|
||||||
# https://developer.gnome.org/NetworkManager/0.9/ref-settings.html
|
# https://developer.gnome.org/NetworkManager/0.9/ref-settings.html
|
||||||
#
|
#
|
||||||
|
|
||||||
from gi.repository import GLib, NetworkManager, NMClient
|
from gi.repository import GLib, NM
|
||||||
import sys, struct, socket
|
import sys, struct, socket
|
||||||
|
|
||||||
def ip_to_int(ip_string):
|
def ip_to_int(ip_string):
|
||||||
@@ -51,17 +51,17 @@ def connections_read_cb(settings, data):
|
|||||||
# add IPv4 setting if it doesn't yet exist
|
# add IPv4 setting if it doesn't yet exist
|
||||||
s_ip4 = c.get_setting_ip4_config()
|
s_ip4 = c.get_setting_ip4_config()
|
||||||
if not s_ip4:
|
if not s_ip4:
|
||||||
s_ip4 = NetworkManager.SettingIP4Config.new()
|
s_ip4 = NM.SettingIP4Config.new()
|
||||||
c.add_setting(s_ip4)
|
c.add_setting(s_ip4)
|
||||||
|
|
||||||
# set the method and change properties
|
# set the method and change properties
|
||||||
s_ip4.set_property(NetworkManager.SETTING_IP4_CONFIG_METHOD, method)
|
s_ip4.set_property(NM.SETTING_IP4_CONFIG_METHOD, method)
|
||||||
if method == "auto":
|
if method == "auto":
|
||||||
# remove addresses
|
# remove addresses
|
||||||
s_ip4.clear_addresses()
|
s_ip4.clear_addresses()
|
||||||
elif method == "manual":
|
elif method == "manual":
|
||||||
# Add the static IP address, prefix, and (optional) gateway
|
# Add the static IP address, prefix, and (optional) gateway
|
||||||
addr = NetworkManager.IP4Address.new()
|
addr = NM.IP4Address.new()
|
||||||
addr.set_address(ip_to_int(sys.argv[3]))
|
addr.set_address(ip_to_int(sys.argv[3]))
|
||||||
addr.set_prefix(int(sys.argv[4]))
|
addr.set_prefix(int(sys.argv[4]))
|
||||||
if len(sys.argv) == 6:
|
if len(sys.argv) == 6:
|
||||||
@@ -89,7 +89,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
# create RemoteSettings object and attach to the "connections-read" signal
|
# create RemoteSettings object and attach to the "connections-read" signal
|
||||||
# to wait for connections to be loaded asynchronously
|
# to wait for connections to be loaded asynchronously
|
||||||
settings = NMClient.RemoteSettings.new(None)
|
settings = NM.RemoteSettings.new(None)
|
||||||
settings.connect('connections-read', connections_read_cb, (sys.argv[1], method, sys.argv))
|
settings.connect('connections-read', connections_read_cb, (sys.argv[1], method, sys.argv))
|
||||||
|
|
||||||
main_loop.run()
|
main_loop.run()
|
||||||
|
@@ -37,8 +37,8 @@ endif
|
|||||||
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(top_srcdir)/libnm-util \
|
-I$(top_srcdir)/libnm-core \
|
||||||
-I$(top_builddir)/libnm-util \
|
-I$(top_builddir)/libnm-core \
|
||||||
-I$(top_srcdir)/callouts \
|
-I$(top_srcdir)/callouts \
|
||||||
-DG_LOG_DOMAIN=\""NetworkManager"\" \
|
-DG_LOG_DOMAIN=\""NetworkManager"\" \
|
||||||
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE
|
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE
|
||||||
@@ -351,7 +351,7 @@ libNetworkManager_la_SOURCES = \
|
|||||||
$(glue_sources)
|
$(glue_sources)
|
||||||
|
|
||||||
libNetworkManager_la_LIBADD = \
|
libNetworkManager_la_LIBADD = \
|
||||||
$(top_builddir)/libnm-util/libnm-util.la \
|
$(top_builddir)/libnm-core/libnm-core.la \
|
||||||
$(DBUS_LIBS) \
|
$(DBUS_LIBS) \
|
||||||
$(GLIB_LIBS) \
|
$(GLIB_LIBS) \
|
||||||
$(GUDEV_LIBS) \
|
$(GUDEV_LIBS) \
|
||||||
|
@@ -8,8 +8,8 @@ AM_CPPFLAGS = \
|
|||||||
-I${top_srcdir}/src/devices \
|
-I${top_srcdir}/src/devices \
|
||||||
-I${top_srcdir}/src/platform \
|
-I${top_srcdir}/src/platform \
|
||||||
-I${top_srcdir}/include \
|
-I${top_srcdir}/include \
|
||||||
-I${top_builddir}/libnm-util \
|
-I${top_builddir}/libnm-core \
|
||||||
-I${top_srcdir}/libnm-util \
|
-I${top_srcdir}/libnm-core \
|
||||||
-DG_LOG_DOMAIN=\""NetworkManager-adsl"\" \
|
-DG_LOG_DOMAIN=\""NetworkManager-adsl"\" \
|
||||||
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
||||||
$(DBUS_CFLAGS) \
|
$(DBUS_CFLAGS) \
|
||||||
|
@@ -10,8 +10,8 @@ AM_CPPFLAGS = \
|
|||||||
-I${top_srcdir}/src/platform \
|
-I${top_srcdir}/src/platform \
|
||||||
-I${top_srcdir}/src/devices/wwan \
|
-I${top_srcdir}/src/devices/wwan \
|
||||||
-I${top_srcdir}/include \
|
-I${top_srcdir}/include \
|
||||||
-I${top_builddir}/libnm-util \
|
-I${top_builddir}/libnm-core \
|
||||||
-I${top_srcdir}/libnm-util \
|
-I${top_srcdir}/libnm-core \
|
||||||
-DG_LOG_DOMAIN=\""NetworkManager-bluetooth"\" \
|
-DG_LOG_DOMAIN=\""NetworkManager-bluetooth"\" \
|
||||||
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
||||||
$(DBUS_CFLAGS)
|
$(DBUS_CFLAGS)
|
||||||
|
@@ -8,8 +8,8 @@ AM_CPPFLAGS = \
|
|||||||
-I${top_srcdir}/src/devices \
|
-I${top_srcdir}/src/devices \
|
||||||
-I${top_srcdir}/src/platform \
|
-I${top_srcdir}/src/platform \
|
||||||
-I${top_srcdir}/include \
|
-I${top_srcdir}/include \
|
||||||
-I${top_builddir}/libnm-util \
|
-I${top_builddir}/libnm-core \
|
||||||
-I${top_srcdir}/libnm-util \
|
-I${top_srcdir}/libnm-core \
|
||||||
-DG_LOG_DOMAIN=\""NetworkManager-team"\" \
|
-DG_LOG_DOMAIN=\""NetworkManager-team"\" \
|
||||||
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
||||||
$(DBUS_CFLAGS)
|
$(DBUS_CFLAGS)
|
||||||
|
@@ -12,8 +12,8 @@ AM_CPPFLAGS = \
|
|||||||
-I${top_srcdir}/src/platform \
|
-I${top_srcdir}/src/platform \
|
||||||
-I${top_srcdir}/src/supplicant-manager \
|
-I${top_srcdir}/src/supplicant-manager \
|
||||||
-I${top_srcdir}/include \
|
-I${top_srcdir}/include \
|
||||||
-I${top_builddir}/libnm-util \
|
-I${top_builddir}/libnm-core \
|
||||||
-I${top_srcdir}/libnm-util \
|
-I${top_srcdir}/libnm-core \
|
||||||
-DG_LOG_DOMAIN=\""NetworkManager-wifi"\" \
|
-DG_LOG_DOMAIN=\""NetworkManager-wifi"\" \
|
||||||
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
||||||
$(DBUS_CFLAGS)
|
$(DBUS_CFLAGS)
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(top_srcdir)/libnm-util \
|
-I$(top_srcdir)/libnm-core \
|
||||||
-I$(top_builddir)/libnm-util \
|
-I$(top_builddir)/libnm-core \
|
||||||
-I${top_srcdir}/src/platform \
|
-I${top_srcdir}/src/platform \
|
||||||
-I$(top_srcdir)/src \
|
-I$(top_srcdir)/src \
|
||||||
-I$(top_srcdir)/src/devices/wifi \
|
-I$(top_srcdir)/src/devices/wifi \
|
||||||
|
@@ -4,8 +4,8 @@ AM_CPPFLAGS = \
|
|||||||
-I${top_srcdir}/src/devices \
|
-I${top_srcdir}/src/devices \
|
||||||
-I${top_srcdir}/src/platform \
|
-I${top_srcdir}/src/platform \
|
||||||
-I${top_srcdir}/include \
|
-I${top_srcdir}/include \
|
||||||
-I${top_builddir}/libnm-util \
|
-I${top_builddir}/libnm-core \
|
||||||
-I${top_srcdir}/libnm-util \
|
-I${top_srcdir}/libnm-core \
|
||||||
-DG_LOG_DOMAIN=\""NetworkManager-wimax"\" \
|
-DG_LOG_DOMAIN=\""NetworkManager-wimax"\" \
|
||||||
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
||||||
$(DBUS_CFLAGS) \
|
$(DBUS_CFLAGS) \
|
||||||
|
@@ -9,8 +9,8 @@ AM_CPPFLAGS = \
|
|||||||
-I${top_srcdir}/src/settings \
|
-I${top_srcdir}/src/settings \
|
||||||
-I${top_srcdir}/src/platform \
|
-I${top_srcdir}/src/platform \
|
||||||
-I${top_srcdir}/include \
|
-I${top_srcdir}/include \
|
||||||
-I${top_builddir}/libnm-util \
|
-I${top_builddir}/libnm-core \
|
||||||
-I${top_srcdir}/libnm-util \
|
-I${top_srcdir}/libnm-core \
|
||||||
-DG_LOG_DOMAIN=\""NetworkManager-wwan"\" \
|
-DG_LOG_DOMAIN=\""NetworkManager-wwan"\" \
|
||||||
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
||||||
$(DBUS_CFLAGS) \
|
$(DBUS_CFLAGS) \
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I${top_srcdir}/libnm-util \
|
-I${top_srcdir}/libnm-core \
|
||||||
-I${top_builddir}/libnm-util \
|
-I${top_builddir}/libnm-core \
|
||||||
-I$(top_srcdir)/src/dhcp-manager \
|
-I$(top_srcdir)/src/dhcp-manager \
|
||||||
-I$(top_srcdir)/src \
|
-I$(top_srcdir)/src \
|
||||||
-I$(top_srcdir)/src/platform \
|
-I$(top_srcdir)/src/platform \
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I${top_srcdir}/libnm-util \
|
-I${top_srcdir}/libnm-core \
|
||||||
-I${top_builddir}/libnm-util \
|
-I${top_builddir}/libnm-core \
|
||||||
-I$(top_srcdir)/src/dnsmasq-manager \
|
-I$(top_srcdir)/src/dnsmasq-manager \
|
||||||
-I$(top_srcdir)/src \
|
-I$(top_srcdir)/src \
|
||||||
-I$(top_srcdir)/src/platform \
|
-I$(top_srcdir)/src/platform \
|
||||||
|
@@ -1051,7 +1051,7 @@ nm_platform_team_add (const char *name)
|
|||||||
* nm_platform_vlan_add:
|
* nm_platform_vlan_add:
|
||||||
* @name: New interface name
|
* @name: New interface name
|
||||||
* @vlanid: VLAN identifier
|
* @vlanid: VLAN identifier
|
||||||
* @vlanflags: VLAN flags from libnm-util
|
* @vlanflags: VLAN flags from libnm
|
||||||
*
|
*
|
||||||
* Create a software VLAN device.
|
* Create a software VLAN device.
|
||||||
*/
|
*/
|
||||||
|
@@ -3,8 +3,8 @@ AM_CPPFLAGS = \
|
|||||||
-I${top_srcdir}/include \
|
-I${top_srcdir}/include \
|
||||||
-I${top_srcdir}/src \
|
-I${top_srcdir}/src \
|
||||||
-I${top_builddir}/src \
|
-I${top_builddir}/src \
|
||||||
-I${top_srcdir}/libnm-util \
|
-I${top_srcdir}/libnm-core \
|
||||||
-I${top_builddir}/libnm-util \
|
-I${top_builddir}/libnm-core \
|
||||||
-I${srcdir}/.. \
|
-I${srcdir}/.. \
|
||||||
-DG_LOG_DOMAIN=\""NetworkManager"\" \
|
-DG_LOG_DOMAIN=\""NetworkManager"\" \
|
||||||
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
||||||
|
@@ -2,8 +2,8 @@ if WITH_PPP
|
|||||||
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-I${top_srcdir}/include \
|
-I${top_srcdir}/include \
|
||||||
-I${top_srcdir}/libnm-util \
|
-I${top_srcdir}/libnm-core \
|
||||||
-I${top_builddir}/libnm-util \
|
-I${top_builddir}/libnm-core \
|
||||||
-DG_LOG_DOMAIN=\""nm-pppd-plugin"\" \
|
-DG_LOG_DOMAIN=\""nm-pppd-plugin"\" \
|
||||||
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
||||||
$(DBUS_CFLAGS) \
|
$(DBUS_CFLAGS) \
|
||||||
|
@@ -444,7 +444,7 @@ ppp_secrets_cb (NMActRequest *req,
|
|||||||
/* This is sort of a hack but...
|
/* This is sort of a hack but...
|
||||||
* pppd plugin only ever needs username and password. Passing the full
|
* pppd plugin only ever needs username and password. Passing the full
|
||||||
* connection there would mean some bloat: the plugin would need to link
|
* connection there would mean some bloat: the plugin would need to link
|
||||||
* against libnm-util just to parse this. So instead, let's just send what
|
* against libnm just to parse this. So instead, let's just send what
|
||||||
* it needs.
|
* it needs.
|
||||||
*/
|
*/
|
||||||
dbus_g_method_return (priv->pending_secrets_context, username, password);
|
dbus_g_method_return (priv->pending_secrets_context, username, password);
|
||||||
|
@@ -3,8 +3,8 @@ AM_CPPFLAGS = \
|
|||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I${top_srcdir}/src \
|
-I${top_srcdir}/src \
|
||||||
-I${top_srcdir}/src/platform \
|
-I${top_srcdir}/src/platform \
|
||||||
-I${top_srcdir}/libnm-util \
|
-I${top_srcdir}/libnm-core \
|
||||||
-I${top_builddir}/libnm-util \
|
-I${top_builddir}/libnm-core \
|
||||||
-I${srcdir}/.. \
|
-I${srcdir}/.. \
|
||||||
-DG_LOG_DOMAIN=\""NetworkManager"\" \
|
-DG_LOG_DOMAIN=\""NetworkManager"\" \
|
||||||
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
#include "nm-settings-flags.h"
|
#include "nm-settings-flags.h"
|
||||||
|
|
||||||
/* NOTE: ensure these capabilities match those in introspection/nm-secret-agent.xml and
|
/* NOTE: ensure these capabilities match those in introspection/nm-secret-agent.xml and
|
||||||
* libnm-glib/nm-secret-agent.h.
|
* libnm/nm-secret-agent.h.
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
NM_SECRET_AGENT_CAPABILITY_NONE = 0x0,
|
NM_SECRET_AGENT_CAPABILITY_NONE = 0x0,
|
||||||
|
@@ -2,8 +2,8 @@ AM_CPPFLAGS = \
|
|||||||
-I$(top_srcdir)/src \
|
-I$(top_srcdir)/src \
|
||||||
-I$(top_srcdir)/src/settings \
|
-I$(top_srcdir)/src/settings \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(top_srcdir)/libnm-util \
|
-I$(top_srcdir)/libnm-core \
|
||||||
-I$(top_builddir)/libnm-util \
|
-I$(top_builddir)/libnm-core \
|
||||||
-DG_LOG_DOMAIN=\""NetworkManager-example"\" \
|
-DG_LOG_DOMAIN=\""NetworkManager-example"\" \
|
||||||
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
||||||
$(GLIB_CFLAGS) \
|
$(GLIB_CFLAGS) \
|
||||||
@@ -28,10 +28,5 @@ libnm_settings_plugin_example_la_SOURCES = \
|
|||||||
reader.c \
|
reader.c \
|
||||||
writer.c
|
writer.c
|
||||||
|
|
||||||
libnm_settings_plugin_example_la_LIBADD = \
|
|
||||||
$(top_builddir)/src/libNetworkManager.la \
|
|
||||||
$(top_builddir)/libnm-util/libnm-util.la \
|
|
||||||
$(GLIB_LIBS)
|
|
||||||
|
|
||||||
libnm_settings_plugin_example_la_LDFLAGS = -module -avoid-version
|
libnm_settings_plugin_example_la_LDFLAGS = -module -avoid-version
|
||||||
|
|
||||||
|
@@ -29,8 +29,8 @@ AM_CPPFLAGS = \
|
|||||||
-I$(top_srcdir)/src/platform \
|
-I$(top_srcdir)/src/platform \
|
||||||
-I$(top_srcdir)/src/settings \
|
-I$(top_srcdir)/src/settings \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(top_srcdir)/libnm-util \
|
-I$(top_srcdir)/libnm-core \
|
||||||
-I$(top_builddir)/libnm-util \
|
-I$(top_builddir)/libnm-core \
|
||||||
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
||||||
$(GLIB_CFLAGS) \
|
$(GLIB_CFLAGS) \
|
||||||
$(DBUS_CFLAGS) \
|
$(DBUS_CFLAGS) \
|
||||||
@@ -46,10 +46,7 @@ libnm_settings_plugin_ifcfg_rh_la_SOURCES = \
|
|||||||
nm-ifcfg-connection.h
|
nm-ifcfg-connection.h
|
||||||
|
|
||||||
libnm_settings_plugin_ifcfg_rh_la_LDFLAGS = -module -avoid-version
|
libnm_settings_plugin_ifcfg_rh_la_LDFLAGS = -module -avoid-version
|
||||||
libnm_settings_plugin_ifcfg_rh_la_LIBADD = \
|
libnm_settings_plugin_ifcfg_rh_la_LIBADD = libifcfg-rh-io.la
|
||||||
$(top_builddir)/libnm-util/libnm-util.la \
|
|
||||||
libifcfg-rh-io.la \
|
|
||||||
$(GLIB_LIBS)
|
|
||||||
|
|
||||||
dbusservicedir = $(DBUS_SYS_DIR)
|
dbusservicedir = $(DBUS_SYS_DIR)
|
||||||
dbusservice_DATA = nm-ifcfg-rh.conf
|
dbusservice_DATA = nm-ifcfg-rh.conf
|
||||||
|
@@ -8,8 +8,8 @@ AM_CPPFLAGS = \
|
|||||||
$(GLIB_CFLAGS) \
|
$(GLIB_CFLAGS) \
|
||||||
$(CODE_COVERAGE_CFLAGS) \
|
$(CODE_COVERAGE_CFLAGS) \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(top_srcdir)/libnm-util \
|
-I$(top_srcdir)/libnm-core \
|
||||||
-I$(top_builddir)/libnm-util \
|
-I$(top_builddir)/libnm-core \
|
||||||
-I$(top_srcdir)/src/ \
|
-I$(top_srcdir)/src/ \
|
||||||
-I$(top_srcdir)/src/platform \
|
-I$(top_srcdir)/src/platform \
|
||||||
-I$(top_srcdir)/src/settings \
|
-I$(top_srcdir)/src/settings \
|
||||||
@@ -26,9 +26,6 @@ AM_LDFLAGS = \
|
|||||||
$(DBUS_LIBS) \
|
$(DBUS_LIBS) \
|
||||||
$(CODE_COVERAGE_LDFLAGS)
|
$(CODE_COVERAGE_LDFLAGS)
|
||||||
|
|
||||||
AM_LDADD = \
|
|
||||||
$(top_builddir)/libnm-util/libnm-util.la
|
|
||||||
|
|
||||||
noinst_PROGRAMS = test-ifcfg-rh test-ifcfg-rh-utils
|
noinst_PROGRAMS = test-ifcfg-rh test-ifcfg-rh-utils
|
||||||
|
|
||||||
test_ifcfg_rh_SOURCES = \
|
test_ifcfg_rh_SOURCES = \
|
||||||
@@ -48,7 +45,7 @@ test_ifcfg_rh_utils_SOURCES = \
|
|||||||
../shvar.c
|
../shvar.c
|
||||||
|
|
||||||
test_ifcfg_rh_utils_LDADD = \
|
test_ifcfg_rh_utils_LDADD = \
|
||||||
$(AM_LDADD)
|
$(top_builddir)/src/libNetworkManager.la
|
||||||
|
|
||||||
TESTS = test-ifcfg-rh-utils test-ifcfg-rh
|
TESTS = test-ifcfg-rh-utils test-ifcfg-rh
|
||||||
|
|
||||||
|
@@ -3,8 +3,8 @@ AM_CPPFLAGS = \
|
|||||||
-I${top_srcdir}/src \
|
-I${top_srcdir}/src \
|
||||||
-I${top_srcdir}/src/settings \
|
-I${top_srcdir}/src/settings \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(top_srcdir)/libnm-util \
|
-I$(top_srcdir)/libnm-core \
|
||||||
-I$(top_builddir)/libnm-util \
|
-I$(top_builddir)/libnm-core \
|
||||||
-DG_LOG_DOMAIN=\""NetworkManager-ifcfg-suse"\" \
|
-DG_LOG_DOMAIN=\""NetworkManager-ifcfg-suse"\" \
|
||||||
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
||||||
-DSYSCONFDIR=\"$(sysconfdir)\"
|
-DSYSCONFDIR=\"$(sysconfdir)\"
|
||||||
@@ -16,7 +16,3 @@ libnm_settings_plugin_ifcfg_suse_la_SOURCES = \
|
|||||||
plugin.h
|
plugin.h
|
||||||
|
|
||||||
libnm_settings_plugin_ifcfg_suse_la_LDFLAGS = -module -avoid-version
|
libnm_settings_plugin_ifcfg_suse_la_LDFLAGS = -module -avoid-version
|
||||||
libnm_settings_plugin_ifcfg_suse_la_LIBADD = \
|
|
||||||
$(top_builddir)/libnm-util/libnm-util.la \
|
|
||||||
$(GLIB_LIBS)
|
|
||||||
|
|
||||||
|
@@ -7,8 +7,8 @@ AM_CPPFLAGS = \
|
|||||||
-I$(top_srcdir)/src/platform \
|
-I$(top_srcdir)/src/platform \
|
||||||
-I$(top_srcdir)/src/settings \
|
-I$(top_srcdir)/src/settings \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(top_srcdir)/libnm-util \
|
-I$(top_srcdir)/libnm-core \
|
||||||
-I$(top_builddir)/libnm-util \
|
-I$(top_builddir)/libnm-core \
|
||||||
-DG_LOG_DOMAIN=\""NetworkManager-ifnet"\" \
|
-DG_LOG_DOMAIN=\""NetworkManager-ifnet"\" \
|
||||||
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
||||||
$(GLIB_CFLAGS) \
|
$(GLIB_CFLAGS) \
|
||||||
@@ -27,11 +27,7 @@ libnm_settings_plugin_ifnet_la_SOURCES = \
|
|||||||
|
|
||||||
libnm_settings_plugin_ifnet_la_LDFLAGS = -module -avoid-version
|
libnm_settings_plugin_ifnet_la_LDFLAGS = -module -avoid-version
|
||||||
|
|
||||||
libnm_settings_plugin_ifnet_la_LIBADD = \
|
libnm_settings_plugin_ifnet_la_LIBADD = lib-ifnet-io.la
|
||||||
$(top_builddir)/libnm-util/libnm-util.la \
|
|
||||||
lib-ifnet-io.la\
|
|
||||||
$(GLIB_LIBS) \
|
|
||||||
$(GUDEV_LIBS)
|
|
||||||
|
|
||||||
lib_ifnet_io_la_SOURCES = \
|
lib_ifnet_io_la_SOURCES = \
|
||||||
net_parser.c\
|
net_parser.c\
|
||||||
@@ -44,7 +40,3 @@ lib_ifnet_io_la_SOURCES = \
|
|||||||
wpa_parser.c \
|
wpa_parser.c \
|
||||||
errors.h \
|
errors.h \
|
||||||
errors.c
|
errors.c
|
||||||
|
|
||||||
lib_ifnet_io_la_LIBADD = \
|
|
||||||
$(top_builddir)/libnm-util/libnm-util.la \
|
|
||||||
$(GLIB_LIBS)
|
|
||||||
|
@@ -4,9 +4,9 @@ if ENABLE_TESTS
|
|||||||
|
|
||||||
AM_CPPFLAGS= \
|
AM_CPPFLAGS= \
|
||||||
-I$(srcdir)/../ \
|
-I$(srcdir)/../ \
|
||||||
-I$(top_srcdir)/libnm-util \
|
|
||||||
-I$(top_builddir)/libnm-util \
|
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
|
-I$(top_srcdir)/libnm-core \
|
||||||
|
-I$(top_builddir)/libnm-core \
|
||||||
-I$(top_srcdir)/src \
|
-I$(top_srcdir)/src \
|
||||||
-I$(top_srcdir)/src/settings \
|
-I$(top_srcdir)/src/settings \
|
||||||
-I$(top_srcdir)/src/platform \
|
-I$(top_srcdir)/src/platform \
|
||||||
|
@@ -6,8 +6,8 @@ AM_CPPFLAGS = \
|
|||||||
-I$(top_srcdir)/src \
|
-I$(top_srcdir)/src \
|
||||||
-I$(top_srcdir)/src/settings \
|
-I$(top_srcdir)/src/settings \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(top_srcdir)/libnm-util \
|
-I$(top_srcdir)/libnm-core \
|
||||||
-I$(top_builddir)/libnm-util \
|
-I$(top_builddir)/libnm-core \
|
||||||
-DG_LOG_DOMAIN=\""NetworkManager-ifupdown"\" \
|
-DG_LOG_DOMAIN=\""NetworkManager-ifupdown"\" \
|
||||||
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
||||||
$(GLIB_CFLAGS) \
|
$(GLIB_CFLAGS) \
|
||||||
@@ -22,10 +22,6 @@ libifupdown_io_la_SOURCES = \
|
|||||||
parser.c \
|
parser.c \
|
||||||
parser.h
|
parser.h
|
||||||
|
|
||||||
libifupdown_io_la_LIBADD = \
|
|
||||||
$(top_builddir)/libnm-util/libnm-util.la \
|
|
||||||
$(GLIB_LIBS)
|
|
||||||
|
|
||||||
pkglib_LTLIBRARIES = libnm-settings-plugin-ifupdown.la
|
pkglib_LTLIBRARIES = libnm-settings-plugin-ifupdown.la
|
||||||
|
|
||||||
libnm_settings_plugin_ifupdown_la_SOURCES = \
|
libnm_settings_plugin_ifupdown_la_SOURCES = \
|
||||||
@@ -35,9 +31,5 @@ libnm_settings_plugin_ifupdown_la_SOURCES = \
|
|||||||
plugin.h
|
plugin.h
|
||||||
|
|
||||||
libnm_settings_plugin_ifupdown_la_LDFLAGS = -module -avoid-version
|
libnm_settings_plugin_ifupdown_la_LDFLAGS = -module -avoid-version
|
||||||
libnm_settings_plugin_ifupdown_la_LIBADD = \
|
libnm_settings_plugin_ifupdown_la_LIBADD = libifupdown-io.la
|
||||||
$(top_builddir)/libnm-util/libnm-util.la \
|
|
||||||
libifupdown-io.la \
|
|
||||||
$(GLIB_LIBS) \
|
|
||||||
$(GUDEV_LIBS)
|
|
||||||
|
|
||||||
|
@@ -2,8 +2,8 @@ if ENABLE_TESTS
|
|||||||
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(top_srcdir)/libnm-util \
|
-I$(top_srcdir)/libnm-core \
|
||||||
-I$(top_builddir)/libnm-util \
|
-I$(top_builddir)/libnm-core \
|
||||||
-I$(top_srcdir)/src \
|
-I$(top_srcdir)/src \
|
||||||
-I$(top_srcdir)/src/settings \
|
-I$(top_srcdir)/src/settings \
|
||||||
-I$(srcdir)/../ \
|
-I$(srcdir)/../ \
|
||||||
@@ -20,9 +20,7 @@ test_ifupdown_SOURCES = \
|
|||||||
../parser.c
|
../parser.c
|
||||||
|
|
||||||
test_ifupdown_LDADD = \
|
test_ifupdown_LDADD = \
|
||||||
$(top_builddir)/src/libNetworkManager.la \
|
$(top_builddir)/src/libNetworkManager.la
|
||||||
$(top_builddir)/libnm-util/libnm-util.la \
|
|
||||||
$(DBUS_LIBS)
|
|
||||||
|
|
||||||
TESTS = test-ifupdown
|
TESTS = test-ifupdown
|
||||||
|
|
||||||
|
@@ -937,7 +937,7 @@ main (int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!nm_utils_init (&error))
|
if (!nm_utils_init (&error))
|
||||||
FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message);
|
FAIL ("nm-utils-init", "failed to initialize libnm: %s", error->message);
|
||||||
nm_logging_setup ("WARN", "DEFAULT", NULL, NULL);
|
nm_logging_setup ("WARN", "DEFAULT", NULL, NULL);
|
||||||
|
|
||||||
g_test_init (&argc, &argv, NULL);
|
g_test_init (&argc, &argv, NULL);
|
||||||
|
@@ -6,8 +6,8 @@ AM_CPPFLAGS = \
|
|||||||
-I$(top_srcdir)/src \
|
-I$(top_srcdir)/src \
|
||||||
-I$(top_srcdir)/src/settings \
|
-I$(top_srcdir)/src/settings \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(top_srcdir)/libnm-util \
|
-I$(top_srcdir)/libnm-core \
|
||||||
-I$(top_builddir)/libnm-util \
|
-I$(top_builddir)/libnm-core \
|
||||||
-DG_LOG_DOMAIN=\""NetworkManager-keyfile"\" \
|
-DG_LOG_DOMAIN=\""NetworkManager-keyfile"\" \
|
||||||
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
||||||
$(GLIB_CFLAGS) \
|
$(GLIB_CFLAGS) \
|
||||||
@@ -41,12 +41,7 @@ libnm_settings_plugin_keyfile_la_SOURCES = \
|
|||||||
plugin.h
|
plugin.h
|
||||||
|
|
||||||
libnm_settings_plugin_keyfile_la_LIBADD = \
|
libnm_settings_plugin_keyfile_la_LIBADD = \
|
||||||
$(top_builddir)/libnm-util/libnm-util.la \
|
libkeyfile-io.la
|
||||||
libkeyfile-io.la \
|
|
||||||
$(GLIB_LIBS) \
|
|
||||||
$(DBUS_LIBS)
|
|
||||||
|
|
||||||
libnm_settings_plugin_keyfile_la_LDFLAGS = -rdynamic
|
|
||||||
|
|
||||||
keyfiledir=$(sysconfdir)/NetworkManager/system-connections
|
keyfiledir=$(sysconfdir)/NetworkManager/system-connections
|
||||||
|
|
||||||
|
@@ -6,8 +6,8 @@ SUBDIRS=keyfiles
|
|||||||
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(top_srcdir)/libnm-util \
|
-I$(top_srcdir)/libnm-core \
|
||||||
-I$(top_builddir)/libnm-util \
|
-I$(top_builddir)/libnm-core \
|
||||||
-I$(top_srcdir)/src \
|
-I$(top_srcdir)/src \
|
||||||
-I$(top_srcdir)/src/settings \
|
-I$(top_srcdir)/src/settings \
|
||||||
-I$(srcdir)/../ \
|
-I$(srcdir)/../ \
|
||||||
@@ -31,7 +31,6 @@ test_keyfile_SOURCES = \
|
|||||||
|
|
||||||
test_keyfile_LDADD = \
|
test_keyfile_LDADD = \
|
||||||
$(top_builddir)/src/libNetworkManager.la \
|
$(top_builddir)/src/libNetworkManager.la \
|
||||||
$(top_builddir)/libnm-util/libnm-util.la \
|
|
||||||
$(DBUS_LIBS) \
|
$(DBUS_LIBS) \
|
||||||
$(CODE_COVERAGE_LDFLAGS)
|
$(CODE_COVERAGE_LDFLAGS)
|
||||||
|
|
||||||
|
@@ -2292,7 +2292,7 @@ test_read_wired_8021x_tls_blob_connection (void)
|
|||||||
g_assert_cmpint (nm_setting_802_1x_get_ca_cert_scheme (s_8021x), ==, NM_SETTING_802_1X_CK_SCHEME_BLOB);
|
g_assert_cmpint (nm_setting_802_1x_get_ca_cert_scheme (s_8021x), ==, NM_SETTING_802_1X_CK_SCHEME_BLOB);
|
||||||
|
|
||||||
/* Make sure it's not a path, since it's a blob */
|
/* Make sure it's not a path, since it's a blob */
|
||||||
g_test_expect_message ("libnm-util", G_LOG_LEVEL_CRITICAL,
|
g_test_expect_message ("libnm", G_LOG_LEVEL_CRITICAL,
|
||||||
"*assertion*scheme == NM_SETTING_802_1X_CK_SCHEME_PATH*");
|
"*assertion*scheme == NM_SETTING_802_1X_CK_SCHEME_PATH*");
|
||||||
tmp = nm_setting_802_1x_get_ca_cert_path (s_8021x);
|
tmp = nm_setting_802_1x_get_ca_cert_path (s_8021x);
|
||||||
g_test_assert_expected_messages ();
|
g_test_assert_expected_messages ();
|
||||||
|
@@ -1,9 +1,10 @@
|
|||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(top_srcdir)/libnm-util \
|
-I$(top_srcdir)/libnm-core \
|
||||||
-I$(top_builddir)/libnm-util \
|
-I$(top_builddir)/libnm-core \
|
||||||
-I$(top_srcdir)/src/settings \
|
-I$(top_srcdir)/src/settings \
|
||||||
-DG_LOG_DOMAIN=\""NetworkManager"\" \
|
-DG_LOG_DOMAIN=\""NetworkManager"\" \
|
||||||
|
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
||||||
$(GLIB_CFLAGS)
|
$(GLIB_CFLAGS)
|
||||||
|
|
||||||
noinst_PROGRAMS = \
|
noinst_PROGRAMS = \
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(top_srcdir)/libnm-util \
|
-I$(top_srcdir)/libnm-core \
|
||||||
-I$(top_builddir)/libnm-util \
|
-I$(top_builddir)/libnm-core \
|
||||||
-I$(top_srcdir)/src \
|
-I$(top_srcdir)/src \
|
||||||
-I$(top_srcdir)/src/supplicant-manager \
|
-I$(top_srcdir)/src/supplicant-manager \
|
||||||
-DG_LOG_DOMAIN=\""NetworkManager"\" \
|
-DG_LOG_DOMAIN=\""NetworkManager"\" \
|
||||||
|
@@ -2,8 +2,8 @@ SUBDIRS = config
|
|||||||
|
|
||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(top_srcdir)/libnm-util \
|
-I$(top_srcdir)/libnm-core \
|
||||||
-I$(top_builddir)/libnm-util \
|
-I$(top_builddir)/libnm-core \
|
||||||
-I$(top_srcdir)/src/platform \
|
-I$(top_srcdir)/src/platform \
|
||||||
-I$(top_srcdir)/src/dhcp-manager \
|
-I$(top_srcdir)/src/dhcp-manager \
|
||||||
-I$(top_srcdir)/src \
|
-I$(top_srcdir)/src \
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
AM_CPPFLAGS = \
|
AM_CPPFLAGS = \
|
||||||
-I$(top_srcdir)/include \
|
-I$(top_srcdir)/include \
|
||||||
-I$(top_srcdir)/libnm-util \
|
-I$(top_srcdir)/libnm-core \
|
||||||
-I$(top_builddir)/libnm-util \
|
-I$(top_builddir)/libnm-core \
|
||||||
-I$(top_srcdir)/src/ \
|
-I$(top_srcdir)/src/ \
|
||||||
-I$(top_srcdir)/src/devices \
|
-I$(top_srcdir)/src/devices \
|
||||||
-I${top_srcdir}/src/platform \
|
-I${top_srcdir}/src/platform \
|
||||||
|
Reference in New Issue
Block a user