Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-08-06
3
Medium Priority
?
316 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 500 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Downtime reduced, data recovered by utilizing an Experts Exchange Business Account Challenge The United States Marine Corps employs more than 200,000 active-duty Marines with operations in four continents, all requiring complex networking system…
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

926 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