Solved

How determine "Fully Qualified Domain Name" from domain name?

Posted on 2004-08-06
3
305 Views
Last Modified: 2013-12-19
Hello

How can I determine "Fully Qualified Domain Name" from domain name using Windows API?

Thanks.
0
Comment
Question by:wajszle
3 Comments
 
LVL 37

Accepted Solution

by:
Bing CISM / CISSP earned 125 total points
ID: 11737733
// Check if <<name>> is a fully qualified domain name
//
// Returns |true| if the name contains at least one dot and other
// characters around that dot.

bool
HostInfo::isfqdn (const char *name)
{
    bool seendot = false;
    bool seenpre = false;
    bool seenpost = false;

    for ( ; name && *name && !seenpost; ++name)
        if (! seendot && *name != '.')
            seenpre = true;
        else if (seenpre && *name == '.')
            seendot = true;
        else if (seendot && *name != '.')
            seenpost = true;

    return seenpost;
}
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

FIPS stands for the Federal Information Processing Standardisation and FIPS 140-2 is a collection of standards that are generically associated with hardware and software cryptography. In most cases, people can refer to this as the method of encrypti…
A common practice in small networks is making file sharing easy which works extremely well when intra-network security is not an issue. In essence, everyone, that is "Everyone", is given access to all of the shared files - often the entire C: drive …
A short film showing how OnPage and Connectwise integration works.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now