Query: hostname
OS: debian
Section: 3bobcat
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
FBB::Hostname(3bobcat) Host Info FBB::Hostname(3bobcat)NAMEFBB::Hostname - Contains name/address info about a hostSYNOPSIS#include <bobcat/hostname> Linking option: -lbobcatDESCRIPTIONFBB::Hostname objects inherit from Hostent, and offers information about a host, like Hostent. Apart from being initialized by a hostname or host address, they can also be initialized by a FBB::InetAddress object. Most of the functionality of an FBB::Hostname object is avail- able through its parent-class FBB::Hostent.NAMESPACEFBB All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB.INHERITS FROMFBB::HostentCONSTRUCTORSo Hostname(): The default constructor initializes an empty FBB::Hostname object. o Hostname((std::string const &host)): This constructor initializes an FBB::Hostname object from a string representing the name or dotted decimal address of a host. An FBB::Errno object is thrown if the hostname information could not be retrieved. o Hostname(InetAddress const &inetAddress): This constructor initializes an FBB::Hostname object from an InetAddress object. An FBB::Errno object is thrown if the hostname information could not be retrieved. The copy constructor is available.MEMBER FUNCTIONSAll members of FBB::Hostent are available, as FBB::Hostname inherits from this class. There are no additional members.EXAMPLE#include <iostream> #include <bobcat/hostname> #include <bobcat/errno> using namespace std; using namespace FBB; int main(int argc, char **argv) { while (true) { cout << "Enter name or address: "; string str; if (!getline(cin, str)) return 0; if (str == "") break; try { Hostname h(str); cout << "Official name: "; cout << h.hostname() << endl; cout << "Aliases: "; for (size_t idx = 0; idx < h.nAliases(); idx++) cout << h.alias(idx) << " "; cout << endl; cout << "Adresses: "; for (size_t idx = 0; idx < h.nAddresses(); idx++) cout << h.dottedDecimalAddress(idx) << " "; cout << endl; } catch (Errno const &err) { cout << err.why() << endl; } } return 0; }FILESbobcat/hostname - defines the class interfaceSEE ALSObobcat(7), hostent(3bobcat)BUGSNone Reported.DISTRIBUTION FILESo bobcat_3.01.00-x.dsc: detached signature; o bobcat_3.01.00-x.tar.gz: source archive; o bobcat_3.01.00-x_i386.changes: change log; o libbobcat1_3.01.00-x_*.deb: debian package holding the libraries; o libbobcat1-dev_3.01.00-x_*.deb: debian package holding the libraries, headers and manual pages; o http://sourceforge.net/projects/bobcat: public archive location;BOBCATBobcat is an acronym of `Brokken's Own Base Classes And Templates'.COPYRIGHTThis is free software, distributed under the terms of the GNU General Public License (GPL).AUTHORFrank B. Brokken (f.b.brokken@rug.nl). libbobcat1-dev_3.01.00-x.tar.gz 2005-2012 FBB::Hostname(3bobcat)
Related Man Pages |
---|
clientsocket(3bobcat) - debian |
randbuffer(3bobcat) - debian |
clientsocket(3bobcat) - centos |
clientsocket(3bobcat) - suse |
level(3bobcat) - linux |
Similar Topics in the Unix Linux Community |
---|
Change IP and Hostname |
g++ is OK while gcc is failed |
What is difference between "endl" and "\n"? |
Hostname - System Name |
"cout = outFile" is not compiled |