route.h revision 36285
1193323Sed/*
2193323Sed *			User Process PPP
3193323Sed *
4193323Sed *	    Written by Toshiharu OHNO (tony-o@iij.ad.jp)
5193323Sed *
6193323Sed *   Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
7193323Sed *
8193323Sed * Redistribution and use in source and binary forms are permitted
9193323Sed * provided that the above copyright notice and this paragraph are
10193323Sed * duplicated in all such forms and that any documentation,
11193323Sed * advertising materials, and other materials related to such
12193323Sed * distribution and use acknowledge that the software was developed
13193323Sed * by the Internet Initiative Japan, Inc.  The name of the
14193323Sed * IIJ may not be used to endorse or promote products derived
15193323Sed * from this software without specific prior written permission.
16221345Sdim * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
17193323Sed * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
18193323Sed * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19193323Sed *
20193323Sed * $Id: route.h,v 1.10.2.6 1998/05/05 23:30:13 brian Exp $
21193323Sed *
22193323Sed */
23193323Sed
24193323Sedstruct bundle;
25193323Sedstruct cmdargs;
26193323Sed
27193323Sed#define ROUTE_STATIC		0
28193323Sed#define ROUTE_DSTMYADDR		1
29193323Sed#define ROUTE_DSTHISADDR	2
30193323Sed#define ROUTE_DSTANY		3
31193323Sed#define ROUTE_GWHISADDR		4	/* May be ORd with DST_MYADDR */
32243830Sdim
33206124Srdivackystruct sticky_route {
34193323Sed  int type;				/* ROUTE_* value (not _STATIC) */
35193323Sed  struct sticky_route *next;		/* next in list */
36193323Sed
37193323Sed  struct in_addr dst;
38193323Sed  struct in_addr mask;
39193323Sed  struct in_addr gw;
40193323Sed};
41193323Sed
42193323Sedextern int GetIfIndex(char *);
43193323Sedextern int route_Show(struct cmdargs const *);
44193323Sedextern void route_IfDelete(struct bundle *, int);
45193323Sedextern const char *Index2Nam(int);
46198090Srdivackyextern void route_Change(struct bundle *, struct sticky_route *,
47198090Srdivacky                         struct in_addr, struct in_addr);
48193323Sedextern void route_Add(struct sticky_route **, int, struct in_addr,
49193323Sed                      struct in_addr, struct in_addr);
50212904Sdimextern void route_Delete(struct sticky_route **, int, struct in_addr);
51193323Sedextern void route_DeleteAll(struct sticky_route **);
52193323Sedextern void route_Clean(struct bundle *, struct sticky_route *);
53193323Sedextern void route_ShowSticky(struct prompt *, struct sticky_route *);
54193323Sed