aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--networking/libiproute/iproute.c139
-rw-r--r--networking/libiproute/libnetlink.c24
-rw-r--r--networking/libiproute/libnetlink.h24
3 files changed, 95 insertions, 92 deletions
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c
index 354442c4e..07a88c4dd 100644
--- a/networking/libiproute/iproute.c
+++ b/networking/libiproute/iproute.c
@@ -79,9 +79,8 @@ static unsigned get_hz(void)
79} 79}
80 80
81static int print_route(const struct sockaddr_nl *who ATTRIBUTE_UNUSED, 81static int print_route(const struct sockaddr_nl *who ATTRIBUTE_UNUSED,
82 struct nlmsghdr *n, void *arg) 82 struct nlmsghdr *n, void *arg ATTRIBUTE_UNUSED)
83{ 83{
84 FILE *fp = (FILE*)arg;
85 struct rtmsg *r = NLMSG_DATA(n); 84 struct rtmsg *r = NLMSG_DATA(n);
86 int len = n->nlmsg_len; 85 int len = n->nlmsg_len;
87 struct rtattr * tb[RTA_MAX+1]; 86 struct rtattr * tb[RTA_MAX+1];
@@ -194,73 +193,71 @@ static int print_route(const struct sockaddr_nl *who ATTRIBUTE_UNUSED,
194 } 193 }
195 194
196 if (n->nlmsg_type == RTM_DELROUTE) { 195 if (n->nlmsg_type == RTM_DELROUTE) {
197 fprintf(fp, "Deleted "); 196 printf("Deleted ");
198 } 197 }
199 if (r->rtm_type != RTN_UNICAST && !filter.type) { 198 if (r->rtm_type != RTN_UNICAST && !filter.type) {
200 fprintf(fp, "%s ", rtnl_rtntype_n2a(r->rtm_type, b1, sizeof(b1))); 199 printf("%s ", rtnl_rtntype_n2a(r->rtm_type, b1, sizeof(b1)));
201 } 200 }
202 201
203 if (tb[RTA_DST]) { 202 if (tb[RTA_DST]) {
204 if (r->rtm_dst_len != host_len) { 203 if (r->rtm_dst_len != host_len) {
205 fprintf(fp, "%s/%u ", rt_addr_n2a(r->rtm_family, 204 printf("%s/%u ", rt_addr_n2a(r->rtm_family,
206 RTA_PAYLOAD(tb[RTA_DST]), 205 RTA_PAYLOAD(tb[RTA_DST]),
207 RTA_DATA(tb[RTA_DST]), 206 RTA_DATA(tb[RTA_DST]),
208 abuf, sizeof(abuf)), 207 abuf, sizeof(abuf)),
209 r->rtm_dst_len 208 r->rtm_dst_len
210 ); 209 );
211 } else { 210 } else {
212 fprintf(fp, "%s ", format_host(r->rtm_family, 211 printf("%s ", format_host(r->rtm_family,
213 RTA_PAYLOAD(tb[RTA_DST]), 212 RTA_PAYLOAD(tb[RTA_DST]),
214 RTA_DATA(tb[RTA_DST]), 213 RTA_DATA(tb[RTA_DST]),
215 abuf, sizeof(abuf)) 214 abuf, sizeof(abuf))
216 ); 215 );
217 } 216 }
218 } else if (r->rtm_dst_len) { 217 } else if (r->rtm_dst_len) {
219 fprintf(fp, "0/%d ", r->rtm_dst_len); 218 printf("0/%d ", r->rtm_dst_len);
220 } else { 219 } else {
221 fprintf(fp, "default "); 220 printf("default ");
222 } 221 }
223 if (tb[RTA_SRC]) { 222 if (tb[RTA_SRC]) {
224 if (r->rtm_src_len != host_len) { 223 if (r->rtm_src_len != host_len) {
225 fprintf(fp, "from %s/%u ", rt_addr_n2a(r->rtm_family, 224 printf("from %s/%u ", rt_addr_n2a(r->rtm_family,
226 RTA_PAYLOAD(tb[RTA_SRC]), 225 RTA_PAYLOAD(tb[RTA_SRC]),
227 RTA_DATA(tb[RTA_SRC]), 226 RTA_DATA(tb[RTA_SRC]),
228 abuf, sizeof(abuf)), 227 abuf, sizeof(abuf)),
229 r->rtm_src_len 228 r->rtm_src_len
230 ); 229 );
231 } else { 230 } else {
232 fprintf(fp, "from %s ", format_host(r->rtm_family, 231 printf("from %s ", format_host(r->rtm_family,
233 RTA_PAYLOAD(tb[RTA_SRC]), 232 RTA_PAYLOAD(tb[RTA_SRC]),
234 RTA_DATA(tb[RTA_SRC]), 233 RTA_DATA(tb[RTA_SRC]),
235 abuf, sizeof(abuf)) 234 abuf, sizeof(abuf))
236 ); 235 );
237 } 236 }
238 } else if (r->rtm_src_len) { 237 } else if (r->rtm_src_len) {
239 fprintf(fp, "from 0/%u ", r->rtm_src_len); 238 printf("from 0/%u ", r->rtm_src_len);
240 } 239 }
241 if (tb[RTA_GATEWAY] && filter.rvia.bitlen != host_len) { 240 if (tb[RTA_GATEWAY] && filter.rvia.bitlen != host_len) {
242 fprintf(fp, "via %s ", 241 printf("via %s ", format_host(r->rtm_family,
243 format_host(r->rtm_family, 242 RTA_PAYLOAD(tb[RTA_GATEWAY]),
244 RTA_PAYLOAD(tb[RTA_GATEWAY]), 243 RTA_DATA(tb[RTA_GATEWAY]),
245 RTA_DATA(tb[RTA_GATEWAY]), 244 abuf, sizeof(abuf)));
246 abuf, sizeof(abuf)));
247 } 245 }
248 if (tb[RTA_OIF] && filter.oifmask != -1) { 246 if (tb[RTA_OIF] && filter.oifmask != -1) {
249 fprintf(fp, "dev %s ", ll_index_to_name(*(int*)RTA_DATA(tb[RTA_OIF]))); 247 printf("dev %s ", ll_index_to_name(*(int*)RTA_DATA(tb[RTA_OIF])));
250 } 248 }
251 249
252 if (tb[RTA_PREFSRC] && filter.rprefsrc.bitlen != host_len) { 250 if (tb[RTA_PREFSRC] && filter.rprefsrc.bitlen != host_len) {
253 /* Do not use format_host(). It is our local addr 251 /* Do not use format_host(). It is our local addr
254 and symbolic name will not be useful. 252 and symbolic name will not be useful.
255 */ 253 */
256 fprintf(fp, " src %s ", 254 printf(" src %s ", rt_addr_n2a(r->rtm_family,
257 rt_addr_n2a(r->rtm_family, 255 RTA_PAYLOAD(tb[RTA_PREFSRC]),
258 RTA_PAYLOAD(tb[RTA_PREFSRC]), 256 RTA_DATA(tb[RTA_PREFSRC]),
259 RTA_DATA(tb[RTA_PREFSRC]), 257 abuf, sizeof(abuf)));
260 abuf, sizeof(abuf)));
261 } 258 }
262 if (tb[RTA_PRIORITY]) { 259 if (tb[RTA_PRIORITY]) {
263 fprintf(fp, " metric %d ", *(uint32_t*)RTA_DATA(tb[RTA_PRIORITY])); 260 printf(" metric %d ", *(uint32_t*)RTA_DATA(tb[RTA_PRIORITY]));
264 } 261 }
265 if (r->rtm_family == AF_INET6) { 262 if (r->rtm_family == AF_INET6) {
266 struct rta_cacheinfo *ci = NULL; 263 struct rta_cacheinfo *ci = NULL;
@@ -269,24 +266,23 @@ static int print_route(const struct sockaddr_nl *who ATTRIBUTE_UNUSED,
269 } 266 }
270 if ((r->rtm_flags & RTM_F_CLONED) || (ci && ci->rta_expires)) { 267 if ((r->rtm_flags & RTM_F_CLONED) || (ci && ci->rta_expires)) {
271 if (r->rtm_flags & RTM_F_CLONED) { 268 if (r->rtm_flags & RTM_F_CLONED) {
272 fprintf(fp, "%c cache ", _SL_); 269 printf("%c cache ", _SL_);
273 } 270 }
274 if (ci->rta_expires) { 271 if (ci->rta_expires) {
275 fprintf(fp, " expires %dsec", ci->rta_expires / get_hz()); 272 printf(" expires %dsec", ci->rta_expires / get_hz());
276 } 273 }
277 if (ci->rta_error != 0) { 274 if (ci->rta_error != 0) {
278 fprintf(fp, " error %d", ci->rta_error); 275 printf(" error %d", ci->rta_error);
279 } 276 }
280 } else if (ci) { 277 } else if (ci) {
281 if (ci->rta_error != 0) 278 if (ci->rta_error != 0)
282 fprintf(fp, " error %d", ci->rta_error); 279 printf(" error %d", ci->rta_error);
283 } 280 }
284 } 281 }
285 if (tb[RTA_IIF] && filter.iifmask != -1) { 282 if (tb[RTA_IIF] && filter.iifmask != -1) {
286 fprintf(fp, " iif %s", ll_index_to_name(*(int*)RTA_DATA(tb[RTA_IIF]))); 283 printf(" iif %s", ll_index_to_name(*(int*)RTA_DATA(tb[RTA_IIF])));
287 } 284 }
288 fputc('\n', fp); 285 bb_putchar('\n');
289 fflush(fp);
290 return 0; 286 return 0;
291} 287}
292 288
@@ -328,11 +324,13 @@ USE_FEATURE_IP_RULE(ARG_table,)
328 memset(&req, 0, sizeof(req)); 324 memset(&req, 0, sizeof(req));
329 325
330 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtmsg)); 326 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtmsg));
331 req.n.nlmsg_flags = NLM_F_REQUEST|flags; 327 req.n.nlmsg_flags = NLM_F_REQUEST | flags;
332 req.n.nlmsg_type = cmd; 328 req.n.nlmsg_type = cmd;
333 req.r.rtm_family = preferred_family; 329 req.r.rtm_family = preferred_family;
334 req.r.rtm_table = RT_TABLE_MAIN; 330 if (RT_TABLE_MAIN) /* if it is zero, memset already did it */
335 req.r.rtm_scope = RT_SCOPE_NOWHERE; 331 req.r.rtm_table = RT_TABLE_MAIN;
332 if (RT_SCOPE_NOWHERE)
333 req.r.rtm_scope = RT_SCOPE_NOWHERE;
336 334
337 if (cmd != RTM_DELROUTE) { 335 if (cmd != RTM_DELROUTE) {
338 req.r.rtm_protocol = RTPROT_BOOT; 336 req.r.rtm_protocol = RTPROT_BOOT;
@@ -476,12 +474,15 @@ static int rtnl_rtcache_request(struct rtnl_handle *rth, int family)
476 nladdr.nl_family = AF_NETLINK; 474 nladdr.nl_family = AF_NETLINK;
477 475
478 req.nlh.nlmsg_len = sizeof(req); 476 req.nlh.nlmsg_len = sizeof(req);
479 req.nlh.nlmsg_type = RTM_GETROUTE; 477 if (RTM_GETROUTE)
480 req.nlh.nlmsg_flags = NLM_F_ROOT|NLM_F_REQUEST; 478 req.nlh.nlmsg_type = RTM_GETROUTE;
481 req.nlh.nlmsg_pid = 0; 479 if (NLM_F_ROOT | NLM_F_REQUEST)
480 req.nlh.nlmsg_flags = NLM_F_ROOT | NLM_F_REQUEST;
481 /*req.nlh.nlmsg_pid = 0; - memset did it already */
482 req.nlh.nlmsg_seq = rth->dump = ++rth->seq; 482 req.nlh.nlmsg_seq = rth->dump = ++rth->seq;
483 req.rtm.rtm_family = family; 483 req.rtm.rtm_family = family;
484 req.rtm.rtm_flags |= RTM_F_CLONED; 484 if (RTM_F_CLONED)
485 req.rtm.rtm_flags = RTM_F_CLONED;
485 486
486 return xsendto(rth->fd, (void*)&req, sizeof(req), (struct sockaddr*)&nladdr, sizeof(nladdr)); 487 return xsendto(rth->fd, (void*)&req, sizeof(req), (struct sockaddr*)&nladdr, sizeof(nladdr));
487} 488}
@@ -667,7 +668,7 @@ static int iproute_list_or_flush(char **argv, int flush)
667 for (;;) { 668 for (;;) {
668 xrtnl_wilddump_request(&rth, do_ipv6, RTM_GETROUTE); 669 xrtnl_wilddump_request(&rth, do_ipv6, RTM_GETROUTE);
669 filter.flushed = 0; 670 filter.flushed = 0;
670 xrtnl_dump_filter(&rth, print_route, stdout); 671 xrtnl_dump_filter(&rth, print_route, NULL);
671 if (filter.flushed == 0) 672 if (filter.flushed == 0)
672 return 0; 673 return 0;
673 if (flush_update()) 674 if (flush_update())
@@ -680,7 +681,7 @@ static int iproute_list_or_flush(char **argv, int flush)
680 } else if (rtnl_rtcache_request(&rth, do_ipv6) < 0) { 681 } else if (rtnl_rtcache_request(&rth, do_ipv6) < 0) {
681 bb_perror_msg_and_die("cannot send dump request"); 682 bb_perror_msg_and_die("cannot send dump request");
682 } 683 }
683 xrtnl_dump_filter(&rth, print_route, stdout); 684 xrtnl_dump_filter(&rth, print_route, NULL);
684 685
685 return 0; 686 return 0;
686} 687}
@@ -707,16 +708,18 @@ static int iproute_get(char **argv)
707 iproute_reset_filter(); 708 iproute_reset_filter();
708 709
709 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtmsg)); 710 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtmsg));
710 req.n.nlmsg_flags = NLM_F_REQUEST; 711 if (NLM_F_REQUEST)
711 req.n.nlmsg_type = RTM_GETROUTE; 712 req.n.nlmsg_flags = NLM_F_REQUEST;
713 if (RTM_GETROUTE)
714 req.n.nlmsg_type = RTM_GETROUTE;
712 req.r.rtm_family = preferred_family; 715 req.r.rtm_family = preferred_family;
713 req.r.rtm_table = 0; 716 /*req.r.rtm_table = 0; - memset did this already */
714 req.r.rtm_protocol = 0; 717 /*req.r.rtm_protocol = 0;*/
715 req.r.rtm_scope = 0; 718 /*req.r.rtm_scope = 0;*/
716 req.r.rtm_type = 0; 719 /*req.r.rtm_type = 0;*/
717 req.r.rtm_src_len = 0; 720 /*req.r.rtm_src_len = 0;*/
718 req.r.rtm_dst_len = 0; 721 /*req.r.rtm_dst_len = 0;*/
719 req.r.rtm_tos = 0; 722 /*req.r.rtm_tos = 0;*/
720 723
721 while (*argv) { 724 while (*argv) {
722 switch (index_in_strings(options, *argv)) { 725 switch (index_in_strings(options, *argv)) {
@@ -802,7 +805,7 @@ static int iproute_get(char **argv)
802 int len = req.n.nlmsg_len; 805 int len = req.n.nlmsg_len;
803 struct rtattr * tb[RTA_MAX+1]; 806 struct rtattr * tb[RTA_MAX+1];
804 807
805 print_route(NULL, &req.n, (void*)stdout); 808 print_route(NULL, &req.n, NULL);
806 809
807 if (req.n.nlmsg_type != RTM_NEWROUTE) { 810 if (req.n.nlmsg_type != RTM_NEWROUTE) {
808 bb_error_msg_and_die("not a route?"); 811 bb_error_msg_and_die("not a route?");
@@ -837,7 +840,7 @@ static int iproute_get(char **argv)
837 return 2; 840 return 2;
838 } 841 }
839 } 842 }
840 print_route(NULL, &req.n, (void*)stdout); 843 print_route(NULL, &req.n, NULL);
841 return 0; 844 return 0;
842} 845}
843 846
diff --git a/networking/libiproute/libnetlink.c b/networking/libiproute/libnetlink.c
index 4511d36fa..6b599d91c 100644
--- a/networking/libiproute/libnetlink.c
+++ b/networking/libiproute/libnetlink.c
@@ -17,12 +17,12 @@
17#include "libbb.h" 17#include "libbb.h"
18#include "libnetlink.h" 18#include "libnetlink.h"
19 19
20void rtnl_close(struct rtnl_handle *rth) 20void FAST_FUNC rtnl_close(struct rtnl_handle *rth)
21{ 21{
22 close(rth->fd); 22 close(rth->fd);
23} 23}
24 24
25int xrtnl_open(struct rtnl_handle *rth/*, unsigned subscriptions*/) 25int FAST_FUNC xrtnl_open(struct rtnl_handle *rth/*, unsigned subscriptions*/)
26{ 26{
27 socklen_t addr_len; 27 socklen_t addr_len;
28 28
@@ -46,7 +46,7 @@ int xrtnl_open(struct rtnl_handle *rth/*, unsigned subscriptions*/)
46 return 0; 46 return 0;
47} 47}
48 48
49int xrtnl_wilddump_request(struct rtnl_handle *rth, int family, int type) 49int FAST_FUNC xrtnl_wilddump_request(struct rtnl_handle *rth, int family, int type)
50{ 50{
51 struct { 51 struct {
52 struct nlmsghdr nlh; 52 struct nlmsghdr nlh;
@@ -68,7 +68,7 @@ int xrtnl_wilddump_request(struct rtnl_handle *rth, int family, int type)
68 (struct sockaddr*)&nladdr, sizeof(nladdr)); 68 (struct sockaddr*)&nladdr, sizeof(nladdr));
69} 69}
70 70
71int rtnl_send(struct rtnl_handle *rth, char *buf, int len) 71int FAST_FUNC rtnl_send(struct rtnl_handle *rth, char *buf, int len)
72{ 72{
73 struct sockaddr_nl nladdr; 73 struct sockaddr_nl nladdr;
74 74
@@ -78,7 +78,7 @@ int rtnl_send(struct rtnl_handle *rth, char *buf, int len)
78 return xsendto(rth->fd, buf, len, (struct sockaddr*)&nladdr, sizeof(nladdr)); 78 return xsendto(rth->fd, buf, len, (struct sockaddr*)&nladdr, sizeof(nladdr));
79} 79}
80 80
81int rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, int len) 81int FAST_FUNC rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, int len)
82{ 82{
83 struct nlmsghdr nlh; 83 struct nlmsghdr nlh;
84 struct sockaddr_nl nladdr; 84 struct sockaddr_nl nladdr;
@@ -194,7 +194,7 @@ static int rtnl_dump_filter(struct rtnl_handle *rth,
194 return retval; 194 return retval;
195} 195}
196 196
197int xrtnl_dump_filter(struct rtnl_handle *rth, 197int FAST_FUNC xrtnl_dump_filter(struct rtnl_handle *rth,
198 int (*filter)(const struct sockaddr_nl *, struct nlmsghdr *, void *), 198 int (*filter)(const struct sockaddr_nl *, struct nlmsghdr *, void *),
199 void *arg1) 199 void *arg1)
200{ 200{
@@ -204,7 +204,7 @@ int xrtnl_dump_filter(struct rtnl_handle *rth,
204 return ret; 204 return ret;
205} 205}
206 206
207int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, 207int FAST_FUNC rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n,
208 pid_t peer, unsigned groups, 208 pid_t peer, unsigned groups,
209 struct nlmsghdr *answer, 209 struct nlmsghdr *answer,
210 int (*junk)(struct sockaddr_nl *, struct nlmsghdr *, void *), 210 int (*junk)(struct sockaddr_nl *, struct nlmsghdr *, void *),
@@ -332,7 +332,7 @@ int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n,
332 return retval; 332 return retval;
333} 333}
334 334
335int addattr32(struct nlmsghdr *n, int maxlen, int type, uint32_t data) 335int FAST_FUNC addattr32(struct nlmsghdr *n, int maxlen, int type, uint32_t data)
336{ 336{
337 int len = RTA_LENGTH(4); 337 int len = RTA_LENGTH(4);
338 struct rtattr *rta; 338 struct rtattr *rta;
@@ -346,7 +346,7 @@ int addattr32(struct nlmsghdr *n, int maxlen, int type, uint32_t data)
346 return 0; 346 return 0;
347} 347}
348 348
349int addattr_l(struct nlmsghdr *n, int maxlen, int type, void *data, int alen) 349int FAST_FUNC addattr_l(struct nlmsghdr *n, int maxlen, int type, void *data, int alen)
350{ 350{
351 int len = RTA_LENGTH(alen); 351 int len = RTA_LENGTH(alen);
352 struct rtattr *rta; 352 struct rtattr *rta;
@@ -361,7 +361,7 @@ int addattr_l(struct nlmsghdr *n, int maxlen, int type, void *data, int alen)
361 return 0; 361 return 0;
362} 362}
363 363
364int rta_addattr32(struct rtattr *rta, int maxlen, int type, uint32_t data) 364int FAST_FUNC rta_addattr32(struct rtattr *rta, int maxlen, int type, uint32_t data)
365{ 365{
366 int len = RTA_LENGTH(4); 366 int len = RTA_LENGTH(4);
367 struct rtattr *subrta; 367 struct rtattr *subrta;
@@ -377,7 +377,7 @@ int rta_addattr32(struct rtattr *rta, int maxlen, int type, uint32_t data)
377 return 0; 377 return 0;
378} 378}
379 379
380int rta_addattr_l(struct rtattr *rta, int maxlen, int type, void *data, int alen) 380int FAST_FUNC rta_addattr_l(struct rtattr *rta, int maxlen, int type, void *data, int alen)
381{ 381{
382 struct rtattr *subrta; 382 struct rtattr *subrta;
383 int len = RTA_LENGTH(alen); 383 int len = RTA_LENGTH(alen);
@@ -394,7 +394,7 @@ int rta_addattr_l(struct rtattr *rta, int maxlen, int type, void *data, int alen
394} 394}
395 395
396 396
397int parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len) 397int FAST_FUNC parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len)
398{ 398{
399 while (RTA_OK(rta, len)) { 399 while (RTA_OK(rta, len)) {
400 if (rta->rta_type <= max) { 400 if (rta->rta_type <= max) {
diff --git a/networking/libiproute/libnetlink.h b/networking/libiproute/libnetlink.h
index 6c1a88129..079153b92 100644
--- a/networking/libiproute/libnetlink.h
+++ b/networking/libiproute/libnetlink.h
@@ -22,13 +22,13 @@ struct rtnl_handle
22 uint32_t dump; 22 uint32_t dump;
23}; 23};
24 24
25extern int xrtnl_open(struct rtnl_handle *rth); 25extern int xrtnl_open(struct rtnl_handle *rth) FAST_FUNC;
26extern void rtnl_close(struct rtnl_handle *rth); 26extern void rtnl_close(struct rtnl_handle *rth) FAST_FUNC;
27extern int xrtnl_wilddump_request(struct rtnl_handle *rth, int fam, int type); 27extern int xrtnl_wilddump_request(struct rtnl_handle *rth, int fam, int type) FAST_FUNC;
28extern int rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, int len); 28extern int rtnl_dump_request(struct rtnl_handle *rth, int type, void *req, int len) FAST_FUNC;
29extern int xrtnl_dump_filter(struct rtnl_handle *rth, 29extern int xrtnl_dump_filter(struct rtnl_handle *rth,
30 int (*filter)(const struct sockaddr_nl*, struct nlmsghdr *n, void*), 30 int (*filter)(const struct sockaddr_nl*, struct nlmsghdr *n, void*),
31 void *arg1); 31 void *arg1) FAST_FUNC;
32 32
33/* bbox doesn't use parameters no. 3, 4, 6, 7, stub them out */ 33/* bbox doesn't use parameters no. 3, 4, 6, 7, stub them out */
34#define rtnl_talk(rtnl, n, peer, groups, answer, junk, jarg) \ 34#define rtnl_talk(rtnl, n, peer, groups, answer, junk, jarg) \
@@ -36,17 +36,17 @@ extern int xrtnl_dump_filter(struct rtnl_handle *rth,
36extern int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, pid_t peer, 36extern int rtnl_talk(struct rtnl_handle *rtnl, struct nlmsghdr *n, pid_t peer,
37 unsigned groups, struct nlmsghdr *answer, 37 unsigned groups, struct nlmsghdr *answer,
38 int (*junk)(struct sockaddr_nl *,struct nlmsghdr *n, void *), 38 int (*junk)(struct sockaddr_nl *,struct nlmsghdr *n, void *),
39 void *jarg); 39 void *jarg) FAST_FUNC;
40 40
41extern int rtnl_send(struct rtnl_handle *rth, char *buf, int); 41extern int rtnl_send(struct rtnl_handle *rth, char *buf, int) FAST_FUNC;
42 42
43 43
44extern int addattr32(struct nlmsghdr *n, int maxlen, int type, uint32_t data); 44extern int addattr32(struct nlmsghdr *n, int maxlen, int type, uint32_t data) FAST_FUNC;
45extern int addattr_l(struct nlmsghdr *n, int maxlen, int type, void *data, int alen); 45extern int addattr_l(struct nlmsghdr *n, int maxlen, int type, void *data, int alen) FAST_FUNC;
46extern int rta_addattr32(struct rtattr *rta, int maxlen, int type, uint32_t data); 46extern int rta_addattr32(struct rtattr *rta, int maxlen, int type, uint32_t data) FAST_FUNC;
47extern int rta_addattr_l(struct rtattr *rta, int maxlen, int type, void *data, int alen); 47extern int rta_addattr_l(struct rtattr *rta, int maxlen, int type, void *data, int alen) FAST_FUNC;
48 48
49extern int parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len); 49extern int parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len) FAST_FUNC;
50 50
51#if __GNUC_PREREQ(4,1) 51#if __GNUC_PREREQ(4,1)
52# pragma GCC visibility pop 52# pragma GCC visibility pop