summaryrefslogtreecommitdiff
path: root/src/udev/net/link-config-gperf.gperf
AgeCommit message (Collapse)Author
2014-02-23core: clean up some confusing regarding SI decimal and IEC binary suffixes ↵Lennart Poettering
for sizes According to Wikipedia it is customary to specify hardware metrics and transfer speeds to the basis 1000 (SI decimal), while software metrics and physical volatile memory (RAM) sizes to the basis 1024 (IEC binary). So far we specified everything in IEC, let's fix that and be more true to what's otherwise customary. Since we don't want to parse "Mi" instead of "M" we document each time what the context used is.
2014-02-22udev: net - allow MTU and Speed to be specified with unitsTom Gundersen
This also changes the names to MTUBytes and BitsPerSecond, respectively. Notice that the speed was mistakenly documented to be in bytes before this change.
2014-02-21.network/.netdev/.link: allow to match on architectureTom Gundersen
2014-02-20network/link: Match - filter on kernel cmdline, host and virtTom Gundersen
2013-11-25udev: net_setup_link - don't use Description as AliasTom Gundersen
Use Description only internally, and allow Alias to be set as a separate option. For instance SNMP uses ifalias for a specific purpose, so let's not write to it by default.
2013-11-04net-config: start split out matching and parsing logicTom Gundersen
Move this to src/share/net-util.c, so it can be used elsewhere.
2013-10-29udev: link-config - add proper parsingTom Gundersen
2013-10-28udev: link-config - add mac address policyTom Gundersen
This introduces a new key MACAddressPolicy. The possible policies are 'persistent' and 'random'. 'persistent' will do nothing if the current address is the hardware address, but if the hardware does not have an address (or another address is set for whatever reason), we will generate an address which will be random, but persistent between boots (based on machineid and persistent netif name). 'random' will do nothing if the kernel already set a random address, otherwise it will generate a random one and use that instead. This patch sets MACAddressPolicy=persistent in the default .link file.
2013-10-28udev: link-config - move naming policy from udev rulesTom Gundersen
This introduces a new key NamePolicy, which takes an ordered list of naming policies. The first successful one is applide. If all fail the value of Name (if any) is used. The possible policies are 'onboard', 'slot', 'path' and 'mac'. This patch introduces a default link file, which replaces the equivalent udev rule.
2013-10-27udev: link-config: add rtnl supportTom Gundersen
This adds support for setting the mac address, name and mtu. Example: [Link] MTU=1450 MACAddress=98:76:54:32:10:ab Name=wireless0
2013-10-26udev: link-config: add ethtool supportTom Gundersen
This adds support for setting the link speed, duplex and WakeOnLan settings. Example: [Link] SpeedMBytes=100 Duplex=half WakeOnLan=magic
2013-10-26udev: add network link configuration toolTom Gundersen
This tool applies hardware specific settings to network devices before they are announced via libudev. Settings that will probably eventually be supported are MTU, Speed, DuplexMode, WakeOnLan, MACAddress, MACAddressPolicy (e.g., 'hardware', 'synthetic' or 'random'), Name and NamePolicy (replacing our current interface naming logic). This patch only introduces support for Description, as a proof of concept. Some of these settings may later be overriden by a network management daemon/script. However, these tools should always listen and wait on libudev before touching a device (listening on netlink is not enough). This is no different from how things used to be, as we always supported changing the network interface name from udev rules, which does not work if someone has already started using it. The tool is configured by .link files in /etc/net/links/ (with the usual overriding logic in /run and /lib). The first (in lexicographical order) matching .link file is applied to a given device, and all others are ignored. The .link files contain a [Match] section with (currently) the keys MACAddress, Driver, Type (see DEVTYPE in udevadm info) and Path (this matches on the stable device path as exposed as ID_PATH, and not the unstable DEVPATH). A .link file matches a given device if all of the specified keys do. Currently the keys are treated as plain strings, but some limited globbing may later be added to the keys where it makes sense. Example: /etc/net/links/50-wireless.link [Match] MACAddress=98:f2:e4:42:c6:92 Path=pci-0000:02:00.0-bcma-0 Type=wlan [Link] Description=The wireless link