FreeBSD/sys/security/audit/bsm_token.c
/*
 * token ID                1 byte
 * internet address        4 bytes
 */
token ID                1 byte
internet address        4 bytes
token ID 1 byte internet address 4 bytes
token_t *
au_to_in_addr(struct in_addr *internet_addr)
{
	token_t *t;
	u_char *dptr = NULL;
	GET_TOKEN_AREA(t, dptr, sizeof(u_char) + sizeof(uint32_t));
	ADD_U_CHAR(dptr, AUT_IN_ADDR);
	ADD_MEM(dptr, &internet_addr->s_addr, sizeof(uint32_t));
	return (t);
}
token_t * au_to_in_addr ( struct in_addr * internet_addr ) { token_t * t ; u_char * dptr = NULL ; GET_TOKEN_AREA ( t , dptr , sizeof ( u_char ) + sizeof ( uint32_t ) ) ; ADD_U_CHAR ( dptr , AUT_IN_ADDR ) ; ADD_MEM ( dptr , & internet_addr -> s_addr , sizeof ( uint32_t ) ) ; return ( t ) ; }
token ID                1 byte
 internet address        4 bytes
token ID 1 byte internet address 4 bytes