route.h revision 43313
113389Sphk/* 213389Sphk * User Process PPP 313389Sphk * 413389Sphk * Written by Toshiharu OHNO (tony-o@iij.ad.jp) 513389Sphk * 613389Sphk * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd. 713389Sphk * 813389Sphk * Redistribution and use in source and binary forms are permitted 913389Sphk * provided that the above copyright notice and this paragraph are 1013389Sphk * duplicated in all such forms and that any documentation, 1113389Sphk * advertising materials, and other materials related to such 1213389Sphk * distribution and use acknowledge that the software was developed 1313389Sphk * by the Internet Initiative Japan, Inc. The name of the 1413389Sphk * IIJ may not be used to endorse or promote products derived 1513389Sphk * from this software without specific prior written permission. 1613389Sphk * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 1713389Sphk * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 1813389Sphk * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 1913389Sphk * 2043313Sbrian * $Id: route.h,v 1.11 1998/05/21 21:48:12 brian Exp $ 2113389Sphk * 2213389Sphk */ 2313389Sphk 2436285Sbrianstruct bundle; 2536285Sbrianstruct cmdargs; 2636285Sbrian 2736285Sbrian#define ROUTE_STATIC 0 2836285Sbrian#define ROUTE_DSTMYADDR 1 2936285Sbrian#define ROUTE_DSTHISADDR 2 3036285Sbrian#define ROUTE_DSTANY 3 3136285Sbrian#define ROUTE_GWHISADDR 4 /* May be ORd with DST_MYADDR */ 3236285Sbrian 3336285Sbrianstruct sticky_route { 3436285Sbrian int type; /* ROUTE_* value (not _STATIC) */ 3536285Sbrian struct sticky_route *next; /* next in list */ 3636285Sbrian 3736285Sbrian struct in_addr dst; 3836285Sbrian struct in_addr mask; 3936285Sbrian struct in_addr gw; 4036285Sbrian}; 4136285Sbrian 4230715Sbrianextern int GetIfIndex(char *); 4336285Sbrianextern int route_Show(struct cmdargs const *); 4436285Sbrianextern void route_IfDelete(struct bundle *, int); 4532616Sbrianextern const char *Index2Nam(int); 4636285Sbrianextern void route_Change(struct bundle *, struct sticky_route *, 4736285Sbrian struct in_addr, struct in_addr); 4836285Sbrianextern void route_Add(struct sticky_route **, int, struct in_addr, 4936285Sbrian struct in_addr, struct in_addr); 5036285Sbrianextern void route_Delete(struct sticky_route **, int, struct in_addr); 5136285Sbrianextern void route_DeleteAll(struct sticky_route **); 5236285Sbrianextern void route_Clean(struct bundle *, struct sticky_route *); 5343313Sbrianextern void route_ShowSticky(struct prompt *, struct sticky_route *, 5443313Sbrian const char *, int); 55