FreeBSD/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptc.c
/**************************************************************
 * SNMP BITS type - XXX: FIXME
 **************************************************************/
SNMP BITS type - XXX: FIXME
SNMP BITS type - XXX : FIXME
static char *
snmp_oct2bits(uint32_t len, char *octets, char *buf)
{
	int i, bits;
	uint64_t value;
	if (len > sizeof(value) || octets == NULL || buf == NULL)
		return (NULL);
	for (i = len, value = 0, bits = 0; i > 0; i--, bits += 8)
		value += octets[i] << bits;
	buf[0]= '\0';
	sprintf(buf, "0x%llx.",(long long unsigned) value);
	return (buf);
}
static char * snmp_oct2bits ( uint32_t len , char * octets , char * buf ) { int i , bits ; uint64_t value ; if ( len > sizeof ( value ) || octets == NULL || buf == NULL ) return ( NULL ) ; for ( i = len , value = 0 , bits = 0 ; i > 0 ; i -- , bits += 8 ) value += octets [ i ] << bits ; buf [ 0 ] = ' \0 ' ; sprintf ( buf , " " , ( long long unsigned ) value ) ; return ( buf ) ; }
SNMP BITS type - XXX: FIXME
SNMP BITS type - XXX : FIXME