Lines Matching refs:buf
157 xb_init_buffer(struct xdrbuf *xbp, char *buf, size_t buflen)
160 xbp->xb_u.xb_buffer.xbb_base = buf;
164 xbp->xb_ptr = buf;
166 if (buf) /* when using an existing buffer, xb code should skip cleanup */
271 void *buf = NULL;
274 MALLOC(buf, void *, size, M_TEMP, M_WAITOK);
276 buf = malloc(size);
278 return (buf);
284 xb_free(void *buf)
287 FREE(buf, M_TEMP);
289 free(buf);
327 * Add "count" bytes of opaque data pointed to by "buf" to the given XDR buffer.
330 xb_add_bytes(struct xdrbuf *xbp, const char *buf, uint32_t count, int nopad)
351 bcopy(buf, xbp->xb_ptr, tlen);
359 buf += tlen;
373 xb_get_bytes(struct xdrbuf *xbp, char *buf, uint32_t count, int nopad)
388 bcopy(xbp->xb_ptr, buf, tlen);
394 buf += tlen;