- Remove list of authors from files that had them; these serve no
purpose except to quickly get out of date (and were only used in
libnm-util and not libnm-glib anyway).
- Just say "Copyright", not "(C) Copyright" or "Copyright (C)"
- Put copyright statement after the license, not before
- Remove "NetworkManager - Network link manager" from the few files
that contained it, and "libnm_glib -- Access network status &
information from glib applications" from the many files that
contained it.
- Remove vim modeline from nm-device-olpc-mesh.[ch], add emacs modeline
to files that were missing it.
When NM was registering all of its enum types by hand, it was using
NamesLikeThis rather than the default names-like-this for the "nick"
values. When we switched to using glib-mkenums, this resulted in
dbus-glib using different strings for the D-Bus error names, causing
compatibility problems.
Fix this by using glib-mkenums annotations to manually fix all the
enum values back to what they were before. (This can't be done in a
more automated way, because the old names aren't 100% consistent. Eg,
"UNKNOWN" frequently becomes "UnknownError" rather than just
"Unknown".)
Rather than generating enum classes by hand (and complaining in each
file that "this should really be standard"), use glib-mkenums.
Unfortunately, we need a very new version of glib-mkenums in order to
deal with NM's naming conventions and to fix a few other bugs, so just
import that into the source tree temporarily.
Also, to simplify the use of glib-mkenums, import Makefile.glib from
https://bugzilla.gnome.org/654395.
To avoid having to run glib-mkenums for every subdirectory of src/,
add a new "generated" directory, and put the generated enums files
there.
Finally, use Makefile.glib for marshallers too, and generate separate
ones for libnm-glib and NetworkManager.
Add the necessary annotations (the mininum required, that is those
on return values. NULL parameters or container types may require
more), and the Autotools stuff to get a NetworkManager GIR for
libnm-util and a NMClient for libnm-glib.
When this property is TRUE, IP configuration can continue as long
as at least on IP configuration type succeeds. This allows
connections to networks where the user does not necessarily know
whether the network supports IPv4 or IPv6 and does not require
that both complete succesfully.
Since most of the time the user doesn't really care what type
of connectivity they have, as long as they have *some* connectivity,
this allows better "Just Works" behavior as long as the system
settings plugins and connection editors/applets use the right
defaults.
Suggested defaults for may-fail are:
IPv4: no (ie, require IPv4 connectivity)
IPv6: yes (ie, do not require IPv6 connectivity)
Users who require a specific type of connectivity are probably
knowlegable enough to check the box as needed for their network.
* libnm-util/libnm-util.ver
libnm-util/nm-setting-ip4-config.c
libnm-util/nm-setting-ip4-config.h
- Add 'never-default' property, which when true indicates that a
connection should never be the default connection
* src/nm-ip4-config.c
src/nm-ip4-config.h
- (nm_ip4_config_get_never_default, nm_ip4_config_set_never_default):
Add never-default helpers
* src/NetworkManagerUtils.c
- (nm_utils_merge_ip4_config): update never-default when merging the
IP4 setting to the IP4 config
* src/NetworkManagerSystem.c
- (nm_system_apply_ip4_config): if the connection is never-default,
don't add routes without a gateway
* src/NetworkManagerPolicy.c
- (get_best_device): don't let never-default connections be the best
- (update_routing_and_dns): handle never-default for VPN connections
* system-settings/plugins/ifcfg-rh/reader.c
- (make_ip4_setting): handle never-default by checking GATEWAYDEV
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/branches/NETWORKMANAGER_0_7@4378 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-glib/nm-ip4-config.c
libnm-glib/nm-ip4-config.h
- Add 'routes' property
* libnm-util/nm-setting-vpn.c
libnm-util/nm-setting-vpn.h
- Remove 'routes' property
* libnm-util/nm-setting-ip4-config.c
libnm-util/nm-setting-ip4-config.h
- 'ignore-dhcp-dns' renamed to 'ignore-auto-dns'
- Add 'ignore-auto-routes' property
- 'routes' exposed over D-Bus is now an array of array of uint (4) to
accomodate route metrics
- 'routes' exposed in C is now a list of NMSettingIP4Route structures
* libnm-util/nm-utils.c
libnm-util/nm-utils.h
- Add helpers for marshalling IP4 routes
* src/NetworkManagerUtils.c
- (nm_utils_merge_ip4_config): handle property renames and new route
structure
* src/NetworkManagerSystem.c
- (nm_system_device_set_ip4_route, nm_system_device_set_from_ip4_config,
nm_system_vpn_device_set_from_ip4_config): respect route metrics
* src/dhcp-manager/nm-dhcp-manager.c
- (nm_dhcp_manager_get_ip4_config): handle new route structure
* system-settings/plugins/ifcfg-fedora/reader.c
system-settings/plugins/ifcfg-fedora/writer.c
- Handle routes separately from addresses now that routes have a different
format
* introspection/nm-ip4-config.xml
src/nm-ip4-config.c
src/nm-ip4-config.h
- Rename internal routing functions
- 'static-routes' renamed to 'routes'
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3898 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-util/nm-setting-ip4-config.c
libnm-util/nm-setting-ip4-config.h
- Make IPv4 methods reflect their usage; 'dhcp' -> 'auto' and
'autoip' -> 'link-local'. VPN & PPP connections can also have IPv4
settings, and they don't necessarily use DHCP.
* src/NetworkManagerPolicy.c
src/nm-device.c
system-settings/plugins/ifcfg-fedora/reader.c
system-settings/plugins/ifcfg-suse/parser.c
- Fixup for method changes
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3882 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-util/nm-setting-ip4-config.c
libnm-util/nm-setting-ip4-config.h
- Add properties for DHCP Client Identifier and DHCP Hostname
* src/dhcp-manager/nm-dhcp-manager.c
src/dhcp-manager/nm-dhcp-manager.h
- (nm_dhcp_manager_begin_transaction): take the connection's ip4-config
setting as an argument to pass on to the dhclient config file
creation function
- (nm_dhcp_manager_cancel_transaction_real): remove dhclient config when
DHCP is torn down
- (dhclient_run): punt config file handling to create_dhclient_config()
- (create_dhclient_config): create an interface-specific dhclient
config file since there may need to be interface-specific options
passed to dhclient
- (merge_dhclient_config): merge normal distro dhclient config file and
add options from the connection
- (nm_dhcp_device_new): generate the interface specific dhclient
config file path once
- (nm_dhcp_device_destroy): handle partially initialized objects; free
dhclient config file path
* src/nm-device.c
- (real_act_stage3_ip_config_start): pass ip4-config, if any, to the
DHCP manager when starting DHCP
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3805 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Add a GError argument to nm_connection_verify() and nm_setting_verify(),
and add error enums to each NMSetting subclass. Each NMSetting subclass now
returns a descriptive GError when verification fails.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3751 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-util/nm-setting-ip4-config.[ch]: Add static routes property.
* src/nm-ip4-config.[ch]: Store the static routes as a list of
NMIP4Address, update the getters and setters.
* src/dhcp-manager/nm-dhcp-manager.c (nm_dhcp_manager_get_ip4_config):
Use the updated NMIP4Config routes api.
* src/NetworkManagerUtils.c (nm_utils_merge_ip4_config): Merge
static routes as well.
* src/NetworkManagerSystem.c (netmask_to_prefix): Implement.
(nm_system_device_set_from_ip4_config): Use the updated NMIP4Config
routes api.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3715 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-util/nm-setting-ip4-config.c
libnm-util/nm-setting-ip4-config.h
- Add a 'shared' method to indicate that this connection should be
brought up with a DHCP and proxy DNS server to facilitate
connection sharing.
- (verify): 'shared' method doesn't allow DNS or searches either
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3709 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Add a flag to NMSettingIP4Config to make it possible to ignore the DNS
information received from DHCP.
* libnm-util/nm-setting-ip4-config.c: Add a new membet "ignore_dhcp_dns"
to make it possible to ignore the DNS information (both servers and
searches) returned by DHCP server.
* src/NetworkManagerUtils.c (nm_utils_merge_ip4_config): Reset the
name servers and searches if "ignore_dhcp_dns" is set.
* src/nm-ip4-config.c (nm_ip4_config_reset_nameservers)
(nm_ip4_config_reset_searches): Implement.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3685 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-util/nm-setting-ip4-config.c
libnm-util/nm-setting-ip4-config.h
- Remove 'manual' and 'autoip' properties
- Add 'method' property
- (verify): fix verification with 'method'
- (finalize): free 'method'
- (set_property, get_property, nm_setting_ip4_config_class_init): fix
up for 'method'
* src/nm-device.c
- (real_act_stage3_ip_config_start): check IP4Config method
- (nm_device_new_ip4_autoip_config): add a note about not sucking in
the future
- (merge_ip4_config): IP settings are valid with DHCP too
- (real_act_stage4_get_ip4_config): handle all IP4Config methods
- (real_act_stage4_ip_config_timeout): don't do autoip on DHCP timeout
* src/nm-device-802-11-wireless.c
- (real_act_stage3_ip_config_start): remove; autoip only on demand
- (real_act_stage4_get_ip4_config): just chain up to parent; autoip
only on demand
* system-settings/plugins/ifcfg-fedora/parser.c
system-settings/plugins/ifcfg-suse/parser.c
- (make_ip4_setting): fix up for 'method'
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3443 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Rework NMSetting structures: Move each setting to it's own file.
Convert to GObject. Remove home grown setting types and use
GTypes.
Use GObject property introspection for hash conversion,
enumerating
properties, etc.
* libnm-util/nm-setting-connection.[ch]
* libnm-util/nm-setting-ip4-config.[ch]
* libnm-util/nm-setting-ppp.[ch]
* libnm-util/nm-setting-vpn.[ch]
* libnm-util/nm-setting-vpn-properties.[ch]
* libnm-util/nm-setting-wired.[ch]
* libnm-util/nm-setting-wireless.[ch]
* libnm-util/nm-setting-wireless-security.[ch]
New files, each containing a setting.
* libnm-util/nm-setting-template.[ch]: A template for creating
* new
settings. To use it, just replace 'template' with the new
setting
name, and you're half-way done.
* libnm-util/nm-setting.c: Convert to GObject and use GObject
introspection instead of internal types and tables.
* libnm-util/nm-connection.c: Adapt the new NMSetting work.
* libnm-util/nm-param-spec-specialized.[ch]: Implement. Handles
GValue types defined by dbus-glib for composed types like
collections,
structures and maps.
* src/*: The API of NMSetting and NMConnection changed a bit:
* Getting
a setting from connection takes the setting type now. Also,
since
the settings are in multiple files, include relevant settings.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3068 4912f4e0-d625-0410-9fb7-b9a5a253dbdc