FreeBSD/sys/xdr/xdr_mbuf.c
/*
 * The procedure xdrmbuf_create initializes a stream descriptor for a
 * mbuf.
 */
The procedure xdrmbuf_create initializes a stream descriptor for a
mbuf.
The procedure xdrmbuf_create initializes a stream descriptor for a mbuf .
void
xdrmbuf_create(XDR *xdrs, struct mbuf *m, enum xdr_op op)
{
	KASSERT(m != NULL, ("xdrmbuf_create with NULL mbuf chain"));
	xdrs->x_op = op;
	xdrs->x_ops = &xdrmbuf_ops;
	xdrs->x_base = (char *) m;
	if (op == XDR_ENCODE) {
		m = m_last(m);
		xdrs->x_private = m;
		xdrs->x_handy = m->m_len;
	} else {
		xdrs->x_private = m;
		xdrs->x_handy = 0;
	}
}
void xdrmbuf_create ( XDR * xdrs , struct mbuf * m , enum xdr_op op ) { KASSERT ( m != NULL , ( " " ) ) ; xdrs -> x_op = op ; xdrs -> x_ops = & xdrmbuf_ops ; xdrs -> x_base = ( char * ) m ; if ( op == XDR_ENCODE ) { m = m_last ( m ) ; xdrs -> x_private = m ; xdrs -> x_handy = m -> m_len ; } else { xdrs -> x_private = m ; xdrs -> x_handy = 0 ; } }
The procedure xdrmbuf_create initializes a stream descriptor for a
 mbuf.
The procedure xdrmbuf_create initializes a stream descriptor for a mbuf .