getbits
bits = getbits(src, ipv6);
bits = getbits(src, 1);
static int getbits(const char *, int ipv6);