diff --git a/src/oping.h b/src/oping.h
index 061aa5d41ebc646c8a517b94ecf227d99b70608a..276c3db66d1c7fe80dd94f64d889b3a8928bdaed 100644 (file)
--- a/src/oping.h
+++ b/src/oping.h
/**
* Object oriented C module to send ICMP and ICMPv6 `echo's.
- * Copyright (C) 2006 Florian octo Forster <octo at verplant.org>
+ * Copyright (C) 2006-2009 Florian octo Forster <octo at verplant.org>
*
* 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
# include <config.h>
#endif
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-#if HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#ifdef __cplusplus
+extern "C" {
#endif
+#define OPING_VERSION 1003003
+
/*
* Type definitions
*/
#define PING_OPT_AF 0x04
#define PING_OPT_DATA 0x08
#define PING_OPT_SOURCE 0x10
+#define PING_OPT_DEVICE 0x20
#define PING_DEF_TIMEOUT 1.0
#define PING_DEF_TTL 255
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
+#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
int ping_iterator_get_info (pingobj_iter_t *iter, int info,
void *buffer, size_t *buffer_len);
void *ping_iterator_get_context (pingobj_iter_t *iter);
void ping_iterator_set_context (pingobj_iter_t *iter, void *context);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* OCTO_PING_H */