diff options
author | Thomas Haller <thaller@redhat.com> | 2022-03-14 07:52:17 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-03-14 07:54:10 (GMT) |
commit | 92035e25e6207c8b2902f1bd931503c33d82ddaf (patch) | |
tree | b5da7355489aed529761e8042b3957aff7f9d51b /include | |
parent | 6237621332b1c80638b6a5c54dc16cec2deb1377 (diff) | |
download | libnl-92035e25e6207c8b2902f1bd931503c33d82ddaf.zip libnl-92035e25e6207c8b2902f1bd931503c33d82ddaf.tar.gz libnl-92035e25e6207c8b2902f1bd931503c33d82ddaf.tar.bz2 |
route/mdb: cleanup mdb.h header
- drop leading tabs. Yes, it's inside an extern C block, but so is all
our code in public headers. That should not by default increase the
indentation level.
- drop unused rtnl_mdb_add().
- forward declare "struct rtnl_mdb".
Diffstat (limited to 'include')
-rw-r--r-- | include/netlink/route/mdb.h | 53 |
1 files changed, 27 insertions, 26 deletions
diff --git a/include/netlink/route/mdb.h b/include/netlink/route/mdb.h index fc518bb..9be8079 100644 --- a/include/netlink/route/mdb.h +++ b/include/netlink/route/mdb.h @@ -11,32 +11,33 @@ extern "C" { #endif - struct rtnl_mdb_entry; - struct rtnl_mdb *rtnl_mdb_alloc(void); - void rtnl_mdb_put(struct rtnl_mdb *mdb); - - int rtnl_mdb_alloc_cache(struct nl_sock *sk, struct nl_cache **result); - int rtnl_mdb_alloc_cache_flags(struct nl_sock *sock, - struct nl_cache **result, - unsigned int flags); - - int rtnl_mdb_add(); - struct rtnl_mdb_entry *rtnl_mdb_entry_alloc(void); - - uint32_t rtnl_mdb_get_ifindex(struct rtnl_mdb *mdb); - void rtnl_mdb_add_entry(struct rtnl_mdb *mdb, - struct rtnl_mdb_entry *_entry); - - void rtnl_mdb_foreach_entry(struct rtnl_mdb *mdb, - void (*cb)(struct rtnl_mdb_entry *, void *), - void *arg); - - int rtnl_mdb_entry_get_ifindex(struct rtnl_mdb_entry *mdb_entry); - int rtnl_mdb_entry_get_vid(struct rtnl_mdb_entry *mdb_entry); - int rtnl_mdb_entry_get_state(struct rtnl_mdb_entry *mdb_entry); - struct nl_addr *rtnl_mdb_entry_get_addr(struct rtnl_mdb_entry - *mdb_entry); - uint16_t rtnl_mdb_entry_get_proto(struct rtnl_mdb_entry *mdb_entry); +struct rtnl_mdb; +struct rtnl_mdb_entry; + +struct rtnl_mdb *rtnl_mdb_alloc(void); +void rtnl_mdb_put(struct rtnl_mdb *mdb); + +int rtnl_mdb_alloc_cache(struct nl_sock *sk, struct nl_cache **result); +int rtnl_mdb_alloc_cache_flags(struct nl_sock *sock, + struct nl_cache **result, + unsigned int flags); + +struct rtnl_mdb_entry *rtnl_mdb_entry_alloc(void); + +uint32_t rtnl_mdb_get_ifindex(struct rtnl_mdb *mdb); +void rtnl_mdb_add_entry(struct rtnl_mdb *mdb, + struct rtnl_mdb_entry *_entry); + +void rtnl_mdb_foreach_entry(struct rtnl_mdb *mdb, + void (*cb)(struct rtnl_mdb_entry *, void *), + void *arg); + +int rtnl_mdb_entry_get_ifindex(struct rtnl_mdb_entry *mdb_entry); +int rtnl_mdb_entry_get_vid(struct rtnl_mdb_entry *mdb_entry); +int rtnl_mdb_entry_get_state(struct rtnl_mdb_entry *mdb_entry); +struct nl_addr *rtnl_mdb_entry_get_addr(struct rtnl_mdb_entry + *mdb_entry); +uint16_t rtnl_mdb_entry_get_proto(struct rtnl_mdb_entry *mdb_entry); #ifdef __cplusplus } #endif |