irods  4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

hostname_resolves_to_local_address.cpp
Go to the documentation of this file.
1 #include <iostream>
2 
3 #include "irods_exception.hpp"
4 #include "irods_hostname.hpp"
5 
6 int main(int argc, char** argv) {
7  if (argc != 2) {
8  std::cerr << "Call with hostname argument" << std::endl;
9  return -1;
10  }
11 
12  try {
13  const bool hostname_is_local = hostname_resolves_to_local_address(argv[1]);
14  if (hostname_is_local) {
15  std::cout << "yes" << std::endl;
16  return 0;
17  } else {
18  std::cout << "no" << std::endl;
19  return 1;
20  }
21  } catch ( const irods::exception& e ) {
22  std::cerr << e.what() << std::endl;
23  }
24  return -1;
25 }
irods_exception.hpp
irods_hostname.hpp
main
int main(int argc, char **argv)
Definition: hostname_resolves_to_local_address.cpp:6
terminate_irods_processes.e
e
Definition: terminate_irods_processes.py:19
hostname_resolves_to_local_address
bool hostname_resolves_to_local_address(const char *hostname)
Definition: irods_hostname.cpp:196
irods::exception
Definition: irods_exception.hpp:15