Skip to content

Commit

Permalink
link af ops: Add new ao_compare op to compare link af_data
Browse files Browse the repository at this point in the history
This patch adds new operation to compare link af_data.
ao_compare is similar to object oo_compare operation.
This op can be used when two links are compared
 for their af data. It takes two link objects in
question, an object specific bitmask defining which
attributes should be compared and flags to control
the behaviour. The function must return a bitmask
with the relevant bit set for each attribute that mismatches.

Signed-off-by: Roopa Prabhu <[email protected]>
Signed-off-by: Thomas Graf <[email protected]>
  • Loading branch information
roopa-prabhu authored and tgraf committed Jan 12, 2013
1 parent b1ebda9 commit 09213ee
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions include/netlink/route/link/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,19 @@ struct rtnl_link_af_ops
void (*ao_dump[NL_DUMP_MAX+1])(struct rtnl_link *,
struct nl_dump_params *,
void *);

/** Comparison function
*
* Will be called when two links are compared for their af data. It
* takes two link objects in question, an object specific bitmask
* defining which attributes should be compared and flags to control
* the behaviour
*
* The function must return a bitmask with the relevant bit set for
* each attribute that mismatches
*/
int (*ao_compare)(struct rtnl_link *,
struct rtnl_link *, int, uint32_t, int);
};

extern struct rtnl_link_af_ops *rtnl_link_af_ops_lookup(unsigned int);
Expand Down

0 comments on commit 09213ee

Please sign in to comment.