Changeset View
Changeset View
Standalone View
Standalone View
sys/netlink/netlink_var.h
Show First 20 Lines • Show All 166 Lines • ▼ Show 20 Lines | |||||
#define MAX_FAMILIES 20 | #define MAX_FAMILIES 20 | ||||
#define MAX_GROUPS 64 | #define MAX_GROUPS 64 | ||||
#define MIN_GROUP_NUM 48 | #define MIN_GROUP_NUM 48 | ||||
#define CTRL_FAMILY_NAME "nlctrl" | #define CTRL_FAMILY_NAME "nlctrl" | ||||
struct ifnet; | |||||
struct nl_parsed_link; | |||||
struct nlattr_bmask; | |||||
struct nl_pstate; | |||||
/* Function map */ | /* Function map */ | ||||
struct nl_function_wrapper { | struct nl_function_wrapper { | ||||
bool (*nlmsg_add)(struct nl_writer *nw, uint32_t portid, uint32_t seq, uint16_t type, | bool (*nlmsg_add)(struct nl_writer *nw, uint32_t portid, uint32_t seq, uint16_t type, | ||||
uint16_t flags, uint32_t len); | uint16_t flags, uint32_t len); | ||||
bool (*nlmsg_refill_buffer)(struct nl_writer *nw, int required_len); | bool (*nlmsg_refill_buffer)(struct nl_writer *nw, int required_len); | ||||
bool (*nlmsg_flush)(struct nl_writer *nw); | bool (*nlmsg_flush)(struct nl_writer *nw); | ||||
bool (*nlmsg_end)(struct nl_writer *nw); | bool (*nlmsg_end)(struct nl_writer *nw); | ||||
void (*nlmsg_abort)(struct nl_writer *nw); | void (*nlmsg_abort)(struct nl_writer *nw); | ||||
void (*nlmsg_ignore_limit)(struct nl_writer *nw); | void (*nlmsg_ignore_limit)(struct nl_writer *nw); | ||||
bool (*nlmsg_get_unicast_writer)(struct nl_writer *nw, int size, struct nlpcb *nlp); | bool (*nlmsg_get_unicast_writer)(struct nl_writer *nw, int size, struct nlpcb *nlp); | ||||
bool (*nlmsg_get_group_writer)(struct nl_writer *nw, int size, int protocol, int group_id); | bool (*nlmsg_get_group_writer)(struct nl_writer *nw, int size, int protocol, int group_id); | ||||
bool (*nlmsg_get_chain_writer)(struct nl_writer *nw, int size, struct mbuf **pm); | bool (*nlmsg_get_chain_writer)(struct nl_writer *nw, int size, struct mbuf **pm); | ||||
bool (*nlmsg_end_dump)(struct nl_writer *nw, int error, struct nlmsghdr *hdr); | bool (*nlmsg_end_dump)(struct nl_writer *nw, int error, struct nlmsghdr *hdr); | ||||
int (*nl_modify_ifp_generic)(struct ifnet *ifp, struct nl_parsed_link *lattrs, | |||||
const struct nlattr_bmask *bm, struct nl_pstate *npt); | |||||
void (*nl_store_ifp_cookie)(struct nl_pstate *npt, struct ifnet *ifp); | |||||
}; | }; | ||||
void nl_set_functions(const struct nl_function_wrapper *nl); | void nl_set_functions(const struct nl_function_wrapper *nl); | ||||
#endif | #endif | ||||
#endif | #endif |