freebsd-skq/usr.sbin/ppp/command.h
Brian Somers 1342caed9c o Move the accept/deny/disable/enable globals either to the
bundle (non-negotiated vars) or to their respective IPCP,
  LCP or CCP.
o Enable rolling throughput statistics by default.
o Remove the `display' command.  These values now appear in
  `show bundle', `show ipcp', `show ccp' and `show lcp'.
o Initialise auth name & key at bundle create time (oops).
o Rename pppd-deflate (the id-24 hack) to deflate24.
o Don't send both a REJ and a NAK to an IPCP or LCP REQ.
  Favour the REJ (already done at the CCP level).
o Recurse in datalink_UpdateSet() when we change state, otherwise
  we end up setting no descriptors and getting jammed in the
  imminent select() instead of doing the dial/login/hangup.
o Display our CHAP encryption method despite being built with DES.
o Display VJ as not negotiated in ``show ipcp'' when necessary.
1998-04-16 00:26:21 +00:00

62 lines
2.1 KiB
C

/*
* Written by Toshiharu OHNO (tony-o@iij.ad.jp)
*
* Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
*
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by the Internet Initiative Japan. The name of the
* IIJ may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: command.h,v 1.12.2.10 1998/04/14 23:17:03 brian Exp $
*
* TODO:
*/
struct cmdtab;
struct bundle;
struct datalink;
struct prompt;
struct cmdargs {
struct cmdtab const *cmdtab; /* The entire command table */
struct cmdtab const *cmd; /* This command entry */
int argc; /* Number of arguments (excluding cmd */
int argn; /* Argument to start processing from */
char const *const *argv; /* Arguments */
struct bundle *bundle; /* Our bundle */
struct datalink *cx; /* Our context */
struct prompt *prompt; /* Who executed us */
};
struct cmdtab {
const char *name;
const char *alias;
int (*func) (struct cmdargs const *);
u_char lauth;
const char *helpmes;
const char *syntax;
const void *args;
};
#define NEG_ACCEPTED (1)
#define NEG_ENABLED (2)
#define IsAccepted(x) ((x) & NEG_ACCEPTED)
#define IsEnabled(x) ((x) & NEG_ENABLED)
extern int IsInteractive(struct prompt *);
extern void InterpretCommand(char *, int, int *, char ***);
extern void RunCommand(struct bundle *, int, char const *const *,
struct prompt *, const char *);
extern void DecodeCommand(struct bundle *, char *, int, struct prompt *,
const char *);
extern struct link *ChooseLink(struct cmdargs const *);
const char *command_ShowNegval(unsigned);