summaryrefslogtreecommitdiff
path: root/src/systemd/sd-rtnl.h
Commit message (Collapse)AuthorAge
* sd-rtnl: extend type system to allow address-family to decide the union membersTom Gundersen2015-02-08
| | | | | | So far we only supported selecting them by sibling attributes. (This stuff is all a bit crazy, but there seems to be no other way...)
* sd-rtnl: introduce sd_rtnl_new_from_netlinkTom Gundersen2015-02-02
|
* nspawn: add new option "--port=" for exposing container ports on the local hostLennart Poettering2015-01-13
| | | | This exposes an IP port on the container as local port using DNAT.
* networkd: add FDB supportAlin Rauta2014-12-18
|
* networkd: manager - enumerate addresses globally, rather than per-linkTom Gundersen2014-12-08
| | | | The kernel always returns all addresses, rather than only for the given link, so let's only enumerate once.
* sd-rtnl: fix compileTom Gundersen2014-12-04
| | | | No idea how this appeared to compile for me. Mea culpa.
* sd-rtnl: rename sd_rtnl_message_route_get_{dst,src}_len to *_prefixlenTom Gundersen2014-12-04
| | | | This makes the API more consistent.
* networkd: add support for source routingTom Gundersen2014-12-04
|
* rtnl: make checks for default routes more strictLennart Poettering2014-12-03
| | | | | Also check that the source netmask is 0, not only the destination netmask.
* nss-myhostname: always resolve the host name "gateway" to the local default ↵Lennart Poettering2014-12-03
| | | | | | | | gateway This is useful inside of containers or local networks to intrdouce a stable name of the default gateway host (in case of containers usually the host, in case of LANs usually local router).
* sd-rtnl: add sd_rtnl_message_{new_neigh,neigh_get_{family,ifindex}}Tom Gundersen2014-12-02
|
* sd-rtnl: add typesystem for RTM_*NEIGHTom Gundersen2014-12-02
|
* sd-rtnl: add sd_rtnl_message_route_get_familyTom Gundersen2014-12-02
|
* networkd: fix kernel rtnl receive buffer overrun errorAlin Rauta2014-11-27
| | | | | | | | | | | | | | | | | | | | | | We got the following error when running systemd on a device with many ports: "rtnl: kernel receive buffer overrun Event source 'rtnl-receive-message' returned error, disabling: No buffer space available" I think the kernel socket receive buffer queue should be increased. The default value is taken from: "/proc/sys/net/core/rmem_default", but we can overwrite it using SO_RCVBUF socket option. This is already done in networkd for other sockets. For example, the bus socket (sd-bus/bus-socket.c) has a receive queue of 8MB. In our case, the default is 208KB. Increasing the buffer receive queue for manager socket to 512KB should be enough to get rid of the above error. [tomegun: bump the limit even higher to 8M]
* sd-rtnl: add support to set packet family typeSusant Sahani2014-10-29
| | | | | This patch adds functionality to set family type in the rtnl message for example PF_BRIDGE.
* networkd: add minimal client tool "networkd" to query network statusLennart Poettering2014-08-12
| | | | | | | In the long run this should become a full fledged client to networkd (but not before networkd learns bus support). For now, just pull interesting data out of networkd, udev, and rtnl and present it to the user, in a simple but useful output.
* networkd: set route protocolDan Williams2014-07-23
| | | | | | | | | | | | | | | All routes added by networkd are currently set RTPROT_BOOT, which according to the kernel means "Route installed during boot" (rtnetlink.h). But this is not always the case as networkd changes routing after boot too. Since the kernel gives more detailed protocols, use them. With this patch, user-configured static routes now use RTPROT_STATIC (which they are) and DHCP routes use RTPROT_DHCP. There is no define for IPv4LL yet, so those are installed as RTPROT_STATIC (though perhaps RTPROT_RA is better?). [tomegun: fixup src/network/networkd-link.c:972:33: error: too few arguments to function 'route_new_dynamic']
* change type for address family to "int"Lennart Poettering2014-07-18
| | | | | | | | Let's settle on a single type for all address family values, even if UNIX is very inconsitent on the precise type otherwise. Given that socket() is the primary entrypoint for the sockets API, and that uses "int", and "int" is relatively simple and generic, we settle on "int" for this.
* sd-rtnl: make string returned by sd_rtnl_message_read_string() constLennart Poettering2014-07-18
|
* rtnl: change from bitmask to enum for rtnl groupsTom Gundersen2014-05-10
| | | | | The bitmask is deprecated in the kernel, so move to the new interface. At the moment this does not make a difference for us, but it avoids having to change the API in the future.
* sd-rtnl: message - add support for getting prefixlen from address messagesTom Gundersen2014-05-10
|
* sd-rtnl: message - expose DUMP flag in the apiTom Gundersen2014-04-19
|
* sd-rtnl: multi-part message - store as linked-list rather than independent ↵Tom Gundersen2014-04-14
| | | | | | | messages This means the API can stay the same as for single-part messages by simply passing the head message around. Unrefing the head of the linked list unrefs the whole list.
* sd-rtnl: message_addr - expose a few more gettersTom Gundersen2014-04-14
|
* networkd: smooth transition from ipv4ll to dhcp addressUmut Tezduyar Lindskog2014-04-03
| | | | | | | | | | | | | | | | | | Currently when both ipv4ll and dhcp are enabled, ipv4ll address (if one has been claimed) is removed when dhcp address is aquired. This is not the best thing to do since there might be clients unaware of the removal trying to communicate. This patch provides a smooth transition between ipv4ll and dhcp. If ipv4ll address was claimed [1] before dhcp, address is marked as deprecated. Deprecated address is still a valid address and packets can be received on it but address cannot be selected as a source address. If dhcp lease cannot be extended, then ipv4ll address is marked as valid again. [1] If there is no collision, claiming IPv4LL takes between 4 to 7 seconds.
* sd-rtnl: rework rtnl type systemTom Gundersen2014-03-28
| | | | | | | | | | | | Use a static table with all the typing information, rather than repeated switch statements. This should make it a lot simpler to add new types. We need to keep all the type info to be able to create containers without exposing their implementation details to the users of the library. As a freebee we verify the types of appended/read attributes. The API is extended to nicely deal with unions of container types.
* sd-rtnl: add sd_rtnl_message_enter_container()Tom Gundersen2014-03-24
| | | | | | | | | | | | Extend rta_offset_tb into a stack of offset tables, one for each parent of the current container, and make sd_rtnl_message_{enter,exit}_container() pop/push to this stack. Also make sd_rtnl_message_rewind() parse the top-level container, and use this when reading a message from the socket. This changes the API by dropping the now redundant sd_rtnl_message_read() method.
* sd-rtnl: never treat broadcasts as repliesTom Gundersen2014-03-16
| | | | | Otherwise the sequence number of a broadcast may match the sequence number of a pending unicast message and cause confusion.
* sd-rtnl: introduce read ether and ip address functionsSusant Sahani2014-03-07
| | | | | | | This patch introduces reading ethernet address and IPV4/IPv6 as well which is based on table based look up. [tomegun: rename read_ether() to read_ether_addr() to match the append function.]
* sd-rtnl:introduce table-based lookup and typesafe read() functionsSusant Sahani2014-03-06
| | | | | | | | | This patch introduces new netlink attribute parsing logic which is table based lookup and sd_rtnl_message_read_* methods for reading attributes. By doing this user does not have to loop for the attribute values . Only providing the attribute type it gets the attribute values which is optimized and sd_rtnl_message_read_* methods are simplified.
* sd-network: IPv4 link-local support [v2]Umut Tezduyar Lindskog2014-03-03
| | | | | | | | | | | | | | | Implements IPv4LL with respect to RFC 3927 (http://tools.ietf.org/rfc/rfc3927.txt) and integrates it with networkd. Majority of the IPv4LL state machine is taken from avahi (http://avahi.org/) project's autoip. IPv4LL can be enabled by IPv4LL=yes under [Network] section of .network file. IPv4LL works independent of DHCP but if DHCP lease is aquired, then LL address will be dropped. [tomegun: removed a trailing newline and a compiler warning]
* api: in constructor function calls, always put the returned object pointer ↵Lennart Poettering2014-02-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | first (or second) Previously the returned object of constructor functions where sometimes returned as last, sometimes as first and sometimes as second parameter. Let's clean this up a bit. Here are the new rules: 1. The object the new object is derived from is put first, if there is any 2. The object we are creating will be returned in the next arguments 3. This is followed by any additional arguments Rationale: For functions that operate on an object we always put that object first. Constructors should probably not be too different in this regard. Also, if the additional parameters might want to use varargs which suggests to put them last. Note that this new scheme only applies to constructor functions, not to all other functions. We do give a lot of freedom for those. Note that this commit only changes the order of the new functions we added, for old ones we accept the wrong order and leave it like that.
* sd-rtnl-message: store reference to the bus in the messageTom Gundersen2014-02-18
| | | | This mimics the sd-bus api, as we may need it in the future.
* sd-rtnl: always include linux/rtnetlink.hTom Gundersen2014-02-15
|
* sd-rtnl: message_open_container - don't take a 'size' argumentTom Gundersen2014-02-15
| | | | We can always know the size based on the type, so let's do this inside the library.
* rtnl: support adding VETH_INFO_PEER containers into rtnl messagesLennart Poettering2014-02-13
|
* rtnl: rename constructors from the form sd_rtnl_xxx_yyy_new() to ↵Lennart Poettering2014-02-13
| | | | | | | | sd_rtnl_xxx_new_yyy() So far we followed the rule to always indicate the "flavour" of constructors after the "_new_" or "_open_" in the function name, so let's keep things in sync here for rtnl and do the same.
* Added attribute support for sd-rtnlSusant Sahani2014-02-05
| | | | | | Added sd_rtnl_message_append_u8 and few attribute support in sd_rtnl_message_append_u32 IFLA_GROUP, IFLA_TXQLEN, IFLA_NUM_TX_QUEUES, IFLA_NUM_RX_QUEUES
* sd-rtnl: add support for reading containersTom Gundersen2014-01-24
| | | | | Also insist on messages being sealed before reading them. In other words we don't allow interleaving of reading and appending to messages.
* sd-rtnl: simplify sd_rtnl_message_addr_new()Tom Gundersen2014-01-22
| | | | Split out into sd_rtnl_message_addr_set_{prefixlen,flags,scope}().
* sd-rtnl: add sd_rtnl_message_append_u16()Tom Gundersen2014-01-22
|
* sd-rtnl: link - allow setting the change maskTom Gundersen2014-01-22
|
* rtnl: replace message_append by typesafe versionsTom Gundersen2013-12-16
|
* rtnl: support interleaved reading and writing, and rewindTom Gundersen2013-12-16
|
* rtnl: simplify route_new()Tom Gundersen2013-12-16
| | | | Drop most of the arguments and instead introduce set_dst_prefixlen().
* rtnl: simplify link_new()Tom Gundersen2013-12-16
| | | | Drop most of the arguments and instead introduce link_set_{flags,type}.
* rtnl: add link_get_flagsTom Gundersen2013-12-04
|
* rtnl: add callback supportTom Gundersen2013-12-04
| | | | | sd_rtnl_add_match allows you to add a callback function for when given types of messages are received.
* rtnl: add preliminary support for containersTom Gundersen2013-11-26
| | | | | For now, we only support one container type IFLA_LINKINFO, and we still lack support for parsing the containers again.
* rtnl: add event loop integrationTom Gundersen2013-11-14
|