1: /*
2: mtr -- a network diagnostic tool
3: Copyright (C) 1997,1998 Matt Kimball
4:
5: This program is free software; you can redistribute it and/or modify
6: it under the terms of the GNU General Public License version 2 as
7: published by the Free Software Foundation.
8:
9: This program is distributed in the hope that it will be useful,
10: but WITHOUT ANY WARRANTY; without even the implied warranty of
11: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12: GNU General Public License for more details.
13:
14: You should have received a copy of the GNU General Public License along
15: with this program; if not, write to the Free Software Foundation, Inc.,
16: 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17: */
18:
19: /* Prototypes for functions in net.c */
20: #include <sys/types.h>
21: #include <netdb.h>
22: #include <arpa/inet.h>
23: #include <netinet/in.h>
24: #include <sys/socket.h>
25: #include <sys/select.h>
26: #ifdef ENABLE_IPV6
27: #include <netinet/ip6.h>
28: #endif
29:
30: #include <stdint.h>
31:
32: #include "mtr.h"
33:
34: extern int net_open(
35: struct mtr_ctl *ctl,
36: struct addrinfo *res);
37: extern void net_reopen(
38: struct mtr_ctl *ctl,
39: struct addrinfo *res);
40: extern void net_reset(
41: struct mtr_ctl *ctl);
42: extern void net_close(
43: void);
44: extern int net_waitfd(
45: void);
46: extern void net_process_return(
47: struct mtr_ctl *ctl);
48: extern void net_harvest_fds(
49: struct mtr_ctl *ctl);
50:
51: extern int net_max(
52: struct mtr_ctl *ctl);
53: extern int net_min(
54: struct mtr_ctl *ctl);
55: extern int net_last(
56: int at);
57: extern ip_t *net_addr(
58: int at);
59: extern int net_err(
60: int at);
61: extern struct mplslen *net_mpls(
62: int at);
63: extern struct mplslen *net_mplss(
64: int,
65: int);
66: extern int net_loss(
67: int at);
68: extern int net_drop(
69: int at);
70: extern int net_best(
71: int at);
72: extern int net_worst(
73: int at);
74: extern int net_avg(
75: int at);
76: extern int net_gmean(
77: int at);
78: extern int net_stdev(
79: int at);
80: extern int net_jitter(
81: int at);
82: extern int net_jworst(
83: int at);
84: extern int net_javg(
85: int at);
86: extern int net_jinta(
87: int at);
88: extern ip_t *net_addrs(
89: int at,
90: int i);
91: extern char *net_localaddr(
92: void);
93: extern char *net_remoteaddr(
94: void);
95:
96: extern int net_send_batch(
97: struct mtr_ctl *ctl);
98: extern void net_end_transit(
99: void);
100:
101: extern int calc_deltatime(
102: float WaitTime);
103:
104: extern int net_returned(
105: int at);
106: extern int net_xmit(
107: int at);
108:
109: extern int net_up(
110: int at);
111:
112: extern int *net_saved_pings(
113: int at);
114: extern void net_save_xmit(
115: int at);
116: extern void net_save_return(
117: int at,
118: int seq,
119: int ms);
120:
121: extern int addrcmp(
122: void *a,
123: void *b,
124: int af);
125:
126: extern void net_add_fds(
127: fd_set * writefd,
128: int *maxfd);
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>