Lines Matching refs:maxlen

523 int addattr(struct nlmsghdr *n, int maxlen, int type)
525 return addattr_l(n, maxlen, type, NULL, 0);
528 int addattr8(struct nlmsghdr *n, int maxlen, int type, __u8 data)
530 return addattr_l(n, maxlen, type, &data, sizeof(__u8));
533 int addattr16(struct nlmsghdr *n, int maxlen, int type, __u16 data)
535 return addattr_l(n, maxlen, type, &data, sizeof(__u16));
538 int addattr32(struct nlmsghdr *n, int maxlen, int type, __u32 data)
540 return addattr_l(n, maxlen, type, &data, sizeof(__u32));
543 int addattr64(struct nlmsghdr *n, int maxlen, int type, __u64 data)
545 return addattr_l(n, maxlen, type, &data, sizeof(__u64));
548 int addattrstrz(struct nlmsghdr *n, int maxlen, int type, const char *str)
550 return addattr_l(n, maxlen, type, str, strlen(str)+1);
553 int addattr_l(struct nlmsghdr *n, int maxlen, int type, const void *data,
559 if (NLMSG_ALIGN(n->nlmsg_len) + RTA_ALIGN(len) > maxlen) {
560 fprintf(stderr, "addattr_l ERROR: message exceeded bound of %d\n",maxlen);
571 int addraw_l(struct nlmsghdr *n, int maxlen, const void *data, int len)
573 if (NLMSG_ALIGN(n->nlmsg_len) + NLMSG_ALIGN(len) > maxlen) {
574 fprintf(stderr, "addraw_l ERROR: message exceeded bound of %d\n",maxlen);
584 struct rtattr *addattr_nest(struct nlmsghdr *n, int maxlen, int type)
588 addattr_l(n, maxlen, type, NULL, 0);
598 struct rtattr *addattr_nest_compat(struct nlmsghdr *n, int maxlen, int type,
603 addattr_l(n, maxlen, type, data, len);
604 addattr_nest(n, maxlen, type);
617 int rta_addattr32(struct rtattr *rta, int maxlen, int type, __u32 data)
622 if (RTA_ALIGN(rta->rta_len) + len > maxlen) {
623 fprintf(stderr,"rta_addattr32: Error! max allowed bound %d exceeded\n",maxlen);
634 int rta_addattr_l(struct rtattr *rta, int maxlen, int type,
640 if (RTA_ALIGN(rta->rta_len) + RTA_ALIGN(len) > maxlen) {
641 fprintf(stderr,"rta_addattr_l: Error! max allowed bound %d exceeded\n",maxlen);