Format code

This commit is contained in:
Nick Peng
2018-12-28 23:26:24 +08:00
parent 7ab837b980
commit 9e4ac50ee8
8 changed files with 54 additions and 58 deletions

View File

@@ -1,8 +1,8 @@
#ifndef FAST_PING_H
#define FAST_PING_H
#include <sys/time.h>
#include <netdb.h>
#include <sys/time.h>
#ifdef __cpluscplus
extern "C" {
#endif
@@ -20,7 +20,8 @@ typedef enum {
} FAST_PING_RESULT;
struct ping_host_struct;
typedef void (*fast_ping_result)(struct ping_host_struct *ping_host, const char *host, FAST_PING_RESULT result, struct sockaddr *addr, socklen_t addr_len, int seqno, int ttl, struct timeval *tv, void *userptr);
typedef void (*fast_ping_result)(struct ping_host_struct *ping_host, const char *host, FAST_PING_RESULT result, struct sockaddr *addr, socklen_t addr_len,
int seqno, int ttl, struct timeval *tv, void *userptr);
/* start ping */
struct ping_host_struct *fast_ping_start(PING_TYPE type, const char *host, int count, int interval, int timeout, fast_ping_result ping_callback, void *userptr);