Lines Matching refs:xb
1086 struct xfrm_buffer *xb = (struct xfrm_buffer *)arg; in xfrm_state_keep() local
1087 struct rtnl_handle *rth = xb->rth; in xfrm_state_keep()
1109 if (xb->offset > xb->size) { in xfrm_state_keep()
1114 new_n = (struct nlmsghdr *)(xb->buf + xb->offset); in xfrm_state_keep()
1126 addattr_l(new_n, xb->size, XFRMA_SRCADDR, &xsinfo->saddr, in xfrm_state_keep()
1132 int r = addattr_l(new_n, xb->size, XFRMA_MARK, in xfrm_state_keep()
1140 xb->offset += new_n->nlmsg_len; in xfrm_state_keep()
1141 xb->nlmsg_count++; in xfrm_state_keep()
1192 struct xfrm_buffer xb; in xfrm_state_list_or_deleteall() local
1196 xb.buf = buf; in xfrm_state_list_or_deleteall()
1197 xb.size = sizeof(buf); in xfrm_state_list_or_deleteall()
1198 xb.rth = &rth; in xfrm_state_list_or_deleteall()
1211 xb.offset = 0; in xfrm_state_list_or_deleteall()
1212 xb.nlmsg_count = 0; in xfrm_state_list_or_deleteall()
1222 if (rtnl_dump_filter(&rth, xfrm_state_keep, &xb) < 0) { in xfrm_state_list_or_deleteall()
1226 if (xb.nlmsg_count == 0) { in xfrm_state_list_or_deleteall()
1232 if (rtnl_send_check(&rth, xb.buf, xb.offset) < 0) { in xfrm_state_list_or_deleteall()
1237 fprintf(stderr, "Delete-all nlmsg count = %d\n", xb.nlmsg_count); in xfrm_state_list_or_deleteall()
1239 xb.offset = 0; in xfrm_state_list_or_deleteall()
1240 xb.nlmsg_count = 0; in xfrm_state_list_or_deleteall()