sbin/atm/atm/atm_subr.c
const char *
format_mac_addr(Mac_addr *addr)
{
	static char	str[256];

	/*
	 * Check for null pointer
	 */
	if (!addr)
		return("-");

	/*
	 * Clear the returned string
	 */
	UM_ZERO(str, sizeof(str));

	/*
	 * Format the address
	 */
	sprintf(str, "%02x:%02x:%02x:%02x:%02x:%02x",
			addr->ma_data[0],
			addr->ma_data[1],
			addr->ma_data[2],
			addr->ma_data[3],
			addr->ma_data[4],
			addr->ma_data[5]);

	return(str);
}
/*
 * Format a MAC address into a string
 * 
 * Arguments:
 *	addr	pointer to a MAC address
 *
 * Returns:
 *		the address of a string representing the MAC address
 *
 */
Format a MAC address into a string

addr    pointer to a MAC address

the address of a string representing the MAC address
Format a MAC address into a string addr pointer to a MAC address the address of a string representing the MAC address
const char *
format_mac_addr(Mac_addr *addr)
{
	static char	str[256];
	if (!addr)
		return("-");
	UM_ZERO(str, sizeof(str));
	sprintf(str, "%02x:%02x:%02x:%02x:%02x:%02x",
			addr->ma_data[0],
			addr->ma_data[1],
			addr->ma_data[2],
			addr->ma_data[3],
			addr->ma_data[4],
			addr->ma_data[5]);
	return(str);
}
const char * format_mac_addr ( Mac_addr * addr ) { static char str [ 256 ] ; if ( ! addr ) return ( " " ) ; UM_ZERO ( str , sizeof ( str ) ) ; sprintf ( str , " " , addr -> ma_data [ 0 ] , addr -> ma_data [ 1 ] , addr -> ma_data [ 2 ] , addr -> ma_data [ 3 ] , addr -> ma_data [ 4 ] , addr -> ma_data [ 5 ] ) ; return ( str ) ; }
Format a MAC address into a string
Format a MAC address into a string
/*
	 * Check for null pointer
	 */ /*
	 * Clear the returned string
	 */ /*
	 * Format the address
	 */