dect
/
libnl
Archived
13
0
Fork 0
netlink Library with DECT support
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
roopa 690264a193 Add new object op oo_id_attrs_get
The current oo_id_attrs nl_object op allows a fixed
id attribute list for an cache. But a cache with multiple families
may need to specify different id attributes for different families.

An example for this is the bridge fdb entries in the neigh cache:
neigh entries belonging to the AF_UNSPEC family use
(NEIGH_ATTR_IFINDEX | NEIGH_ATTR_DST | NEIGH_ATTR_FAMILY) as id attributes.
AF_BRIDGE fdb entries which also support the same msg type, will need to use
(NEIGH_ATTR_LLADDR | NEIGH_ATTR_FAMILY) as id attributes.
Today you cannot specify different set of attributes to two families belonging
to the same cache.

This patch adds a new object function oo_id_attrs_get to get the attributes.
An example implementation of oo_id_attrs_get for the neigh cache will
look like:
static uint32_t neigh_id_attrs_get(struct nl_object *obj)
{
        struct rtnl_neigh *neigh = (struct rtnl_neigh *)obj;

        if (neigh->n_family == AF_BRIDGE)
                return (NEIGH_ATTR_LLADDR | NEIGH_ATTR_FAMILY);
        else
                return (NEIGH_ATTR_IFINDEX | NEIGH_ATTR_DST | NEIGH_ATTR_FAMILY);
}

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Reviewed-by: Nolan Leake <nolan@cumulusnetworks.com>
Reviewed-by: Shrijeet Mukherjee <shm@cumulusnetworks.com>
Reviewed-by: Wilson Kok <wkok@cumulusnetworks.com>
2012-11-05 13:31:55 +01:00
doc Don't include doc/ in toplevel dist 2012-10-22 12:09:03 +02:00
etc pktloc: support to specify a shift operator for packet locations 2010-11-04 20:01:36 +01:00
include Add new object op oo_id_attrs_get 2012-11-05 13:31:55 +01:00
lib Add new object op oo_id_attrs_get 2012-11-05 13:31:55 +01:00
m4 doc: Check documentation generation requirements with autoconf 2012-05-09 10:06:24 +02:00
man genl: Update genl-ctrl-list(8) 2012-06-01 13:10:03 +02:00
python Enabled the use of Links as context managers. 2012-10-04 16:36:55 -04:00
src Merge branch 'master' of https://github.com/rmfought/libnl 2012-10-26 12:48:22 +02:00
tests genl: modify genl_ctrl_resolve and friends to allow for module auto-loading 2012-06-03 13:52:16 +02:00
.gitignore doc: Update Doxyfile config to latest release 2012-08-30 13:22:21 +02:00
COPYING Update COPYING to fix FSF address 2012-01-17 12:38:37 +01:00
ChangeLog libnl 3.2.10 2012-06-06 11:43:53 +02:00
Makefile.am Don't include doc/ in toplevel dist 2012-10-22 12:09:03 +02:00
autogen.sh doc: Split doc/ into separate packages 2012-10-19 16:16:06 +02:00
configure.in Add configure option to disable pthreads support 2012-10-26 12:19:26 -07:00
libnl-3.0.pc.in Switch to libtool versioning system 2011-09-13 22:58:08 +02:00
libnl-cli-3.0.pc.in Add libnl-cli-3.0 to pkg-config tool 2011-10-10 11:39:24 +02:00
libnl-genl-3.0.pc.in Switch to libtool versioning system 2011-09-13 22:58:08 +02:00
libnl-nf-3.0.pc.in Switch to libtool versioning system 2011-09-13 22:58:08 +02:00
libnl-route-3.0.pc.in Switch to libtool versioning system 2011-09-13 22:58:08 +02:00