xnu-4903.241.1/bsd/security/audit/audit_bsm_token.c
/*
 * token ID                1 byte
 * address type/length     4 bytes
 * address                16 bytes
 */
token ID                1 byte
address type/length     4 bytes
address                16 bytes
token ID 1 byte address type / length 4 bytes address 16 bytes
token_t *
au_to_in_addr_ex(struct in6_addr *internet_addr)
{
	token_t *t;
	u_char *dptr = NULL;
	u_int32_t type = AU_IPv6;
	GET_TOKEN_AREA(t, dptr, sizeof(u_char) + 5 * sizeof(uint32_t));
	ADD_U_CHAR(dptr, AUT_IN_ADDR_EX);
	ADD_U_INT32(dptr, type);
	ADD_MEM(dptr, internet_addr, 4 * sizeof(uint32_t));
	return (t);
}
token_t * au_to_in_addr_ex ( struct in6_addr * internet_addr ) { token_t * t ; u_char * dptr = NULL ; u_int32_t type = AU_IPv6 ; GET_TOKEN_AREA ( t , dptr , sizeof ( u_char ) + 5 * sizeof ( uint32_t ) ) ; ADD_U_CHAR ( dptr , AUT_IN_ADDR_EX ) ; ADD_U_INT32 ( dptr , type ) ; ADD_MEM ( dptr , internet_addr , 4 * sizeof ( uint32_t ) ) ; return ( t ) ; }
token ID                1 byte
 address type/length     4 bytes
 address                16 bytes
token ID 1 byte address type / length 4 bytes address 16 bytes