Lines Matching refs:xb
652 struct xfrm_buffer *xb = (struct xfrm_buffer *)arg; in xfrm_policy_keep() local
653 struct rtnl_handle *rth = xb->rth; in xfrm_policy_keep()
689 if (xb->offset > xb->size) { in xfrm_policy_keep()
694 new_n = (struct nlmsghdr *)(xb->buf + xb->offset); in xfrm_policy_keep()
705 xb->offset += new_n->nlmsg_len; in xfrm_policy_keep()
706 xb->nlmsg_count ++; in xfrm_policy_keep()
783 struct xfrm_buffer xb; in xfrm_policy_list_or_deleteall() local
787 xb.buf = buf; in xfrm_policy_list_or_deleteall()
788 xb.size = sizeof(buf); in xfrm_policy_list_or_deleteall()
789 xb.rth = &rth; in xfrm_policy_list_or_deleteall()
792 xb.offset = 0; in xfrm_policy_list_or_deleteall()
793 xb.nlmsg_count = 0; in xfrm_policy_list_or_deleteall()
803 if (rtnl_dump_filter(&rth, xfrm_policy_keep, &xb, NULL, NULL) < 0) { in xfrm_policy_list_or_deleteall()
807 if (xb.nlmsg_count == 0) { in xfrm_policy_list_or_deleteall()
813 if (rtnl_send_check(&rth, xb.buf, xb.offset) < 0) { in xfrm_policy_list_or_deleteall()
818 fprintf(stderr, "Delete-all nlmsg count = %d\n", xb.nlmsg_count); in xfrm_policy_list_or_deleteall()
820 xb.offset = 0; in xfrm_policy_list_or_deleteall()
821 xb.nlmsg_count = 0; in xfrm_policy_list_or_deleteall()