*/
#include "ip_common.h" /* #include "libbb.h" is inside */
+#include "common_bufsiz.h"
#include "rt_names.h"
#include "utils.h"
#include <linux/neighbour.h>
} FIX_ALIASING;
typedef struct filter_t filter_t;
-#define G_filter (*(filter_t*)&bb_common_bufsiz1)
+#define G_filter (*(filter_t*)bb_common_bufsiz1)
+#define INIT_G() do { setup_common_bufsiz(); } while (0)
static int flush_update(void)
{
"stale\0" "incomplete\0" "delay\0" "probe\0"
"failed\0"
;
- static uint8_t nuds[] = {
+ static uint8_t nuds[] ALIGN1 = {
NUD_PERMANENT,NUD_REACHABLE, NUD_NOARP,NUD_NONE,
NUD_STALE, NUD_INCOMPLETE,NUD_DELAY,NUD_PROBE,
NUD_FAILED
struct ndmsg *r = NLMSG_DATA(n);
int len = n->nlmsg_len;
struct rtattr *tb[NDA_MAX+1];
- char abuf[256];
if (n->nlmsg_type != RTM_NEWNEIGH && n->nlmsg_type != RTM_DELNEIGH) {
bb_error_msg_and_die("not RTM_NEWNEIGH: %08x %08x %08x",
printf("%s ",
format_host(r->ndm_family,
RTA_PAYLOAD(tb[NDA_DST]),
- RTA_DATA(tb[NDA_DST]),
- abuf, sizeof(abuf)));
+ RTA_DATA(tb[NDA_DST]))
+ );
}
if (!G_filter.index && r->ndm_ifindex)
printf("dev %s ", ll_index_to_name(r->ndm_ifindex));
/*0-1*/ "show\0" "flush\0";
int command_num;
+ INIT_G();
+
if (!*argv)
return ipneigh_list_or_flush(argv, 0);