Contents of /trunk/mkinitrd-magellan/busybox/networking/libiproute/libnetlink.h
Parent Directory | Revision Log
Revision 532 -
(show annotations)
(download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 8 months ago) by niro
File MIME type: text/plain
File size: 1626 byte(s)
Sat Sep 1 22:45:15 2007 UTC (16 years, 8 months ago) by niro
File MIME type: text/plain
File size: 1626 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd
1 | /* vi: set sw=4 ts=4: */ |
2 | #ifndef __LIBNETLINK_H__ |
3 | #define __LIBNETLINK_H__ 1 |
4 | |
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 */ |
8 | #include <linux/netlink.h> |
9 | #include <linux/rtnetlink.h> |
10 | |
11 | struct rtnl_handle |
12 | { |
13 | int fd; |
14 | struct sockaddr_nl local; |
15 | struct sockaddr_nl peer; |
16 | uint32_t seq; |
17 | uint32_t dump; |
18 | }; |
19 | |
20 | extern int rtnl_open(struct rtnl_handle *rth, unsigned subscriptions); |
21 | extern void rtnl_close(struct rtnl_handle *rth); |
22 | extern int rtnl_wilddump_request(struct rtnl_handle *rth, int fam, int type); |
23 | extern int rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, int len); |
24 | extern int rtnl_dump_filter(struct rtnl_handle *rth, |
25 | int (*filter)(struct sockaddr_nl*, struct nlmsghdr *n, void*), |
26 | void *arg1, |
27 | int (*junk)(struct sockaddr_nl *, struct nlmsghdr *n, void *), |
28 | void *arg2); |
29 | extern int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, pid_t peer, |
30 | unsigned groups, struct nlmsghdr *answer, |
31 | int (*junk)(struct sockaddr_nl *,struct nlmsghdr *n, void *), |
32 | void *jarg); |
33 | extern int rtnl_send(struct rtnl_handle *rth, char *buf, int); |
34 | |
35 | |
36 | extern int addattr32(struct nlmsghdr *n, int maxlen, int type, uint32_t data); |
37 | extern int addattr_l(struct nlmsghdr *n, int maxlen, int type, void *data, int alen); |
38 | extern int rta_addattr32(struct rtattr *rta, int maxlen, int type, uint32_t data); |
39 | extern int rta_addattr_l(struct rtattr *rta, int maxlen, int type, void *data, int alen); |
40 | |
41 | extern int parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len); |
42 | |
43 | #endif /* __LIBNETLINK_H__ */ |