Magellan Linux

Annotation of /trunk/mkinitrd-magellan/busybox/networking/libiproute/libnetlink.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 984 - (hide annotations) (download)
Sun May 30 11:32:42 2010 UTC (14 years ago) by niro
File MIME type: text/plain
File size: 1856 byte(s)
-updated to busybox-1.16.1 and enabled blkid/uuid support in default config
1 niro 532 /* vi: set sw=4 ts=4: */
2 niro 984 #ifndef LIBNETLINK_H
3     #define LIBNETLINK_H 1
4 niro 532
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 niro 984 PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
12 niro 816
13 niro 984 struct rtnl_handle {
14 niro 532 int fd;
15     struct sockaddr_nl local;
16     struct sockaddr_nl peer;
17     uint32_t seq;
18     uint32_t dump;
19     };
20    
21 niro 816 extern int xrtnl_open(struct rtnl_handle *rth) FAST_FUNC;
22     extern void rtnl_close(struct rtnl_handle *rth) FAST_FUNC;
23     extern int xrtnl_wilddump_request(struct rtnl_handle *rth, int fam, int type) FAST_FUNC;
24     extern int rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, int len) FAST_FUNC;
25     extern int xrtnl_dump_filter(struct rtnl_handle *rth,
26 niro 984 int (*filter)(const struct sockaddr_nl*, struct nlmsghdr *n, void*) FAST_FUNC,
27     void *arg1) FAST_FUNC;
28 niro 816
29     /* bbox doesn't use parameters no. 3, 4, 6, 7, stub them out */
30     #define rtnl_talk(rtnl, n, peer, groups, answer, junk, jarg) \
31     rtnl_talk(rtnl, n, answer)
32 niro 532 extern int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, pid_t peer,
33 niro 984 unsigned groups, struct nlmsghdr *answer,
34     int (*junk)(struct sockaddr_nl *,struct nlmsghdr *n, void *),
35     void *jarg) FAST_FUNC;
36 niro 532
37 niro 816 extern int rtnl_send(struct rtnl_handle *rth, char *buf, int) FAST_FUNC;
38 niro 532
39    
40 niro 816 extern int addattr32(struct nlmsghdr *n, int maxlen, int type, uint32_t data) FAST_FUNC;
41     extern int addattr_l(struct nlmsghdr *n, int maxlen, int type, void *data, int alen) FAST_FUNC;
42     extern int rta_addattr32(struct rtattr *rta, int maxlen, int type, uint32_t data) FAST_FUNC;
43     extern int rta_addattr_l(struct rtattr *rta, int maxlen, int type, void *data, int alen) FAST_FUNC;
44 niro 532
45 niro 816 extern int parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len) FAST_FUNC;
46    
47 niro 984 POP_SAVED_FUNCTION_VISIBILITY
48    
49 niro 816 #endif