* Martin Schrvder <mar...@oneiros.de> [2011-02-02 16:45]:
> 2011/2/2 Henning Brauer <lists-open...@bsws.de>:
> > * Martin Schrvder <mar...@oneiros.de> [2011-02-02 15:06]:
> >> Unless you are an ISP with more than 2^24 customers.
> > you are talking bullshit. there is oh so much v4 space allocated that
> Currently an ISP with more then 2^24 customers can't NAT them all
> (as 10/8 has only 2^24 addresses) or has to allocate more than one
> /8 for his customers, which makes routing etc. more difficult.

you are talking bullshit, still.

who sez that your made up isp has to hand out network-wide unique IPs
to his customers?

why do i even waste time on some ipvshit advocate that acts like a
politician claiming we have to eat shit because there wouldn't be an
alternative, making up a case out of nothing to "prove" his case?

> > as if one incompetent isp mattered.
> I'm sure most chinese and indian ISPs will agree.

you sure know what you're talking about, that's obvious.


look at the oh so bright future yourself, look at the code required to
deal with that misdesigned piece of shit.
did i just say "designed"? sorry. it's obvious that nothing remotely
related to design was involved.

u_int8_t
mask2prefixlen(in_addr_t ina)
{
        if (ina == 0)
                return (0);
        else
                return (33 - ffs(ntohl(ina)));
}

u_int8_t
mask2prefixlen6(struct sockaddr_in6 *sa_in6)
{
        u_int8_t         l = 0, *ap, *ep;

        /*
         * sin6_len is the size of the sockaddr so substract the offset of
         * the possibly truncated sin6_addr struct.
         */
        ap = (u_int8_t *)&sa_in6->sin6_addr;
        ep = (u_int8_t *)sa_in6 + sa_in6->sin6_len;
        for (; ap < ep; ap++) {
                /* this "beauty" is adopted from sbin/route/show.c ... */
                switch (*ap) {
                case 0xff:
                        l += 8;
                        break;
                case 0xfe:
                        l += 7;
                        return (l);
                case 0xfc:
                        l += 6;
                        return (l);
                case 0xf8:
                        l += 5;
                        return (l);
                case 0xf0:
                        l += 4;
                        return (l);
                case 0xe0:
                        l += 3;
                        return (l);
                case 0xc0:
                        l += 2;
                        return (l);
                case 0x80:
                        l += 1;
                        return (l);
                case 0x00:
                        return (l);
                default:
                        fatalx("non continguous inet6 netmask");
                }
        }

        return (l);
}


-- 
Henning Brauer, h...@bsws.de, henn...@openbsd.org
BS Web Services, http://bsws.de
Full-Service ISP - Secure Hosting, Mail and DNS Services
Dedicated Servers, Rootservers, Application Hosting

Reply via email to