6#ifndef NETLINK_NEIGHBOUR_H_
7#define NETLINK_NEIGHBOUR_H_
9#include <netlink/netlink.h>
10#include <netlink/cache.h>
11#include <netlink/addr.h>
19extern struct rtnl_neigh *rtnl_neigh_alloc(
void);
20extern void rtnl_neigh_put(
struct rtnl_neigh *);
29 struct nl_addr *,
int);
31extern int rtnl_neigh_parse(
struct nlmsghdr *,
struct rtnl_neigh **);
33extern char * rtnl_neigh_state2str(
int,
char *,
size_t);
34extern int rtnl_neigh_str2state(
const char *);
36extern char * rtnl_neigh_flags2str(
int,
char *,
size_t);
37extern int rtnl_neigh_str2flag(
const char *);
39extern int rtnl_neigh_add(
struct nl_sock *,
struct rtnl_neigh *,
int);
47extern void rtnl_neigh_set_state(
struct rtnl_neigh *,
int);
48extern int rtnl_neigh_get_state(
struct rtnl_neigh *);
49extern void rtnl_neigh_unset_state(
struct rtnl_neigh *,
52extern void rtnl_neigh_set_flags(
struct rtnl_neigh *,
54extern void rtnl_neigh_unset_flags(
struct rtnl_neigh *,
56extern unsigned int rtnl_neigh_get_flags(
struct rtnl_neigh *);
58extern void rtnl_neigh_set_ifindex(
struct rtnl_neigh *,
60extern int rtnl_neigh_get_ifindex(
struct rtnl_neigh *);
62extern void rtnl_neigh_set_lladdr(
struct rtnl_neigh *,
64extern struct nl_addr * rtnl_neigh_get_lladdr(
struct rtnl_neigh *);
66extern int rtnl_neigh_set_dst(
struct rtnl_neigh *,
68extern struct nl_addr * rtnl_neigh_get_dst(
struct rtnl_neigh *);
70extern void rtnl_neigh_set_type(
struct rtnl_neigh *,
int);
71extern int rtnl_neigh_get_type(
struct rtnl_neigh *);
73extern void rtnl_neigh_set_family(
struct rtnl_neigh *,
int);
74extern int rtnl_neigh_get_family(
struct rtnl_neigh *);
76extern void rtnl_neigh_set_vlan(
struct rtnl_neigh *,
int);
77extern int rtnl_neigh_get_vlan(
struct rtnl_neigh *);
79extern void rtnl_neigh_set_master(
struct rtnl_neigh *,
int);
80extern int rtnl_neigh_get_master(
struct rtnl_neigh *);
int rtnl_neigh_build_delete_request(struct rtnl_neigh *, int, struct nl_msg **)
Build a netlink request message to delete a neighbour.
int rtnl_neigh_build_add_request(struct rtnl_neigh *, int, struct nl_msg **)
Build netlink request message to add a new neighbour.
int rtnl_neigh_alloc_cache(struct nl_sock *, struct nl_cache **)
Build a neighbour cache including all neighbours currently configured in the kernel.
int rtnl_neigh_add(struct nl_sock *, struct rtnl_neigh *, int)
Add a new neighbour.
struct rtnl_neigh * rtnl_neigh_get_by_vlan(struct nl_cache *, int, struct nl_addr *, int)
Look up a neighbour by interface index, link layer address and vlan id.
int rtnl_neigh_delete(struct nl_sock *, struct rtnl_neigh *, int)
Delete a neighbour.
struct rtnl_neigh * rtnl_neigh_get(struct nl_cache *, int, struct nl_addr *)
Look up a neighbour by interface index and destination address.
int rtnl_neigh_alloc_cache_flags(struct nl_sock *, struct nl_cache **, unsigned int)
Build a neighbour cache including all neighbours currently configured in the kernel.