route.h revision 50479
1270866Simp/* 2270866Simp * User Process PPP 3270866Simp * 4270866Simp * Written by Toshiharu OHNO (tony-o@iij.ad.jp) 5270866Simp * 6270866Simp * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd. 7270866Simp * 8270866Simp * Redistribution and use in source and binary forms are permitted 9270866Simp * provided that the above copyright notice and this paragraph are 10270866Simp * duplicated in all such forms and that any documentation, 11270866Simp * advertising materials, and other materials related to such 12270866Simp * distribution and use acknowledge that the software was developed 13270866Simp * by the Internet Initiative Japan, Inc. The name of the 14270866Simp * IIJ may not be used to endorse or promote products derived 15270866Simp * from this software without specific prior written permission. 16270866Simp * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 17270866Simp * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 18270866Simp * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 19270866Simp * 20270866Simp * $FreeBSD: head/usr.sbin/ppp/route.h 50479 1999-08-28 01:35:59Z peter $ 21270866Simp * 22270866Simp */ 23270866Simp 24270866Simpstruct bundle; 25270866Simpstruct cmdargs; 26270866Simp 27270866Simp#define ROUTE_STATIC 0 28270866Simp#define ROUTE_DSTMYADDR 1 29270866Simp#define ROUTE_DSTHISADDR 2 30270866Simp#define ROUTE_DSTANY 3 31270866Simp#define ROUTE_GWHISADDR 4 /* May be ORd with DST_MYADDR */ 32270866Simp 33270866Simpstruct sticky_route { 34270866Simp int type; /* ROUTE_* value (not _STATIC) */ 35270866Simp struct sticky_route *next; /* next in list */ 36270866Simp 37270866Simp struct in_addr dst; 38270866Simp struct in_addr mask; 39270866Simp struct in_addr gw; 40270866Simp}; 41270866Simp 42270866Simpextern int GetIfIndex(char *); 43270866Simpextern int route_Show(struct cmdargs const *); 44270866Simpextern void route_IfDelete(struct bundle *, int); 45270866Simpextern const char *Index2Nam(int); 46270866Simpextern void route_Change(struct bundle *, struct sticky_route *, 47270866Simp struct in_addr, struct in_addr); 48270866Simpextern void route_Add(struct sticky_route **, int, struct in_addr, 49270866Simp struct in_addr, struct in_addr); 50270866Simpextern void route_Delete(struct sticky_route **, int, struct in_addr); 51270866Simpextern void route_DeleteAll(struct sticky_route **); 52270866Simpextern void route_Clean(struct bundle *, struct sticky_route *); 53270866Simpextern void route_ShowSticky(struct prompt *, struct sticky_route *, 54270866Simp const char *, int); 55270866Simp