FreeBSD/sys/mips/atheros/ar71xx_macaddr.c
/*
 * Initialise a random MAC address for use by if_arge.c and whatever
 * else requires it.
 *
 * Returns 0 on success, -1 on error.
 */
Initialise a random MAC address for use by if_arge.c and whatever
else requires it.

Returns 0 on success, -1 on error.
Initialise a random MAC address for use by if_arge . c and whatever else requires it . Returns 0 on success - 1 on error .
int
ar71xx_mac_addr_random_init(unsigned char *dst)
{
	uint32_t rnd;
	rnd = arc4random();
	dst[0] = 'b';
	dst[1] = 's';
	dst[2] = 'd';
	dst[3] = (rnd >> 24) & 0xff;
	dst[4] = (rnd >> 16) & 0xff;
	dst[5] = (rnd >> 8) & 0xff;
	return (0);
}
int ar71xx_mac_addr_random_init ( unsigned char * dst ) { uint32_t rnd ; rnd = arc4random ( ) ; dst [ 0 ] = ' ' ; dst [ 1 ] = ' ' ; dst [ 2 ] = ' ' ; dst [ 3 ] = ( rnd >> 24 ) & 0xff ; dst [ 4 ] = ( rnd >> 16 ) & 0xff ; dst [ 5 ] = ( rnd >> 8 ) & 0xff ; return ( 0 ) ; }
Initialise a random MAC address for use by if_arge.c and whatever
 else requires it.
Initialise a random MAC address for use by if_arge . c and whatever else requires it .