mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 17:01:15 +02:00
our current experimental Neutrino branch
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@27 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
86
src/system/ping.h
Normal file
86
src/system/ping.h
Normal file
@@ -0,0 +1,86 @@
|
||||
/**
|
||||
* PING header
|
||||
*
|
||||
* Copyright (C) 2001 Jeffrey Fulmer <jdfulmer@armstrong.com>
|
||||
* 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 <stdio.h>
|
||||
|
||||
#include "ping-config.h"
|
||||
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif/*HAVE_UNISTD_H*/
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif/*HAVE_STDLIB_H*/
|
||||
|
||||
#ifdef HAVE_SYS_TIMES_H
|
||||
# include <sys/times.h>
|
||||
#endif /*HAVE_SYS_TIMES_H*/
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif /*TIME_WITH_SYS_TIME*/
|
||||
|
||||
#include <string.h>
|
||||
#include <netinet/in_systm.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif/*HAVE_SYS_SOCKET_H*/
|
||||
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
# include <arpa/inet.h>
|
||||
#endif/*HAVE_ARPA_INET_H*/
|
||||
|
||||
#ifdef HAVE_NETDB_H
|
||||
# include <netdb.h>
|
||||
#endif/*HAVE_NETDB_H*/
|
||||
|
||||
#if defined( __linux__ )
|
||||
# include "ping-linux.h"
|
||||
#else
|
||||
# include <netinet/ip.h>
|
||||
# include <netinet/ip_icmp.h>
|
||||
#endif /* defined(__linux__) */
|
||||
|
||||
int send_ping( const char *host, struct sockaddr_in *taddr );
|
||||
int recv_ping( struct sockaddr_in *taddr );
|
||||
|
||||
int pinghost ( const char *hostname );
|
||||
int pingthost ( const char *hostname, int t );
|
||||
int tpinghost ( const char *hostname );
|
||||
int tpingthost( const char *hostname, int t );
|
||||
|
||||
|
||||
#endif/*PING_H*/
|
Reference in New Issue
Block a user