Logo Search packages:      
Sourcecode: wvstreams version File versions

WvString encode_hostname_as_DN ( WvStringParm  hostname  ) 

Example: encode_hostname_as_DN("www.fizzle.com") will result in dc=www,dc=fizzle,dc=com,cn=www.fizzle.com

Definition at line 422 of file strutils.cc.

References WvString::append(), encode_hostname_as_DN(), and WvStringList::split().

Referenced by encode_hostname_as_DN().

    WvString dn("");
    WvStringList fqdnlist;
    WvStringList::Iter i(fqdnlist);
    fqdnlist.split(hostname, ".");
    for (i.rewind(); i.next(); )
      dn.append("dc=%s,", *i);
    dn.append("cn=%s", hostname);
    return dn;

Generated by  Doxygen 1.6.0   Back to index