xref: /freebsd/usr.sbin/ppp/route.h (revision 6e8394b8baa7d5d9153ab90de6824bcd19b3b4e1)
1 /*
2  *			User Process PPP
3  *
4  *	    Written by Toshiharu OHNO (tony-o@iij.ad.jp)
5  *
6  *   Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
7  *
8  * Redistribution and use in source and binary forms are permitted
9  * provided that the above copyright notice and this paragraph are
10  * duplicated in all such forms and that any documentation,
11  * advertising materials, and other materials related to such
12  * distribution and use acknowledge that the software was developed
13  * by the Internet Initiative Japan, Inc.  The name of the
14  * IIJ may not be used to endorse or promote products derived
15  * from this software without specific prior written permission.
16  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
17  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
18  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19  *
20  * $Id: route.h,v 1.11 1998/05/21 21:48:12 brian Exp $
21  *
22  */
23 
24 struct bundle;
25 struct cmdargs;
26 
27 #define ROUTE_STATIC		0
28 #define ROUTE_DSTMYADDR		1
29 #define ROUTE_DSTHISADDR	2
30 #define ROUTE_DSTANY		3
31 #define ROUTE_GWHISADDR		4	/* May be ORd with DST_MYADDR */
32 
33 struct sticky_route {
34   int type;				/* ROUTE_* value (not _STATIC) */
35   struct sticky_route *next;		/* next in list */
36 
37   struct in_addr dst;
38   struct in_addr mask;
39   struct in_addr gw;
40 };
41 
42 extern int GetIfIndex(char *);
43 extern int route_Show(struct cmdargs const *);
44 extern void route_IfDelete(struct bundle *, int);
45 extern const char *Index2Nam(int);
46 extern void route_Change(struct bundle *, struct sticky_route *,
47                          struct in_addr, struct in_addr);
48 extern void route_Add(struct sticky_route **, int, struct in_addr,
49                       struct in_addr, struct in_addr);
50 extern void route_Delete(struct sticky_route **, int, struct in_addr);
51 extern void route_DeleteAll(struct sticky_route **);
52 extern void route_Clean(struct bundle *, struct sticky_route *);
53 extern void route_ShowSticky(struct prompt *, struct sticky_route *,
54                              const char *, int);
55