#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-#include <syslog.h>
#include <fcntl.h>
#include <sys/socket.h>
#include <netinet/in.h>
#endif
static void explain(void)
{
- fprintf(stderr, "Usage:... simple [sdata STRING] [CONTROL] [index INDEX]\n");
- fprintf(stderr, "\tSTRING being an arbitrary string\n"
- "\tCONTROL := reclassify|pipe|drop|continue|ok\n"
- "\tINDEX := optional index value used\n");
+ fprintf(stderr,
+ "Usage:... simple [sdata STRING] [index INDEX] [CONTROL]\n"
+ "\tSTRING being an arbitrary string\n"
+ "\tINDEX := optional index value used\n"
+ "\tCONTROL := reclassify|pipe|drop|continue|ok\n");
}
static void usage(void)
sel.action = TC_ACT_PIPE;
- tail = NLMSG_TAIL(n);
- addattr_l(n, MAX_MSG, tca_id, NULL, 0);
+ tail = addattr_nest(n, MAX_MSG, tca_id);
addattr_l(n, MAX_MSG, TCA_DEF_PARMS, &sel, sizeof(sel));
if (simpdata)
addattr_l(n, MAX_MSG, TCA_DEF_DATA, simpdata, SIMP_MAX_DATA);
- tail->rta_len = (char *)NLMSG_TAIL(n) - (char *)tail;
+ addattr_nest_end(n, tail);
*argc_p = argc;
*argv_p = argv;