if (argc == 0)
return 0;
- tail = (struct rtattr*)(((void*)n)+NLMSG_ALIGN(n->nlmsg_len));
+ tail = NLMSG_TAIL(n);
addattr_l(n, 4096, TCA_OPTIONS, NULL, 0);
while (argc > 0) {
}
argc--; argv++;
}
- tail->rta_len = (((void*)n)+n->nlmsg_len) - (void*)tail;
+ tail->rta_len = (void *) NLMSG_TAIL(n) - (void *) tail;
return 0;
}
lss.change = TCF_CBQ_LSS_MAXIDLE|TCF_CBQ_LSS_EWMA|TCF_CBQ_LSS_AVPKT;
lss.avpkt = avpkt;
- tail = (struct rtattr*)(((void*)n)+NLMSG_ALIGN(n->nlmsg_len));
+ tail = NLMSG_TAIL(n);
addattr_l(n, 1024, TCA_OPTIONS, NULL, 0);
addattr_l(n, 1024, TCA_CBQ_RATE, &r, sizeof(r));
addattr_l(n, 1024, TCA_CBQ_LSSOPT, &lss, sizeof(lss));
printf("%u ", rtab[i]);
printf("\n");
}
- tail->rta_len = (((void*)n)+NLMSG_ALIGN(n->nlmsg_len)) - (void*)tail;
+ tail->rta_len = (void *) NLMSG_TAIL(n) - (void *) tail;
return 0;
}
lss.change |= TCF_CBQ_LSS_EWMA;
}
- tail = (struct rtattr*)(((void*)n)+NLMSG_ALIGN(n->nlmsg_len));
+ tail = NLMSG_TAIL(n);
addattr_l(n, 1024, TCA_OPTIONS, NULL, 0);
if (lss.change) {
lss.change |= TCF_CBQ_LSS_FLAGS;
printf("\n");
}
}
- tail->rta_len = (((void*)n)+NLMSG_ALIGN(n->nlmsg_len)) - (void*)tail;
+ tail->rta_len = (void *) NLMSG_TAIL(n) - (void *) tail;
return 0;
}