Enabled the use of Links as context managers.

With this change you can still set do modifications of
Links and then to change to pass the changes to the
kernel. But it additionally enables you to interact
with this part of libnl-python in a more pythonic
way. Instead of:

    eth0 = links['eth0']
    eth0.mtu = 5000
    eth0.change()

you can do:

    with links['eth0'] as eth0:
        eth0.mtu = 5000
nl: Provide API to specify the default buffer size when receiving netlink messages

New functions:
  nl_socket_set_msg_buf_size(sk, size)
  nl_socket_get_msg_buf_size(sk)

Default remains getpagesize()

Signed-off-by: Thomas Graf <tgraf@redhat.com>
link: Support IFLA_PROMISCUITY link attribute

 * read-only attribute
 * dumped in details sections "promisc-mode (N users)"

Signed-off-by: Thomas Graf <tgraf@redhat.com>
link: correctly set LINK_ATTR_PROMISCUITY

Signed-off-by: Thomas Graf <tgraf@redhat.com>
link: Support IFLA_NUM_TX_QUEUES and IFLA_NUM_RX_QUEUES

New functions:
  rtnl_link_set_num_tx_queues(link, nqueues)
  rtnl_link_get_num_tx_queues(link)
  rtnl_link_set_num_rx_queues(link, nqueues)
  rtnl_link_get_num_rx_queues(link)

Signed-off-by: Thomas Graf <tgraf@redhat.com>
link: Only print "promisc-mode" if users > 0

Signed-off-by: Thomas Graf <tgraf@redhat.com>
link: Include IFLA_NUM_TX_QUEUES and IFLA_NUM_RX_QUEUES when building messages

Signed-off-by: Thomas Graf <tgraf@redhat.com>
doc: Provide documentation for link promis counter and rx/tx queues

Signed-off-by: Thomas Graf <tgraf@redhat.com>
link: Support link grouping

New functions:
  rtnl_link_set_group(link, group)
  rtnl_link_get_group(link)

The group identifier is printed in the brief section as "group N"

Signed-off-by: Thomas Graf <tgraf@redhat.com>
Conntrack Dump ICMP

Looks like a cut and paste oversight ...
doc: mark route.txt as WIP
doc: Split doc/ into separate packages

Separates all the documentation generation trickery to its own
configure.in and allows to easily generate a pre built doc dist
file for distribution.

Arguments to configure will be passed on to doc/configure

Signed-off-by: Thomas Graf <tgraf@redhat.com>
Only include doc/ in dist
3.2.14 release
genl/family flags can be damaged during the auto-indentation.

"-" was never used in the names of the flags. "_" was used in all places
of the library. So, I just changed the undescore to the minus.

Automatic indentation can insert spaces on either side of the minus,
so the library will be compiled, but will not be usable (in this part of the code),
as the parser will split words by white space, and the flag "admin - perm"
will never work.
ROUTE_DIFF result was not used in some place in route_compare
Clang diagnostics

Based on clang diagnostics:

1. lib/nl.c: recvmsgs(): nla filling with zeros commented.
2. lib/route/classid.c: & lib/route/pktloc.c:
   remove zero-filling of struct stat
3. lib/route/qdisc/htb.c: Fix htb_qdisc_msg_fill(): fix zero-filling
4. ematch/container.c: container_parse:
   commented why only 4 bytes are copied
   len marked as unused to eliminate compiler warning
nl_recv(): "else if" logick simplified and refined
nl_recv() fixes

1. creds argument considered to be optional
2. in case of error or EOF, *buf and *creds (if given) set to NULL
   This protect from invalid code at user's side, like:
   char *buf;
   x = nl_recv(..., &buf, ...);
   if (x<=0)
      goto cleanup;
   cleanup:
      free(buf);
3. memset around nla is unnecessary
4. all cleanup actions (like free()) now located at the end of function
5. all intermediate buffers are stored into local variables, and user's
   variables only touches at the end.
6. All allocatin error now checked
7. EWOULDBLOCK return value also checked
8. credentials are allocated (and filled) only if "creds" is given.
   The intended logick is not known to me. What we should do if
   - creds passed, but NL_SOCK_PASSCRED is not: return NULL in *creds or -NLA_INVAL?
   - creds not passed, NL_SOCK_PASSCRED is set: allocate msg_control or not? return -NLA_INVAL or not?

   So, I decide to pass this logick to kernel. In case of error it will be raised.
9. calloc() is unnecessary. malloc() used instead.
nf-log example: correct copy-range parsing