dect
/
libnl
Archived
13
0
Fork 0
Commit Graph

810 Commits

Author SHA1 Message Date
Patrick McHardy edaf9cac24 dect: support monitor mode
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-19 18:41:56 +02:00
Patrick McHardy 2080dce45e package config: include nl-cli in Libs
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-19 18:39:38 +02:00
Patrick McHardy ac263675d1 dect: support DECT_LLME_MAC_RFP_PRELOAD
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-04 22:48:25 +02:00
Patrick McHardy a9886abe70 dect: rename DECT_HLC_ACCESS_RIGHT_REQUESTS to DECT_HLC_ACCESS_RIGHTS_REQUESTS
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-04 22:48:23 +02:00
Thomas Graf 6921b1c879 Ignore vim swap files 2010-07-03 15:56:51 +02:00
Thomas Graf 7cf52dd94b Let git ignore generated pktloc source files 2010-07-03 15:56:07 +02:00
Thomas Graf 0fa04772ab Fix compile warning in utils.c 2010-07-03 15:17:04 +02:00
Thomas Graf 256d7e723c Fix compile warning in nl.c 2010-07-03 15:15:12 +02:00
Thomas Graf db5bd57899 Packet Location Interface 2010-07-02 14:06:59 +02:00
Patrick McHardy 6ff91c4799 Merge branch 'master' of x2:/home/dect/git/libnl 2010-05-20 18:14:52 +02:00
Patrick McHardy 47a4c5a4c0 Merge branch 'master' of /repos/git/libnl 2010-05-20 17:20:12 +02:00
Karl Hiramoto d378220c96 src/nf-queue.c: cleanup and improve performance of test program for NF_QUEUE
* Fix filename in file header

* If the kernel or netlink socket becomes over loaded,
  the kernel starts printing error messages like:

nf_queue: full at 1024 entries, dropping packets(s). Dropped: 1
nf_queue: full at 1024 entries, dropping packets(s). Dropped: 2
nf_queue: full at 1024 entries, dropping packets(s). Dropped: 3

So detect out of order packet ID's and set the NF_ACCEPT verdict,
so they will be removed from the kernel queue.

* increase socket buffer to improve performance

without these changes sending more than 100 KB/s over tcp HTTP lo(localhost)
was difficult on my core2 duo machine, due to so many dropped packets.
After these changes over 150 MB/s was easy.

* improve help text

Signed-off-by: Karl Hiramoto <karl@hiramoto.org>
2010-04-19 12:58:39 +02:00
Thomas Graf d966a3ecf7 Don't install private header files. 2010-04-19 12:56:31 +02:00
Patrick McHardy b3096c4acf object: fix attribute comparison
Currently two attributes are regarded as different if they are absent in
both objects to be compared. This is obviously incorrect, change to
regard objects as different if an attribute is only present on one of
them or if the attribute data differs.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-04-19 12:51:24 +02:00
Patrick McHardy 3c28aa5dca Fix rule attribute comparison
Rules don't have unique identifiers, so all attributes are compared
by initializing the ID mask to ~0. This doesn't work however since
nl_object_identical verifies whether the ID attributes are actually
present before comparing the objects, which is never the case.

Work around by using the intersection of present attributes when
comparing two rule objects.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-04-19 12:43:18 +02:00
Patrick McHardy 0e4f54d288 addr: add NL_DUMP_ENV function
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-04-19 12:43:01 +02:00
Patrick McHardy f5f49c2248 addr: restore anycast functions
Seems it got lost during some cleanups.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-04-19 12:42:53 +02:00
Patrick McHardy 8290725718 neigh: fix id_attrs to include ifindex
Neighbour entries for the same destination may exist on multiple
interfaces. Include the interface in the ID attributes.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-04-19 12:42:40 +02:00
Patrick McHardy ba1bd9050d cache: properly invoke change_cb for deleted objects in nl_cache_resync()
When resyncing a cache, there are no delete messages, so they need to
be synthesized for deleted objects.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-04-19 12:42:27 +02:00
Patrick McHardy c17d47977e Merge branch 'master' of x2:/repos/git/libnl 2010-03-19 01:05:09 +01:00
Jose Ignacio Naranjo Hernández 52d6b8b9ee Fix a bug when calculating ticks_per_usec
I've noticed a wrong behavior when setting up some delays in a netem
qdisc.  I will try to make the things easier for the reader describing
the calls path.

To set up a delay (or jitter...) I use 'rtnl_netem_set_delay' which
requires an int parameter that tells the delay in micro seconds. Inside
this func, the delay is set up with the help of 'nl_us2ticks', which is
just an arithmetic operation (us * ticks_per_usec), where us is the
input parameter and ticks_per_usec is a global variable initialized in
'get_psched_settings'. And here is the problem:

If this variable is going to be calculated using '/proc/net/psched', I
think the file scan is not done properly.

I don't understand what the meaning of the asterisk is here:

int r = fscanf(fd, "%08x%08x%08x%*08x", &tick, &us, &nom);
if (4 == r && nom == 1000000 && !got_tick)
        ticks_per_usec = (double)tick/(double)us;

The execution path never gets in the if statement, because r is always
3, and if the fourth parameter is read (avoiding the asterisk), there is
no variable to store it in, so it comes a segv. In my opinion we can get
rid of the if statement, because I think the proc psched file has always
a fixed format of 4 parameters, and 'nom' is always 1000000
(http://lxr.linux.no/#linux+v2.6.32/net/sched/sch_api.c#L1678).

Find attached a patch I did, if I am correct.
2010-03-10 16:18:54 +01:00
Karl Hiramoto cafdaa4e06 new function nfnl_queue_msg_send_verdict_payload()
nfnl_queue_msg_send_verdict_payload() will to send the verdict, mark,
and possibly changed payload through the netlink socket.

Add a few docbook comments in other funcs.

Signed-off-by: Karl Hiramoto <karl@hiramoto.org>
2010-03-10 16:02:01 +01:00
Karl Hiramoto 27c505eb89 new feature nl_send_iovec(), nl_auto_complete() and code refactoring.
Create new function nl_send_iovec() to be used to send multiple 'struct iovec'
through the netlink socket.  This will be used for NF_QUEUE, to send
packet payload of a modified packet.

Refactor nl_send() to use nl_send_iovec() sending a single struct iovec.

Create new function nl_auto_complete() by refactoring nl_send_auto_complete(),
so other functions that call nl_send may also use nl_auto_complete()

Signed-off-by: Karl Hiramoto <karl@hiramoto.org>
2010-03-10 16:01:46 +01:00
Patrick McHardy 44fde8fcbb dect: adapt capability handling to latest kernel changes
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-03-08 04:02:53 +01:00
Patrick McHardy 2826c89a77 dect: transceiver: add missing DECT_DEL_TRANSCEIVER handling
Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-12-30 00:57:56 +01:00
Patrick McHardy 17e2ac82ca dect: fixup example programs for latest library changes
Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-12-17 17:30:24 +01:00
Patrick McHardy d9c446dd4f Merge branch 'master' of /repos/git/libnl
Conflicts:
	include/netlink/cli/utils.h

Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-12-17 17:21:30 +01:00
Thomas Graf 8808743839 CLI - Command Line Interface Library
Moved common code in src/ used by CLI tools to src/lib/ for possible use
by other CLI tools. Just link to libnl-cli.{so|la}
2009-12-16 16:20:46 +01:00
Patrick McHardy ff81f73c8a dect: support different ARI classes in dect-cluster-add
Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-12-13 11:42:23 +01:00
Denys Fedoryschenko ff76549013 one more fix, u32.c
One more segfault, also nl-tctree-list , fix
Probably need reformat for better look
Patch attached
2009-12-07 16:27:59 +01:00
Denys Fedoryschenko 52510e7d39 invalid comma cause segfault for nl-tctree-list, tbf.c
I notice segfault while running nl-tctree-list for tbf qdisc.

Patch that fix this typo is attached.
2009-12-07 16:23:48 +01:00
Patrick McHardy accc75c463 libnl: dect: add cell slave mode support
Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-12-04 11:04:51 +01:00
Patrick McHardy 71f3690295 libnl: dect: add DECT_SLOT_SYNC flag
Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-12-04 09:57:22 +01:00
Patrick McHardy f5b6c85296 dect: support DECTA_SLOT_FLAGS attribute
Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-11-26 03:21:30 +01:00
Patrick McHardy c335c58b68 dect: add X-crc statistic
Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-11-26 03:21:28 +01:00
Patrick McHardy 464d806d27 dect: transceiver: show RF-band as 5 digit number
This is how the bands are officially numbered.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-11-12 14:38:34 +01:00
Patrick McHardy 9a8cbfdf5a Merge branch 'master' of x2:/repos/git/libnl
Conflicts:

	include/Makefile
	lib/Makefile
	src/Makefile

Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-11-12 13:36:05 +01:00
Patrick McHardy 8d2bb90726 libnl: add ERANGE to errno translation
Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-11-10 11:29:07 +01:00
Patrick McHardy fed168212e libnl: fix automake breakage
libnl-route must be handled before libnl-nf in lib_LTLIBRARIES since
the later depends on the former. Additionally nf-monitor, nl-list-caches,
nl-list-sockets and nl-util-addr have been dropped from the Makefile.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-11-10 11:28:51 +01:00
Thomas Graf dc273a12da - Compile with _GNU_SOURCE
- Fixed classifier.c -> cls.c
2009-09-03 00:01:33 +02:00
Thomas Graf f946cfaa3a Merge branch 'master' of git://dev.medozas.de/libnl
Conflicts:
	lib/Makefile
	src/Makefile
2009-09-02 23:41:03 +02:00
olc 2ead49f0d5 Add support for getting and deleting queueing classes. 2009-09-02 21:10:48 +02:00
Dan Winship e0af9e1802 Fix rtnl_addr caching
addr_obj.ops.oo_id_attrs included ADDR_ATTR_PEER, so any address that
didn't have a peer address set would compare as unequal to itself,
meaning it could never be removed from a cache after it was added, etc.
2009-09-02 18:45:12 +02:00
Marc de Kruijf 1ed227d3a9 Patch for unexpectedly aligned messages
I found the following bug, where nlmsg_ok() in lib/msg.c would
incorrectly return 'true' when the input argument 'remaining' was a negative
number.  This happens when the message is not aligned the way that libnl
expects (although it is still legal).

In the comparison of the signed and unsigned numbers on line 284, the signed
number gets converted to an unsigned number, which is unexpected and
naturally produces a bug.  My patch is below.  The cast is ugly, but it
fixes the problem.
2009-09-02 18:43:03 +02:00
Thomas Graf ef858fb492 - Reworked the classifier interface.
- Added initial ematch support
- Added support for the basic classifier
- Added support for the cgroup classifier
2009-09-02 18:31:14 +02:00
Alexander Sack 7d249fc2e1 nl_object_clone: properly clone ce_mask field
based on my finding, ce_mask needs to be identical on clones; otherwise
some functions (like "dump") will treat clones differently.
2009-07-20 11:58:57 +02:00
Pavel Roskin dec2ea357d Declare struct ucred in handlers.h and netlink.h
Both files refer to it.  The sources including those files are not
guaranteed to include sys/socket.h to ensure that struct ucred is
defined.
2009-07-20 11:47:22 +02:00
Patrick McHardy c60e16afd0 Merge branch 'master' of 192.168.0.100:/home/dect/git/libnl 2009-07-18 08:01:15 +02:00
Patrick McHardy d9cf87a0bc dect: add crc error statistic
Signed-off-by: Patrick McHardy <kaber@trash.net>
2009-07-18 08:00:12 +02:00
Jan Engelhardt a73e5f92c3 build: make use of library dependencies 2009-07-05 18:00:41 +02:00