FreeBSD/sys/netipsec/key.c
/* Take a lifetime message (sadb_lifetime) passed in on a socket and
 * turn it into one of the kernel's lifetime structures (seclifetime).
 *
 * IN: pointer to the destination, source and malloc type
 * OUT: NULL, no more memory
 */
Take a lifetime message (sadb_lifetime) passed in on a socket and
turn it into one of the kernel's lifetime structures (seclifetime).

pointer to the destination, source and malloc type
OUT: NULL, no more memory
Take a lifetime message ( sadb_lifetime ) passed in on a socket and turn it into one of the kernel ' s lifetime structures ( seclifetime ) . pointer to the destination source and malloc type OUT : NULL no more memory
static struct seclifetime *
key_dup_lifemsg(const struct sadb_lifetime *src, struct malloc_type *type)
{
	struct seclifetime *dst = NULL;
	dst = (struct seclifetime *)malloc(sizeof(struct seclifetime), 
					   type, M_NOWAIT);
	if (dst == NULL) {
		ipseclog((LOG_DEBUG, "%s: No more memory.\n", __func__));
	} else {
		dst->allocations = src->sadb_lifetime_allocations;
		dst->bytes = src->sadb_lifetime_bytes;
		dst->addtime = src->sadb_lifetime_addtime;
		dst->usetime = src->sadb_lifetime_usetime;
	}
	return dst;
}
static struct seclifetime * key_dup_lifemsg ( const struct sadb_lifetime * src , struct malloc_type * type ) { struct seclifetime * dst = NULL ; dst = ( struct seclifetime * ) malloc ( sizeof ( struct seclifetime ) , type , M_NOWAIT ) ; if ( dst == NULL ) { ipseclog ( ( LOG_DEBUG , " \n " , __func__ ) ) ; } else { dst -> allocations = src -> sadb_lifetime_allocations ; dst -> bytes = src -> sadb_lifetime_bytes ; dst -> addtime = src -> sadb_lifetime_addtime ; dst -> usetime = src -> sadb_lifetime_usetime ; } return dst ; }
Take a lifetime message (sadb_lifetime) passed in on a socket and
 turn it into one of the kernel's lifetime structures (seclifetime).
Take a lifetime message ( sadb_lifetime ) passed in on a socket and turn it into one of the kernel ' s lifetime structures ( seclifetime ) .
/* XXX counter */