Changeset 2725 in MondoRescue for branches/2.2.9/mindi-busybox/networking/libiproute/libnetlink.h
- Timestamp:
- Feb 25, 2011, 9:26:54 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mindi-busybox/networking/libiproute/libnetlink.h
r1765 r2725 1 1 /* vi: set sw=4 ts=4: */ 2 #ifndef __LIBNETLINK_H__3 #define __LIBNETLINK_H__12 #ifndef LIBNETLINK_H 3 #define LIBNETLINK_H 1 4 4 5 5 #include <linux/types.h> … … 9 9 #include <linux/rtnetlink.h> 10 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; 11 PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN 12 13 struct rtnl_handle { 14 int fd; 15 struct sockaddr_nl local; 16 struct sockaddr_nl peer; 17 uint32_t seq; 18 uint32_t dump; 18 19 }; 19 20 20 extern int xrtnl_open(struct rtnl_handle *rth);21 extern void rtnl_close(struct rtnl_handle *rth); 22 extern int xrtnl_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) ;21 extern void xrtnl_open(struct rtnl_handle *rth) FAST_FUNC; 22 #define rtnl_close(rth) (close((rth)->fd)) 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; 24 25 extern int xrtnl_dump_filter(struct rtnl_handle *rth, 25 int (*filter)(struct sockaddr_nl*, struct nlmsghdr *n, void*), 26 void *arg1); 26 int (*filter)(const struct sockaddr_nl*, struct nlmsghdr *n, void*) FAST_FUNC, 27 void *arg1) FAST_FUNC; 28 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) 27 32 extern int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, pid_t peer, 28 unsigned groups, struct nlmsghdr *answer, 29 int (*junk)(struct sockaddr_nl *,struct nlmsghdr *n, void *), 30 void *jarg); 31 extern int rtnl_send(struct rtnl_handle *rth, char *buf, int); 33 unsigned groups, struct nlmsghdr *answer, 34 int (*junk)(struct sockaddr_nl *,struct nlmsghdr *n, void *), 35 void *jarg) FAST_FUNC; 36 37 extern int rtnl_send(struct rtnl_handle *rth, char *buf, int) FAST_FUNC; 32 38 33 39 34 extern int addattr32(struct nlmsghdr *n, int maxlen, int type, uint32_t data) ;35 extern int addattr_l(struct nlmsghdr *n, int maxlen, int type, void *data, int alen) ;36 extern int rta_addattr32(struct rtattr *rta, int maxlen, int type, uint32_t data) ;37 extern int rta_addattr_l(struct rtattr *rta, int maxlen, int type, void *data, int alen) ;40 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; 38 44 39 extern int parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len);45 extern void parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len) FAST_FUNC; 40 46 41 #endif /* __LIBNETLINK_H__ */ 47 POP_SAVED_FUNCTION_VISIBILITY 48 49 #endif
Note:
See TracChangeset
for help on using the changeset viewer.