Solved

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

Posted on 2004-08-06
3
306 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:
bbao 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

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 …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

778 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