bid
bid();
void bid(void);
struct iked_id *aid = NULL, *bid = NULL;
bid = sa_dstid_checked(b);
if (aid == NULL || bid == NULL)
if (aid->id_type > bid->id_type)
else if (aid->id_type < bid->id_type)
blen = ibuf_size(bid->id_buf);
bptr = ibuf_data(bid->id_buf);
if (alen <= aid->id_offset || blen <= bid->id_offset)
bptr += bid->id_offset;
blen -= bid->id_offset;
uint32_t bid;
if (ibuf_get_n32(msg, &bid) == -1 ||
bitmap_set(struct bitmap *map, uint32_t bid)
elm = bid / BITMAP_BITS;
if (bid == 0) {
bid %= BITMAP_BITS;
ptr[elm] |= (1ULL << bid);
bitmap_test(struct bitmap *map, uint32_t bid)
elm = bid / BITMAP_BITS;
if (elm >= max || bid == 0)
bid %= BITMAP_BITS;
return (ptr[elm] & (1ULL << bid)) != 0;
bitmap_clear(struct bitmap *map, uint32_t bid)
elm = bid / BITMAP_BITS;
if (elm >= max || bid == 0)
bid %= BITMAP_BITS;
ptr[elm] &= ~(1ULL << bid);
bitmap_id_get(struct bitmap *map, uint32_t *bid)
*bid = elm * BITMAP_BITS + ffsll(m) - 1;
if (bitmap_set(map, *bid) == -1)
*bid = max * BITMAP_BITS;
if (bitmap_set(map, *bid) == -1)
bitmap_id_put(struct bitmap *map, uint32_t bid)
bitmap_clear(map, bid);
uint32_t bid, void *ptr)
uint32_t bid;
bid = peer->adjout_bid;
if (bid == 0)
pte, bid);
bid, p)) {
pte, p, bid, ctx);
for (p = adjout_prefix_first(pte, bid);
p = adjout_prefix_next(pte, bid,
bid, ctx);
uint32_t bid, void *ptr)
adjout_prefix_first(struct pt_entry *pte, uint32_t bid)
if (bitmap_test(&p->peermap, bid))
adjout_prefix_next(struct pt_entry *pte, uint32_t bid,
if (bitmap_test(&p->peermap, bid))
uint32_t bid, void *ptr)
uint32_t bid, void *ptr)