mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 04:50:11 +01:00
Currently "src/" mostly contains the source code of the daemon. I say mostly, because that is not true, there are also the device, settings, wwan, ppp plugins, the initrd generator, the pppd and dhcp helper, and probably more. Also we have source code under libnm-core/, libnm/, clients/, and shared/ directories. That is all confusing. We should have one "src" directory, that contains subdirectories. Those subdirectories should contain individual parts (libraries or applications), that possibly have dependencies on other subdirectories. There should be a flat hierarchy of directories under src/, which contains individual modules. As the name "src/" is already taken, that prevents any sensible restructuring of the code. As a first step, move "src/" to "src/core/". This gives space to reorganize the code better by moving individual components into "src/". For inspiration, look at systemd's "src/" directory. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/743
54 lines
2.1 KiB
C
54 lines
2.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/*
|
|
* Copyright (C) 2004 - 2010 Red Hat, Inc.
|
|
* Copyright (C) 2007 - 2008 Novell, Inc.
|
|
*/
|
|
|
|
#ifndef __NETWORKMANAGER_POLICY_H__
|
|
#define __NETWORKMANAGER_POLICY_H__
|
|
|
|
#define NM_TYPE_POLICY (nm_policy_get_type())
|
|
#define NM_POLICY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_POLICY, NMPolicy))
|
|
#define NM_POLICY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_POLICY, NMPolicyClass))
|
|
#define NM_IS_POLICY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_POLICY))
|
|
#define NM_IS_POLICY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_POLICY))
|
|
#define NM_POLICY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_POLICY, NMPolicyClass))
|
|
|
|
#define NM_POLICY_MANAGER "manager"
|
|
#define NM_POLICY_SETTINGS "settings"
|
|
#define NM_POLICY_DEFAULT_IP4_AC "default-ip4-ac"
|
|
#define NM_POLICY_DEFAULT_IP6_AC "default-ip6-ac"
|
|
#define NM_POLICY_ACTIVATING_IP4_AC "activating-ip4-ac"
|
|
#define NM_POLICY_ACTIVATING_IP6_AC "activating-ip6-ac"
|
|
|
|
typedef struct _NMPolicyClass NMPolicyClass;
|
|
|
|
GType nm_policy_get_type(void);
|
|
|
|
NMPolicy *nm_policy_new(NMManager *manager, NMSettings *settings);
|
|
|
|
NMActiveConnection *nm_policy_get_default_ip4_ac(NMPolicy *policy);
|
|
NMActiveConnection *nm_policy_get_default_ip6_ac(NMPolicy *policy);
|
|
NMActiveConnection *nm_policy_get_activating_ip4_ac(NMPolicy *policy);
|
|
NMActiveConnection *nm_policy_get_activating_ip6_ac(NMPolicy *policy);
|
|
|
|
void nm_policy_unblock_failed_ovs_interfaces(NMPolicy *self);
|
|
|
|
/**
|
|
* NMPolicyHostnameMode
|
|
* @NM_POLICY_HOSTNAME_MODE_NONE: never update the transient hostname.
|
|
* @NM_POLICY_HOSTNAME_MODE_DHCP: only hostname from DHCP hostname
|
|
* options are eligible to be set as transient hostname.
|
|
* @NM_POLICY_HOSTNAME_MODE_FULL: NM will try to update the hostname looking
|
|
* to current static hostname, DHCP options, reverse IP lookup and externally
|
|
* set hostnames.
|
|
*
|
|
* NMPolicy's hostname update policy
|
|
*/
|
|
typedef enum {
|
|
NM_POLICY_HOSTNAME_MODE_NONE,
|
|
NM_POLICY_HOSTNAME_MODE_DHCP,
|
|
NM_POLICY_HOSTNAME_MODE_FULL,
|
|
} NMPolicyHostnameMode;
|
|
|
|
#endif /* __NETWORKMANAGER_POLICY_H__ */
|