xref: /freebsd/usr.sbin/ppp/command.h (revision 85b542cf4f3d3d3338529aad0f9f006cdaeef9a8)
1 /*
2  *	    Written by Toshiharu OHNO (tony-o@iij.ad.jp)
3  *
4  *   Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
5  *
6  * Redistribution and use in source and binary forms are permitted
7  * provided that the above copyright notice and this paragraph are
8  * duplicated in all such forms and that any documentation,
9  * advertising materials, and other materials related to such
10  * distribution and use acknowledge that the software was developed
11  * by the Internet Initiative Japan.  The name of the
12  * IIJ may not be used to endorse or promote products derived
13  * from this software without specific prior written permission.
14  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
15  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
16  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17  *
18  * $Id: command.h,v 1.12.2.2 1998/02/07 20:49:33 brian Exp $
19  *
20  *	TODO:
21  */
22 
23 struct cmdtab;
24 
25 struct cmdargs {
26   struct cmdtab const *cmd;
27   int argc;
28   char const *const *argv;
29   const void *data;
30   struct bundle *bundle;
31 };
32 
33 struct cmdtab {
34   const char *name;
35   const char *alias;
36   int (*func) (struct cmdargs const *);
37   u_char lauth;
38   const char *helpmes;
39   const char *syntax;
40   const void *args;
41 };
42 
43 #define	VAR_AUTHKEY	0
44 #define	VAR_DIAL	1
45 #define	VAR_LOGIN	2
46 #define	VAR_AUTHNAME	3
47 #define	VAR_DEVICE	4
48 #define	VAR_ACCMAP	5
49 #define	VAR_PHONE	6
50 #define	VAR_HANGUP	7
51 #ifdef HAVE_DES
52 #define	VAR_ENC		8
53 #endif
54 
55 extern struct in_addr ifnetmask;
56 extern int aft_cmd;
57 
58 extern int SetVariable(struct cmdargs const *);
59 extern int IsInteractive(int);
60 extern void InterpretCommand(char *, int, int *, char ***);
61 extern void RunCommand(struct bundle *, int, char const *const *, const char *);
62 extern void DecodeCommand(struct bundle *, char *, int, const char *);
63