summaryrefslogtreecommitdiff
path: root/src/nm-types.h
Commit message (Collapse)AuthorAgeFilesLines
* rdisc: make NMRDisc namespace awareThomas Haller2016-03-151-0/+1
|
* platform: add network namespace support to platformThomas Haller2016-03-071-1/+1
| | | | | | | | | | | | | | | | | | | Add a new NMPNetns class. This allows creation, deletion and switching of network namespaces. The API only offers push/pop operations to switch the namespace. This way the API enforces the user to always restore the previous namespace. A NMPlatform instance not only uses the netlink socket, but also sysfs, udev, ethtool, mii. Still, a NMPlatform instance lives entirely inside one namespace and is not spanning multiple namespaces. To properly support network namespaces, the platform instance must switch the namespace as necessary, transparent to the caller. Udev is only supported in the main namespace. For now, network namespaces are not actually used and are disabled via the NM_PLATFORM_NETNS_SUPPORT argument. https://bugzilla.gnome.org/show_bug.cgi?id=762408
* core: add NMArpingManagerBeniamino Galvani2016-01-201-0/+1
| | | | | | | Add a new object which implements the logic for announcing IP addresses and detecting duplicates using arping. Based-on-patch-by: Jiří Klimeš <jklimes@redhat.com>
* platform: add macvtap link creation supportBeniamino Galvani2015-12-091-0/+1
|
* core: ensure platform links are compatible with the NMDeviceDan Williams2015-12-041-0/+2
| | | | | | | | Ensure the platform link with the same interface name as the NMDevice is actually compatible with it before using the link for initialization of device properties. If not, remove the NMDevice and create a new one since there are kernel resources with a different type.
* platform: add IP6TNL links supportBeniamino Galvani2015-12-011-0/+2
|
* platform: add IPIP links supportBeniamino Galvani2015-12-011-0/+2
|
* platform: add SIT links supportBeniamino Galvani2015-12-011-0/+2
|
* platform: promise that the link lnk is an immutable NMPObject and expose itThomas Haller2015-11-021-0/+2
| | | | | Expose internal lnk object and promise in the API that the object will not be modified (which allows the user to ref it).
* platform: implement infiniband properties as lnk dataThomas Haller2015-11-011-0/+1
| | | | But keep the fallback to reading sysfs to support pre-3.7 kernels.
* platform: implement macvlan properties as lnk dataThomas Haller2015-11-011-0/+1
|
* platform: implement vxlan properties as lnk dataThomas Haller2015-11-011-0/+1
|
* platform: implement gre properties as lnk dataThomas Haller2015-11-011-0/+1
|
* platform: implement vlan properties as lnk dataThomas Haller2015-11-011-0/+3
|
* device: export list of LLDP neighbors through D-BusBeniamino Galvani2015-10-121-0/+1
| | | | | | | This adds a LldpNeighbors property to the Device D-Bus interface carrying information about devices discovered through LLDP. The property is an array of hashes and each hash describes the values of LLDP TLVs for a specific neighbor.
* core: forward declare NMExportedObject in "nm-types.h"Thomas Haller2015-09-151-0/+1
|
* core: add @merge_flags argument to nm_ip4_config_merge() and ↵Thomas Haller2015-08-061-0/+6
| | | | | | | | | | | | | nm_ip6_config_merge() The new flags are not yet used, so there is no change in functionality. The flags NM_IP_CONFIG_MERGE_NO_ROUTES and NM_IP_CONFIG_MERGE_NO_DNS go together with the 'ignore-auto-routes' and 'ignore-auto-dns' setting. Note that for IPv4, NM_IP_CONFIG_MERGE_NO_DNS also ignores NIS, WINS, and dns-options. This is different from current other places that handle 'ignore-auto-dns' and only care about nameservers, domains, and searches.
* core: add audit supportBeniamino Galvani2015-08-041-0/+1
| | | | | | Introduce some primitives to deliver messages about relevant configuration changes to the Linux audit subsystem through libaudit (if enabled at build time) and to the logging system.
* core: rename NMDBusManager to NMBusManagerDan Winship2015-07-241-1/+1
| | | | | | | | | | | | | | Our gdbus generated types use the same names as their corresponding "real" types, but with "NM" changed to "NMDBus". Unfortunately, that means that introspection/nmdbus-manager.c (the generated type for src/nm-manager.c) uses the same type name as the entirely unrelated src/nm-dbus-manager.c. Fix this by removing the "d" from src/nm-dbus-manager.c. (We could rename the generated type instead, but then it becomes inconsistent with all the other generated types, and we're already using it as "NMDBusManager" in libnm/nm-manager.c.)
* platform/trivial: rename enum value NM_IP_CONFIG_SOURCE_RTPROT_KERNELThomas Haller2015-07-011-2/+2
| | | | This source type was platform internal up to now. Next we will expose it.
* platform/trivial: fix name of enum value OBJECT_TYPE_UNKNOWNThomas Haller2015-06-241-3/+3
| | | | Fixes: 518cf76de74ca11b736c27a4265c8b592d021bc4
* platform: declare NMPObjectType in nm-types.hThomas Haller2015-06-241-0/+11
| | | | | We want to use it outside of NMPlatform, but users should not be required to include "nmp-object.h".
* platform: implement NMPObject and NMPCacheThomas Haller2015-06-171-0/+3
| | | | | | | | | | | | | NMPObject is a simple "object" implemenation around NMPlatformObject. They are ref-counted and have a class-pointer. Several basic functions like equality, hash, to-string are implemented. NMPCache is can be used to store the NMPObject. Objects are indexed via their primary id, but there is also multi-lookup via NMCacheId and NMMultiIndex. Part of the implementation is inside "nm-linux-platform.c", because it depends on utility functions from there.
* platform: add _NM_IP_CONFIG_SOURCE_RTPROT_KERNEL sourceThomas Haller2015-06-171-0/+4
| | | | | | | Later we will need this flag to distinguish routes from kernel that have source RTPROT_KERNEL. This flag is still unused.
* libnm: enforce that "nm-utils-private.h" header is not used inside src/Thomas Haller2015-05-201-0/+4
| | | | Let "nm-utils-private.h" and "nm-types.h" conflict.
* platform: recognize Bluetooth BNEP devices via DEVTYPEDan Williams2015-05-061-0/+1
| | | | | Instead of strcmp()-ing the device name, recognize these devices from their driver's DEVTYPE.
* core: split route management code out from platformLubomir Rintel2015-02-271-0/+1
| | | | | | | | | | Create a NMRouteManager singleton. Refactor, no functional changes apart from change of log domain from LOGD_PLATFORM to LOGD_CORE. Subsequent commit will keep track of the conflicting routes, avoid overwriting older ones with newer ones and apply the new ones when the old ones go away.
* config: add new NMConfigData classThomas Haller2015-02-031-0/+1
| | | | | | | | | | The NMConfig class should be immutable and its properties should not change, with one exception: the NMConfigData property. Later, when changing/reloading a configuration, NMConfig will only swap the NMConfigData instance. The NMConfigData instance itself is also immutable.
* config: forward declare NMConfig in nm-types.hThomas Haller2015-02-031-0/+1
|
* core: Add NMUtilsIPv6IfaceId to nm-types.hLubomir Rintel2015-01-261-0/+3
| | | | | We'd like to use it in nm-platform.h, but it's included by NetworkManagerUtils.h before the declaration occurs.
* policy: add manager for default routes and support multiple default routesThomas Haller2014-11-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Up to now, NMPolicy would iterate over all devices to find the "best" device and assign the default route to that device. A better approach is to add a default route to *all* devices that are never-default=no. The relative priority is choosen according to the route metrics. If two devices receive the same metric, we want to prefer the device that activates first. That way, the default route sticks to the same device until a better device activates or the device deactivates. Hence, the order of activation is imporant in this case (as it is already now). Also, if several devices have identical metrics, increment their metrics so that every metric is unique. This makes the routing deterministic according to what we choose as best device. A special case is assumed devices. In this case we cannot adjust the metric in face of equal metrics. Add a new singleton class NMDefaultRouteManager that has a list of all devices and their default routes. The manager will order the devices by their priority and configure the routes using platform. Also update the metric for VPN connections. Later we will track VPN routes also via NMDefaultRouteManager. For now, fix the VPN metric because otherwise VPNs would always get metric 1024 (which is usually much larger then the device metrics). https://bugzilla.gnome.org/show_bug.cgi?id=735512 Signed-off-by: Thomas Haller <thaller@redhat.com>
* core: forward declare NMVpnConnection in nm-types.hThomas Haller2014-11-071-0/+1
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* core: move definition of NMLinkType to nm-types.hThomas Haller2014-11-071-0/+43
| | | | | | | | | | | As we use NMLinkType in NetworkManagerUtils.h, we cannot use the utils header without nm-platform.h. That is clearly wrong. Apparently NMLinkType has a wider use outside of platform (and its name is not prefixed with 'platform' either). Move the enum definition to nm-types.h. Signed-off-by: Thomas Haller <thaller@redhat.com>
* core: Move NMPlatformSource to nm-types.hLubomir Rintel2014-10-201-0/+14
| | | | | ...and rename it while at it. It's going to be useful outside nm-platform, to weight MTU options from various sources.
* all: fix up multiple-include-guard definesDan Winship2014-08-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Previously, src/nm-ip4-config.h, libnm/nm-ip4-config.h, and libnm-glib/nm-ip4-config.h all used "NM_IP4_CONFIG_H" as an include guard, which meant that nm-test-utils.h could not tell which of them was being included (and so, eg, if you tried to include nm-ip4-config.h in a libnm test, it would fail to compile because nm-test-utils.h was referring to symbols in src/nm-ip4-config.h). Fix this by changing the include guards in the non-API-stable parts of the tree: - libnm-glib/nm-ip4-config.h remains NM_IP4_CONFIG_H - libnm/nm-ip4-config.h now uses __NM_IP4_CONFIG_H__ - src/nm-ip4-config.h now uses __NETWORKMANAGER_IP4_CONFIG_H__ And likewise for all other headers. The two non-"nm"-prefixed headers, libnm/NetworkManager.h and src/NetworkManagerUtils.h are now __NETWORKMANAGER_H__ and __NETWORKMANAGER_UTILS_H__ respectively, which, while not entirely consistent with the general scheme, do still mostly make sense in isolation.
* libnm, core, cli, tui: fix the capitalization of various typesDan Winship2014-08-011-2/+2
| | | | | | | | | | | | GLib/Gtk have mostly settled on the convention that two-letter acronyms in type names remain all-caps (eg, "IO"), but longer acronyms become initial-caps-only (eg, "Tcp"). NM was inconsistent, with most long acronyms using initial caps only (Adsl, Cdma, Dcb, Gsm, Olpc, Vlan), but others using all caps (DHCP, PPP, PPPOE, VPN). Fix libnm and src/ to use initial-caps only for all three-or-more-letter-long acronyms (and update nmcli and nmtui for the libnm changes).
* core: fill in nm-types.h, clean out other headersDan Winship2014-07-231-1/+30
| | | | | | | | | | | | | | Clean up some of the cross-includes between headers (which made it so that, eg, if you included NetworkManagerUtils.h in a test program, you would need to build the test with -I$(top_srcdir)/src/platform, and if you included nm-device.h you'd need $(POLKIT_CFLAGS)) by moving all GObject struct definitions for src/ and src/settings/ into nm-types.h (which already existed to solve the NMDevice/NMActRequest circular references). Update various .c files to explicitly include the headers they used to get implicitly, and remove some now-unnecessary -I options from Makefiles.
* core: add header for NM object typesDan Williams2012-12-171-0/+26
Helps prevent #include loops when two objects need each other's headers, like NMActiveConnection and NMDevice.