+/* SPDX-License-Identifier: GPL-2.0 */
/*
* f_tcindex.c Traffic control index filter
*
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-#include <syslog.h>
#include <fcntl.h>
#include <string.h>
#include <netinet/in.h>
}
}
if (!argc) return 0;
- tail = NLMSG_TAIL(n);
- addattr_l(n, 4096, TCA_OPTIONS, NULL, 0);
+ tail = addattr_nest(n, 4096, TCA_OPTIONS);
while (argc) {
if (!strcmp(*argv, "hash")) {
int hash;
argc--;
argv++;
}
- tail->rta_len = (void *) NLMSG_TAIL(n) - (void *) tail;
+ addattr_nest_end(n, tail);
return 0;
}