Lines Matching refs:xb
701 struct xfrm_buffer *xb = (struct xfrm_buffer *)arg; in xfrm_policy_keep() local
702 struct rtnl_handle *rth = xb->rth; in xfrm_policy_keep()
742 if (xb->offset + NLMSG_LENGTH(sizeof(*xpid)) > xb->size) in xfrm_policy_keep()
745 new_n = (struct nlmsghdr *)(xb->buf + xb->offset); in xfrm_policy_keep()
757 int r = addattr_l(new_n, xb->size, XFRMA_MARK, in xfrm_policy_keep()
765 xb->offset += new_n->nlmsg_len; in xfrm_policy_keep()
766 xb->nlmsg_count++; in xfrm_policy_keep()
846 struct xfrm_buffer xb; in xfrm_policy_list_or_deleteall() local
850 xb.buf = buf; in xfrm_policy_list_or_deleteall()
851 xb.size = sizeof(buf); in xfrm_policy_list_or_deleteall()
852 xb.rth = &rth; in xfrm_policy_list_or_deleteall()
865 xb.offset = 0; in xfrm_policy_list_or_deleteall()
866 xb.nlmsg_count = 0; in xfrm_policy_list_or_deleteall()
876 if (rtnl_dump_filter(&rth, xfrm_policy_keep, &xb) < 0) { in xfrm_policy_list_or_deleteall()
880 if (xb.nlmsg_count == 0) { in xfrm_policy_list_or_deleteall()
886 if (rtnl_send_check(&rth, xb.buf, xb.offset) < 0) { in xfrm_policy_list_or_deleteall()
891 fprintf(stderr, "Delete-all nlmsg count = %d\n", xb.nlmsg_count); in xfrm_policy_list_or_deleteall()
893 xb.offset = 0; in xfrm_policy_list_or_deleteall()
894 xb.nlmsg_count = 0; in xfrm_policy_list_or_deleteall()