/** * PING header * * Copyright (C) 2001 Jeffrey Fulmer * This file is part of LIBPING * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #ifndef PING_H #define PING_H #include #include #include "ping-config.h" #ifdef HAVE_UNISTD_H # include #endif/*HAVE_UNISTD_H*/ #ifdef HAVE_STDLIB_H # include #endif/*HAVE_STDLIB_H*/ #ifdef HAVE_SYS_TIMES_H # include #endif /*HAVE_SYS_TIMES_H*/ #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif /*TIME_WITH_SYS_TIME*/ #include #include #include #ifdef HAVE_SYS_SOCKET_H # include #endif/*HAVE_SYS_SOCKET_H*/ #ifdef HAVE_ARPA_INET_H # include #endif/*HAVE_ARPA_INET_H*/ #ifdef HAVE_NETDB_H # include #endif/*HAVE_NETDB_H*/ #if defined( __linux__ ) # include "ping-linux.h" #else # include # include #endif /* defined(__linux__) */ //int send_ping( const char *host, struct sockaddr_in *taddr ); //int recv_ping( struct sockaddr_in *taddr ); int pinghost (const std::string &hostname, std::string *ip = NULL); int pingthost (const std::string &hostname, int t ); int tpinghost (const std::string &hostname ); int tpingthost(const std::string &hostname, int t ); #endif/*PING_H*/