dect
/
libnl
Archived
13
0
Fork 0
Commit Graph

725 Commits

Author SHA1 Message Date
Коренберг Марк (ноутбук дома) e1b67fb23f 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
2012-10-19 22:32:59 +06:00
Коренберг Марк (ноутбук дома) fedb862ea5 ROUTE_DIFF result was not used in some place in route_compare 2012-10-19 22:16:44 +06:00
Коренберг Марк (ноутбук дома) 787f14dbe3 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.
2012-10-19 22:16:44 +06:00
Thomas Graf 1fa61d1892 3.2.14 release 2012-10-19 16:35:51 +02:00
Thomas Graf 65c3919ff4 Only include doc/ in dist 2012-10-19 16:35:28 +02:00
Thomas Graf db138439ac 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>
2012-10-19 16:16:06 +02:00
Thomas Graf 2d674fed6c doc: mark route.txt as WIP 2012-10-19 15:06:50 +02:00
Rich Fought c3376e7df6 Conntrack Dump ICMP
Looks like a cut and paste oversight ...
2012-10-18 17:43:45 +02:00
Rich Fought 2d707513c6 Updated nfnetlink includes; removed ifdefs; added delete exp program 2012-10-16 12:13:33 -07:00
Rich Fought 07418658a6 define advanced attributes out 2012-10-12 17:44:27 -07:00
Rich Fought 416459570f Bugfixes 2012-10-10 13:08:23 -07:00
Rich Fought 547c8f6d50 reinit port numers on tuple dump 2012-10-09 15:22:16 -07:00
Rich Fought d3bec59eb9 bugfixes 2012-10-09 15:16:00 -07:00
Thomas Graf a35287a689 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>
2012-10-09 21:55:31 +02:00
Thomas Graf 36139cf1f0 doc: Provide documentation for link promis counter and rx/tx queues
Signed-off-by: Thomas Graf <tgraf@redhat.com>
2012-10-09 21:37:31 +02:00
Thomas Graf f2e2e7feb5 link: Include IFLA_NUM_TX_QUEUES and IFLA_NUM_RX_QUEUES when building messages
Signed-off-by: Thomas Graf <tgraf@redhat.com>
2012-10-09 21:24:35 +02:00
Thomas Graf 7f6880ceb9 link: Only print "promisc-mode" if users > 0
Signed-off-by: Thomas Graf <tgraf@redhat.com>
2012-10-09 19:58:54 +02:00
Thomas Graf 36ed882e00 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>
2012-10-09 19:57:22 +02:00
Rich Fought 3cb581d598 update gitignore 2012-10-09 10:54:07 -07:00
Rich Fought 453492c9b2 Expectation get cli tool 2012-10-09 10:52:34 -07:00
Thomas Graf d2876f8657 link: correctly set LINK_ATTR_PROMISCUITY
Signed-off-by: Thomas Graf <tgraf@redhat.com>
2012-10-09 19:34:23 +02:00
Rich Fought daf5f93a13 Compile CLI 2012-10-09 09:50:31 -07:00
Thomas Graf 6ac07179e5 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>
2012-10-09 18:15:50 +02:00
Thomas Graf e4192ff97f 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>
2012-10-09 16:16:54 +02:00
Rich Fought 4a702e6b72 Starting CLI work 2012-10-08 17:31:42 -07:00
Rich Fought f111efd894 Successful compilation of libnl-nf with expectation 2012-10-08 16:49:06 -07:00
Rich Fought c675bf0486 Checkpoint before compilation attempt 2012-10-08 15:26:55 -07:00
Rich Fought e8b3356dd2 "checkpoint" 2012-10-05 17:32:20 -07:00
Rich Fought 20035ce021 Checkpoint: compare function 2012-10-05 11:09:45 -07:00
Rich Fought 40457db1f4 Exp checkpoint 2012-10-05 06:55:04 -07:00
Antoni S. Puimedon 72c2cb9e29 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
2012-10-04 16:36:55 -04:00
Thomas Graf ce72837c90 3.2.13 release 2012-09-03 13:41:11 +02:00
Jeroen Roovers fddba713a8 libnl-3.2.12 - ./configure --disable-doc: error: conditional "LINK_DOC" was never defined. \ Usually this means the macro was only invoked conditionally.
configure: error: conditional "LINK_DOC" was never defined.
Usually this means the macro was only invoked conditionally.

Attached patch provided by Martin Jansa.

See also https://bugs.gentoo.org/show_bug.cgi?id=433565
2012-09-03 12:13:01 +02:00
Thomas Graf 4a9e92cbbc Merge branch 'asprintf' of https://github.com/socketpair/libnl 2012-08-31 16:25:47 +02:00
Thomas Graf eb8ff32b29 Merge branch 'doxyfile' of https://github.com/socketpair/libnl 2012-08-31 16:23:39 +02:00
Thomas Graf 49be8cd2b3 doc: Update Doxyfile.in to latest syntax 2012-08-31 16:23:07 +02:00
Коренберг Марк 49c94c3490 genl_ctrl_probe_by_name: fix checking of genlmsg_put() return value
It's a pointer! not an error code :) nasty bugs
2012-08-30 22:53:54 +06:00
Коренберг Марк b1e0a0ca5d Remove auto-generated Doxyfile from git
Also, add it to gitignore
2012-08-30 22:43:09 +06:00
Коренберг Марк a820222877 asprintf related fixed in yy parser
1. According to man asprintf:
   If memory allocation wasn't possible, or some other error occurs,
   these functions will return -1, and the contents of strp is undefined.
2. Sometimes, errp was not filled at all. In high-level code, free(errp)
   will called, so segmantation fault may appear in case of error in parser
3. The most cases of using asprintf is to report about allocation fail.
   So, probability of allocation of asprintf buffer is very high. And that
   will lead to trash in errp.
4. For simple casses I decide to replace asprintf with strdup
2012-08-30 22:35:25 +06:00
Коренберг Марк 00261259f0 Address comparison bug fixed
Bug introduced in 794ac78c56
2012-08-30 21:00:39 +06:00
Коренберг Марк 8f2ce4d791 More clean NL_AUTO_PORT and NL_AUTO_SEQ usage in nl_complete_msg 2012-08-30 18:40:25 +06:00
Thomas Graf 3bf8712feb 3.2.12 release 2012-08-30 13:46:29 +02:00
Thomas Graf 929bd0150f configure: Check for pygmentize when building docs
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2012-08-30 13:36:23 +02:00
Thomas Graf 5eeb3d3ea6 doc: Update Doxyfile config to latest release 2012-08-30 13:22:21 +02:00
Thomas Graf b377ab1bbd route: Document ROUTE_CACHE_CONTENT flag
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2012-08-30 13:19:56 +02:00
Thomas Graf 717fabc469 configure: Check for graphviz and source-highlight before building documentation
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2012-08-30 13:15:45 +02:00
Коренберг Марк (дома) 5eee974e03 Prevent potential socket file descriptor leak
This may happen when passing connected socket to nl_cache_mngr_alloc().

Now, nl_connect() will return error trying to connect already connected socket.

Also, dont call close(-1) if socket() fails.
2012-08-30 04:36:28 +06:00
Коренберг Марк (дома) a2b23ffe45 Fix warning "not checking return value of fscanf" in lib/utils.c: get_psched_settings
Also, change internal variables type from uint32_t to unsigned int.
Correct scanf format string should contain "SCNx32" instead of just "x",
but I decide not to fix that and just changed variable type.
2012-08-30 03:19:04 +06:00
Коренберг Марк (дома) 8cd2f5728a Fix typo in textual description in ct_dump_stats()
Bug introduced in a0f1c0e281
2012-08-30 03:19:04 +06:00
Коренберг Марк (дома) ab15d06d13 "%llu" replaced with "%" PRIu64
On some architectures, uint64_t is defined as:

typedef unsigned long long int __u64;

on another architectures as:

typedef unsigned long int __u64;

So, according to man 3 printf,
uint64_t should be printed as "%llu" on some architectures, and as "%lu" on another. The same for scanf.

To eliminate that challenge, there is inttypes.h, in which appropriate constants
are defined for current architecture.

32-bit types (and even 16 and 8 bit types) should be printed using such constants if
printed variable defined as uint_XXXt or intXXXt type. But in reality 32-bit and less
types does not gain run-time error (except in scanf), because they pushed to stack as
32-bit values at least. So, I decide not to fix that.
2012-08-30 03:19:04 +06:00