Lines Matching refs:maxlen
335 struct nlmsghdr *answer, size_t maxlen) in rtnl_talk() argument
418 MIN(maxlen, h->nlmsg_len)); in rtnl_talk()
432 MIN(maxlen, h->nlmsg_len)); in rtnl_talk()
620 int addattr(struct nlmsghdr *n, int maxlen, int type) in addattr() argument
622 return addattr_l(n, maxlen, type, NULL, 0); in addattr()
625 int addattr8(struct nlmsghdr *n, int maxlen, int type, __u8 data) in addattr8() argument
627 return addattr_l(n, maxlen, type, &data, sizeof(__u8)); in addattr8()
630 int addattr16(struct nlmsghdr *n, int maxlen, int type, __u16 data) in addattr16() argument
632 return addattr_l(n, maxlen, type, &data, sizeof(__u16)); in addattr16()
635 int addattr32(struct nlmsghdr *n, int maxlen, int type, __u32 data) in addattr32() argument
637 return addattr_l(n, maxlen, type, &data, sizeof(__u32)); in addattr32()
640 int addattr64(struct nlmsghdr *n, int maxlen, int type, __u64 data) in addattr64() argument
642 return addattr_l(n, maxlen, type, &data, sizeof(__u64)); in addattr64()
645 int addattrstrz(struct nlmsghdr *n, int maxlen, int type, const char *str) in addattrstrz() argument
647 return addattr_l(n, maxlen, type, str, strlen(str)+1); in addattrstrz()
650 int addattr_l(struct nlmsghdr *n, int maxlen, int type, const void *data, in addattr_l() argument
656 if (NLMSG_ALIGN(n->nlmsg_len) + RTA_ALIGN(len) > maxlen) { in addattr_l()
657 fprintf(stderr, "addattr_l ERROR: message exceeded bound of %d\n",maxlen); in addattr_l()
668 int addraw_l(struct nlmsghdr *n, int maxlen, const void *data, int len) in addraw_l() argument
670 if (NLMSG_ALIGN(n->nlmsg_len) + NLMSG_ALIGN(len) > maxlen) { in addraw_l()
671 fprintf(stderr, "addraw_l ERROR: message exceeded bound of %d\n",maxlen); in addraw_l()
681 struct rtattr *addattr_nest(struct nlmsghdr *n, int maxlen, int type) in addattr_nest() argument
685 addattr_l(n, maxlen, type, NULL, 0); in addattr_nest()
695 struct rtattr *addattr_nest_compat(struct nlmsghdr *n, int maxlen, int type, in addattr_nest_compat() argument
700 addattr_l(n, maxlen, type, data, len); in addattr_nest_compat()
701 addattr_nest(n, maxlen, type); in addattr_nest_compat()
714 int rta_addattr32(struct rtattr *rta, int maxlen, int type, __u32 data) in rta_addattr32() argument
719 if (RTA_ALIGN(rta->rta_len) + len > maxlen) { in rta_addattr32()
720 fprintf(stderr,"rta_addattr32: Error! max allowed bound %d exceeded\n",maxlen); in rta_addattr32()
731 int rta_addattr_l(struct rtattr *rta, int maxlen, int type, in rta_addattr_l() argument
737 if (RTA_ALIGN(rta->rta_len) + RTA_ALIGN(len) > maxlen) { in rta_addattr_l()
738 fprintf(stderr,"rta_addattr_l: Error! max allowed bound %d exceeded\n",maxlen); in rta_addattr_l()
749 int rta_addattr8(struct rtattr *rta, int maxlen, int type, __u8 data) in rta_addattr8() argument
751 return rta_addattr_l(rta, maxlen, type, &data, sizeof(__u8)); in rta_addattr8()
754 int rta_addattr16(struct rtattr *rta, int maxlen, int type, __u16 data) in rta_addattr16() argument
756 return rta_addattr_l(rta, maxlen, type, &data, sizeof(__u16)); in rta_addattr16()
759 int rta_addattr64(struct rtattr *rta, int maxlen, int type, __u64 data) in rta_addattr64() argument
761 return rta_addattr_l(rta, maxlen, type, &data, sizeof(__u64)); in rta_addattr64()
764 struct rtattr *rta_nest(struct rtattr *rta, int maxlen, int type) in rta_nest() argument
768 rta_addattr_l(rta, maxlen, type, NULL, 0); in rta_nest()