2008-11-03 04:13:42 +00:00
|
|
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
2004-06-24 14:18:37 +00:00
|
|
|
/* NetworkManager -- Network link manager
|
|
|
|
|
*
|
|
|
|
|
* 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.
|
|
|
|
|
*
|
2008-06-26 18:31:52 +00:00
|
|
|
* 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.
|
2004-06-24 14:18:37 +00:00
|
|
|
*
|
2011-07-12 09:08:04 +02:00
|
|
|
* Copyright (C) 2004 - 2011 Red Hat, Inc.
|
2008-11-03 04:13:42 +00:00
|
|
|
* Copyright (C) 2005 - 2008 Novell, Inc.
|
2004-06-24 14:18:37 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef NETWORK_MANAGER_UTILS_H
|
|
|
|
|
#define NETWORK_MANAGER_UTILS_H
|
|
|
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
|
#include <stdio.h>
|
2004-07-06 01:34:10 +00:00
|
|
|
#include <net/ethernet.h>
|
2004-06-24 14:18:37 +00:00
|
|
|
|
2008-04-21 03:02:32 +00:00
|
|
|
#include "nm-ip4-config.h"
|
|
|
|
|
#include "nm-setting-ip4-config.h"
|
2009-07-29 12:12:41 -04:00
|
|
|
#include "nm-ip6-config.h"
|
|
|
|
|
#include "nm-setting-ip6-config.h"
|
2008-04-27 14:30:06 +00:00
|
|
|
#include "nm-connection.h"
|
2004-06-24 14:18:37 +00:00
|
|
|
|
2008-04-27 12:23:17 +00:00
|
|
|
gboolean nm_ethernet_address_is_valid (const struct ether_addr *test_addr);
|
2004-06-24 14:18:37 +00:00
|
|
|
|
2008-04-27 12:23:17 +00:00
|
|
|
int nm_spawn_process (const char *args);
|
2004-06-24 14:18:37 +00:00
|
|
|
|
2013-03-20 09:48:24 -04:00
|
|
|
gboolean nm_match_spec_string (const GSList *specs, const char *string);
|
2009-06-11 00:39:12 -04:00
|
|
|
gboolean nm_match_spec_hwaddr (const GSList *specs, const char *hwaddr);
|
2010-06-17 21:24:14 -07:00
|
|
|
gboolean nm_match_spec_s390_subchannels (const GSList *specs, const char *subchannels);
|
2013-02-12 18:00:48 -05:00
|
|
|
gboolean nm_match_spec_interface_name (const GSList *specs, const char *interface_name);
|
2009-06-11 00:39:12 -04:00
|
|
|
|
2011-07-01 14:56:07 -05:00
|
|
|
const char *nm_utils_get_shared_wifi_permission (NMConnection *connection);
|
2007-08-15 01:59:19 +00:00
|
|
|
|
2009-01-22 12:35:04 +02:00
|
|
|
GHashTable *value_hash_create (void);
|
|
|
|
|
void value_hash_add (GHashTable *hash,
|
|
|
|
|
const char *key,
|
|
|
|
|
GValue *value);
|
|
|
|
|
|
|
|
|
|
void value_hash_add_str (GHashTable *hash,
|
|
|
|
|
const char *key,
|
|
|
|
|
const char *str);
|
|
|
|
|
|
|
|
|
|
void value_hash_add_object_path (GHashTable *hash,
|
|
|
|
|
const char *key,
|
|
|
|
|
const char *op);
|
|
|
|
|
|
|
|
|
|
void value_hash_add_uint (GHashTable *hash,
|
|
|
|
|
const char *key,
|
|
|
|
|
guint32 val);
|
|
|
|
|
|
2010-03-16 23:51:55 -07:00
|
|
|
void value_hash_add_bool (GHashTable *hash,
|
|
|
|
|
const char *key,
|
|
|
|
|
gboolean val);
|
|
|
|
|
|
2011-05-02 22:38:51 -05:00
|
|
|
void value_hash_add_object_property (GHashTable *hash,
|
|
|
|
|
const char *key,
|
|
|
|
|
GObject *object,
|
|
|
|
|
const char *prop,
|
|
|
|
|
GType val_type);
|
|
|
|
|
|
2009-07-29 12:12:41 -04:00
|
|
|
gboolean nm_utils_do_sysctl (const char *path, const char *value);
|
2009-01-22 12:35:04 +02:00
|
|
|
|
2010-05-03 03:42:43 -07:00
|
|
|
gboolean nm_utils_get_proc_sys_net_value (const char *path,
|
|
|
|
|
const char *iface,
|
2011-07-12 09:08:04 +02:00
|
|
|
gint32 *out_value);
|
|
|
|
|
|
|
|
|
|
gboolean nm_utils_get_proc_sys_net_value_with_bounds (const char *path,
|
|
|
|
|
const char *iface,
|
|
|
|
|
gint32 *out_value,
|
|
|
|
|
gint32 valid_min,
|
|
|
|
|
gint32 valid_max);
|
2010-05-03 03:42:43 -07:00
|
|
|
|
2011-01-13 13:28:52 -06:00
|
|
|
void nm_utils_complete_generic (NMConnection *connection,
|
|
|
|
|
const char *ctype,
|
|
|
|
|
const GSList *existing,
|
|
|
|
|
const char *format,
|
2011-02-25 11:58:16 -06:00
|
|
|
const char *preferred,
|
|
|
|
|
gboolean default_enable_ipv6);
|
2011-01-13 13:28:52 -06:00
|
|
|
|
2012-02-22 23:40:18 -06:00
|
|
|
char *nm_utils_new_vlan_name (const char *parent_iface, guint32 vlan_id);
|
2012-02-12 14:48:44 -06:00
|
|
|
|
2009-01-22 12:35:04 +02:00
|
|
|
#endif /* NETWORK_MANAGER_UTILS_H */
|