Age | Commit message (Collapse) | Author |
|
|
|
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.]
|
|
With the new sd_rtnl_message_read_string(), there is no longer a need for
rtnl_message_get_ifname().
|
|
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.
|
|
We need a separate container_enter() function, which will be part of a largerg
API change. For now, just fix message_read().
|
|
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]
|
|
container
|
|
As pointed-out by clang -Wunreachable-code.
No behaviour changes.
|
|
|
|
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.
|
|
|
|
These were added to the kernel between 3.5 and 3.9, let's not require such
recent kernels (yet).
|
|
This mimics the sd-bus api, as we may need it in the future.
|
|
The kernel will then look up the ifindex itself based on the name.
This should be used very carefully as it is racey.
[This was a left-over hunk from my previous nspawn patch.]
|
|
|
|
We can always know the size based on the type, so let's do this inside the library.
|
|
The kernel will happily treat 0x0 as 0xffffffff, but it is for backwards
compatibility only, so let's not perpetuate this.
|
|
|
|
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.
|
|
The "sd_" prefix is supposed to be used on exported symbols only, and
not in the middle of names. Let's drop it from the cleanup macros hence,
to make things simpler.
The bus cleanup macros don't carry the "sd_" either, so this brings the
APIs a bit nearer.
|
|
|
|
We are more likely to catch errors if we don't use '0' as test value.
|
|
|
|
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
|
|
|
|
|
|
Also insist on messages being sealed before reading them. In other
words we don't allow interleaving of reading and appending to messages.
|
|
|
|
Split out into sd_rtnl_message_addr_set_{prefixlen,flags,scope}().
|
|
|
|
|
|
We still only produce on .so, but let's keep the sources separate to make things a bit
less messy.
|