"Fossies" - the Fresh Open Source Software Archive

Member "rbldnsd-0.998/dns_dnlen.c" (14 Mar 2013, 292 Bytes) of package /linux/misc/dns/rbldnsd-0.998.tar.gz:

As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "dns_dnlen.c" see the Fossies "Dox" file reference documentation.

    1 /* dns_dnlen(): return length of a domain name (with trailing
    2  * zero, as it is an integral part of DN)
    3  */
    5 #include "dns.h"
    7 unsigned dns_dnlen(register const unsigned char *dn) {
    8   register unsigned c;
    9   const unsigned char *d = dn;
   10   while((c = *d++) != 0)
   11     d += c;
   12   return d - dn;
   13 }