source: MondoRescue/branches/2.2.5/mindi-busybox/networking/libiproute/libnetlink.h

Last change on this file was 1765, checked in by Bruno Cornec, 17 years ago

Update to busybox 1.7.2

File size: 1.5 KB
RevLine 
[1765]1/* vi: set sw=4 ts=4: */
[821]2#ifndef __LIBNETLINK_H__
3#define __LIBNETLINK_H__ 1
4
[1765]5#include <linux/types.h>
6/* We need linux/types.h because older kernels use __u32 etc
7 * in linux/[rt]netlink.h. 2.6.19 seems to be ok, though */
[821]8#include <linux/netlink.h>
9#include <linux/rtnetlink.h>
10
11struct rtnl_handle
12{
13 int fd;
14 struct sockaddr_nl local;
15 struct sockaddr_nl peer;
[1765]16 uint32_t seq;
17 uint32_t dump;
[821]18};
19
[1765]20extern int xrtnl_open(struct rtnl_handle *rth);
[821]21extern void rtnl_close(struct rtnl_handle *rth);
[1765]22extern int xrtnl_wilddump_request(struct rtnl_handle *rth, int fam, int type);
[821]23extern int rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, int len);
[1765]24extern int xrtnl_dump_filter(struct rtnl_handle *rth,
25 int (*filter)(struct sockaddr_nl*, struct nlmsghdr *n, void*),
26 void *arg1);
[821]27extern int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, pid_t peer,
[1765]28 unsigned groups, struct nlmsghdr *answer,
29 int (*junk)(struct sockaddr_nl *,struct nlmsghdr *n, void *),
30 void *jarg);
[821]31extern int rtnl_send(struct rtnl_handle *rth, char *buf, int);
32
33
[1765]34extern int addattr32(struct nlmsghdr *n, int maxlen, int type, uint32_t data);
[821]35extern int addattr_l(struct nlmsghdr *n, int maxlen, int type, void *data, int alen);
[1765]36extern int rta_addattr32(struct rtattr *rta, int maxlen, int type, uint32_t data);
[821]37extern int rta_addattr_l(struct rtattr *rta, int maxlen, int type, void *data, int alen);
38
39extern int parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len);
40
41#endif /* __LIBNETLINK_H__ */
Note: See TracBrowser for help on using the repository browser.