Lines Matching refs:wb
288 clr_ws_buf(struct ws_buf *wb, struct auth *ap) in clr_ws_buf() argument
292 wb->lim = wb->base + NETS_LEN; in clr_ws_buf()
293 wb->n = wb->base; in clr_ws_buf()
294 (void) memset(wb->n, 0, NETS_LEN*sizeof (*wb->n)); in clr_ws_buf()
302 na = (struct netauth *)wb->n; in clr_ws_buf()
307 wb->n++; in clr_ws_buf()
315 wb->n++; in clr_ws_buf()
316 wb->lim--; /* make room for trailer */ in clr_ws_buf()
322 end_md5_auth(struct ws_buf *wb, struct auth *ap) in end_md5_auth() argument
328 na = (struct netauth *)wb->base; in end_md5_auth()
329 na2 = (struct netauth *)wb->n; in end_md5_auth()
330 len = (char *)na2-(char *)wb->buf; in end_md5_auth()
336 MD5Update(&md5_ctx, (uchar_t *)wb->buf, len + 4); in end_md5_auth()
339 wb->n++; in end_md5_auth()
347 supply_write(struct ws_buf *wb) in supply_write() argument
354 switch (wb->type) { in supply_write()
363 end_md5_auth(wb, ws.a); in supply_write()
364 if (output(wb->type, &ws.to, ws.ifp, wb->buf, in supply_write()
365 ((char *)wb->n - (char *)wb->buf)) < 0 && ws.ifp != NULL) in supply_write()
371 clr_ws_buf(wb, ws.a); in supply_write()
383 struct ws_buf *wb; in supply_out() local
410 wb = &v2buf; in supply_out()
416 wb = &v12buf; in supply_out()
449 wb->n->n_family = RIP_AF_INET; in supply_out()
450 wb->n->n_dst = htonl(dst_h); in supply_out()
456 wb->n->n_metric = ((stopint || ag->ag_metric < 1 || in supply_out()
459 wb->n->n_metric = htonl(wb->n->n_metric); in supply_out()
474 wb->n->n_nhop = ag->ag_nhop; in supply_out()
475 wb->n->n_mask = htonl(mask); in supply_out()
476 wb->n->n_tag = ag->ag_tag; in supply_out()
480 if (++wb->n >= wb->lim) in supply_out()
481 supply_write(wb); in supply_out()