xref: /openbsd-src/sbin/route/show.h (revision f2da64fbbbf1b03f09f390ab01267c93dfd77c4c)
1 /*	$OpenBSD: show.h,v 1.11 2015/07/18 00:05:02 phessler Exp $ */
2 
3 /*
4  * Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
5  *
6  * Permission to use, copy, modify, and distribute this software for any
7  * purpose with or without fee is hereby granted, provided that the above
8  * copyright notice and this permission notice appear in all copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 #ifndef __SHOW_H__
20 #define __SHOW_H__
21 
22 union sockunion {
23 	struct sockaddr		sa;
24 	struct sockaddr_in	sin;
25 	struct sockaddr_in6	sin6;
26 	struct sockaddr_dl	sdl;
27 	struct sockaddr_rtlabel	rtlabel;
28 	struct sockaddr_mpls	smpls;
29 };
30 
31 void	 p_rttables(int, u_int, int, char);
32 char	*routename(struct sockaddr *);
33 char	*netname(struct sockaddr *, struct sockaddr *);
34 char	*mpls_op(u_int32_t);
35 
36 extern int nflag;
37 extern int Fflag;
38 extern int verbose;
39 extern union sockunion so_label;
40 
41 #define PLEN  (LONG_BIT / 4 + 2)
42 
43 #endif /* __SHOW_H__ */
44