X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Foping.h;h=50d11fbb08870077d0ee21004480af6aa2a55809;hb=7950f924afbd902b506bbaedfc5f7f1bce6eacc9;hp=b17e65920773985a0c232fdb0fe38a32b98b1658;hpb=84580c555c427875c6ae193ef2d09a156b9e0ef7;p=liboping.git diff --git a/src/oping.h b/src/oping.h index b17e659..50d11fb 100644 --- a/src/oping.h +++ b/src/oping.h @@ -1,20 +1,20 @@ /** * Object oriented C module to send ICMP and ICMPv6 `echo's. - * Copyright (C) 2006 Florian octo Forster + * Copyright (C) 2006-2016 Florian octo Forster * - * 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; only version 2 of the License is - * applicable. - * - * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * This library is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * This library 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 Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef OCTO_PING_H @@ -24,23 +24,17 @@ # include #endif -#if HAVE_STDLIB_H -# include -#endif -#if HAVE_UNISTD_H -# include -#endif -#if HAVE_SYS_TYPES_H -# include -#endif -#if HAVE_SYS_SOCKET_H -# include -#endif +#include +#include +#include +#include #ifdef __cplusplus extern "C" { #endif +#define OPING_VERSION 1009000 + /* * Type definitions */ @@ -57,11 +51,14 @@ typedef struct pingobj pingobj_t; #define PING_OPT_AF 0x04 #define PING_OPT_DATA 0x08 #define PING_OPT_SOURCE 0x10 +#define PING_OPT_DEVICE 0x20 +#define PING_OPT_QOS 0x40 +#define PING_OPT_MARK 0x80 #define PING_DEF_TIMEOUT 1.0 #define PING_DEF_TTL 255 #define PING_DEF_AF AF_UNSPEC -#define PING_DEF_DATA "Florian Forster http://verplant.org/" +#define PING_DEF_DATA "liboping -- ICMP ping library " /* * Method definitions @@ -78,14 +75,19 @@ int ping_host_remove (pingobj_t *obj, const char *host); pingobj_iter_t *ping_iterator_get (pingobj_t *obj); pingobj_iter_t *ping_iterator_next (pingobj_iter_t *iter); - -#define PING_INFO_HOSTNAME 1 -#define PING_INFO_ADDRESS 2 -#define PING_INFO_FAMILY 3 -#define PING_INFO_LATENCY 4 -#define PING_INFO_SEQUENCE 5 -#define PING_INFO_IDENT 6 -#define PING_INFO_DATA 7 +int ping_iterator_count (pingobj_t *obj); + +#define PING_INFO_HOSTNAME 1 +#define PING_INFO_ADDRESS 2 +#define PING_INFO_FAMILY 3 +#define PING_INFO_LATENCY 4 +#define PING_INFO_SEQUENCE 5 +#define PING_INFO_IDENT 6 +#define PING_INFO_DATA 7 +#define PING_INFO_USERNAME 8 +#define PING_INFO_DROPPED 9 +#define PING_INFO_RECV_TTL 10 +#define PING_INFO_RECV_QOS 11 int ping_iterator_get_info (pingobj_iter_t *iter, int info, void *buffer, size_t *buffer_len);