FreeBSD/sys/nlm/nlm_prot_impl.c
/*
 * Create a netobj from an arbitrary source.
 */
Create a netobj from an arbitrary source.
Create a netobj from an arbitrary source .
void
nlm_make_netobj(struct netobj *dst, caddr_t src, size_t srcsize,
    struct malloc_type *type)
{
	dst->n_len = srcsize;
	dst->n_bytes = malloc(srcsize, type, M_WAITOK);
	memcpy(dst->n_bytes, src, srcsize);
}
void nlm_make_netobj ( struct netobj * dst , caddr_t src , size_t srcsize , struct malloc_type * type ) { dst -> n_len = srcsize ; dst -> n_bytes = malloc ( srcsize , type , M_WAITOK ) ; memcpy ( dst -> n_bytes , src , srcsize ) ; }
Create a netobj from an arbitrary source.
Create a netobj from an arbitrary source .