Go to the documentation of this file.
17 int main(
int argc,
char* argv[])
26 JParser<> zap(
"Example program to print IP address.");
28 zap[
'H'] =
make_field(host_name) =
"localhost";
32 catch(
const exception &error) {
33 FATAL(error.what() << endl);
39 cout <<
"IP number " << ip << endl;
51 cout <<
"IP address " << *i << endl;
unsigned short getSubaddress(const int ip)
Get host identifier within network.
int main(int argc, char *argv[])
Utility class to parse command line options.
std::string getIPaddress(const int ip)
Get IP address (decimal-dot notation).
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
std::string getHostname()
Get host name.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
int getIPnumber(const std::string &host_name)
Get IP number.
std::vector< std::string > getListOfIPaddresses()
Get list of IP address (decimal-dot notation).