⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 libnetlink.h

📁 radius协议源码÷The Radius Stack will connect to a Radius Server. This stack implementation is built upo
💻 H
字号:
#ifndef __LIBNETLINK_H__#define __LIBNETLINK_H__ 1#include <linux/netlink.h>#include <linux/rtnetlink.h>struct rtnl_handle{	int			fd;	struct sockaddr_nl	local;	struct sockaddr_nl	peer;	__u32			seq;	__u32			dump;	int 			(*junk)(struct sockaddr_nl *, struct nlmsghdr *n);};struct rtnl_dialog{	struct sockaddr_nl	peer;	char			*buf;	char			*ptr;	__u32			seq;	int			buflen;	int			curlen;};#define rtnl_iov_set(a, b) (iov[ct].iov_base = (a), iov[ct].iov_len = (b), ct++)extern int rtnl_open(struct rtnl_handle *rth, unsigned subscriptions);extern void rtnl_close(struct rtnl_handle *rth);extern void rtnl_set_junkfilter(struct rtnl_handle *rth,				int (*junk)(struct sockaddr_nl *,struct nlmsghdr *n),				int (**o_junk)(struct sockaddr_nl *,struct nlmsghdr *n));extern int rtnl_wilddump_request(struct rtnl_handle *rth, int family, int type);extern int rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, int reqlen);extern int rtnl_dump_filter(struct rtnl_handle *rth,			    int (*filter)(struct sockaddr_nl *, struct nlmsghdr *n, void *),			    void *arg1);extern int rtnl_tell(struct rtnl_handle *rtnl, struct nlmsghdr *n);extern int rtnl_tell_iov(struct rtnl_handle *rtnl, struct iovec *, int iovlen);extern int rtnl_ask(struct rtnl_handle *rtnl, struct iovec *iov, int iovlen,		    struct rtnl_dialog *d, char *buf, int len);extern struct nlmsghdr * rtnl_wait(struct rtnl_handle *rtnl, struct rtnl_dialog *d,				   int *err);extern int addattr32(struct nlmsghdr *n, int maxlen, int type, __u32 data);extern int addattr_l(struct nlmsghdr *n, int maxlen, int type, void *data, int alen);extern int rta_addattr_l(struct rtattr *, int maxlen, int type, void *data, int alen);extern int parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len);#endif /* __LIBNETLINK_H__ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -