dect
/
libnl
Archived
13
0
Fork 0
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.
libnl/lib
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
..
cli Support plug qdisc - queue traffic until explicit release 2012-02-14 12:02:04 +01:00
fib_lookup doc: documentation restructuring 2012-05-10 12:03:59 +02:00
genl genl/family flags can be damaged during the auto-indentation. 2012-10-19 22:16:44 +06:00
netfilter Source cleanup for upstream 2012-10-19 11:18:52 -07:00
route Set err and free ntbl when leaving neightbl_msg_parser 2012-10-29 18:16:58 +01:00
.gitignore Added lex.yy.c to .gitignore 2012-08-30 03:19:04 +06:00
Makefile.am Checkpoint before compilation attempt 2012-10-08 15:26:55 -07:00
addr.c Address comparison bug fixed 2012-08-30 21:00:39 +06:00
attr.c Fix types-related warnings based on clang diagnostics 2012-06-13 13:30:26 +02:00
cache.c Fix for dumping objects to a buffer instead of file descriptor 2012-05-18 15:03:46 +02:00
cache_mngr.c doc: documentation restructuring 2012-05-10 12:03:59 +02:00
cache_mngt.c doc: documentation restructuring 2012-05-10 12:03:59 +02:00
data.c Fix types-related warnings based on clang diagnostics 2012-06-13 13:30:26 +02:00
error.c Support for NLM_F_INTR 2011-07-14 10:51:49 +02:00
handlers.c doc: documentation restructuring 2012-05-10 12:03:59 +02:00
msg.c Fix types-related warnings based on clang diagnostics 2012-06-13 13:30:26 +02:00
nl.c nl_recv(): work with credentials only if "creds" given and NL_SOCK_PASSCRED set 2012-10-19 23:51:59 +06:00
object.c Add new object op oo_id_attrs_get 2012-11-05 13:31:55 +01:00
socket.c Add missing va_end() calls 2012-10-29 18:16:58 +01:00
utils.c Fix warning "not checking return value of fscanf" in lib/utils.c: get_psched_settings 2012-08-30 03:19:04 +06:00
version.c Run-time version information is now available 2012-08-30 03:19:04 +06:00