12 lines
463 B
C
12 lines
463 B
C
#ifndef BANBAN_NET_DIAG_PROBE_H
|
|
#define BANBAN_NET_DIAG_PROBE_H
|
|
/* Transport failures are distinct from local setup/resource failures. */
|
|
enum { PROBE_OK, PROBE_DNS, PROBE_LOCAL, PROBE_CONNECT, PROBE_TIMEOUT, PROBE_CANCELLED };
|
|
typedef struct {
|
|
int outcome, error, dns_result, tcp_started;
|
|
unsigned long dns_ms, tcp_ms;
|
|
char address[48];
|
|
} net_probe_result;
|
|
void net_diag_probe(const char *host, unsigned short port, net_probe_result *result);
|
|
#endif
|