aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/lcp.c
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>1998-04-03 19:26:02 +0000
committerBrian Somers <brian@FreeBSD.org>1998-04-03 19:26:02 +0000
commitb6217683dc0269a53b799399522dbdfb5a4919cc (patch)
tree902951de8deb101adced0820378356c58e63d98b /usr.sbin/ppp/lcp.c
parent8390b576621390705c322cd2a7781df9174356f7 (diff)
downloadsrc-b6217683dc0269a53b799399522dbdfb5a4919cc.tar.gz
src-b6217683dc0269a53b799399522dbdfb5a4919cc.zip
Deglobalise `struct prompt':
o Our diagnostic socket has its password set in the `set socket' line only (not in ppp.secret). o Passwords are per server socket (*VarAuthKey are gone) o Authority is per prompt (VarLocalAuth is gone). o Local logging is per prompt. o Add a `show who' command to see who's connected. No identd routine - just a `where the connection came from' display. o SIGUSR1 is disabled for now - we have no way of choosing a password for the socket created :-( Prompts are attached as a list of `struct descriptor's in struct bundle, and serviced under the bundles descriptor service routines. Ultimately, everything should be done like this. Cosmetic: o alphabeticalise SRCS in Makefile. o Add a few comments in command.h TODO: Start checking that we don't overflow the descriptor sets in select() now that we can have any number of descriptors.
Notes
Notes: svn path=/cvs2svn/branches/MP/; revision=35016
Diffstat (limited to 'usr.sbin/ppp/lcp.c')
-rw-r--r--usr.sbin/ppp/lcp.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/usr.sbin/ppp/lcp.c b/usr.sbin/ppp/lcp.c
index acc9e709e40f..d995f65ea114 100644
--- a/usr.sbin/ppp/lcp.c
+++ b/usr.sbin/ppp/lcp.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: lcp.c,v 1.55.2.34 1998/04/03 19:21:29 brian Exp $
+ * $Id: lcp.c,v 1.55.2.35 1998/04/03 19:24:01 brian Exp $
*
* TODO:
* o Limit data field length by MRU
@@ -146,31 +146,33 @@ lcp_ReportStatus(struct cmdargs const *arg)
struct link *l = ChooseLink(arg);
struct lcp *lcp = &l->lcp;
- prompt_Printf(&prompt, "%s: %s [%s]\n", l->name, lcp->fsm.name,
+ prompt_Printf(arg->prompt, "%s: %s [%s]\n", l->name, lcp->fsm.name,
State2Nam(lcp->fsm.state));
- prompt_Printf(&prompt,
+ prompt_Printf(arg->prompt,
" his side: MRU %d, ACCMAP %08lx, PROTOCOMP %d, ACFCOMP %d,\n"
" MAGIC %08lx, REJECT %04x\n",
lcp->his_mru, (u_long)lcp->his_accmap,
lcp->his_protocomp, lcp->his_acfcomp,
(u_long)lcp->his_magic, lcp->his_reject);
- prompt_Printf(&prompt,
+ prompt_Printf(arg->prompt,
" my side: MRU %d, ACCMAP %08lx, PROTOCOMP %d, ACFCOMP %d,\n"
" MAGIC %08lx, REJECT %04x\n",
lcp->want_mru, (u_long)lcp->want_accmap,
lcp->want_protocomp, lcp->want_acfcomp,
(u_long)lcp->want_magic, lcp->my_reject);
- prompt_Printf(&prompt, "\n Defaults: MRU = %d, ", lcp->cfg.mru);
+ prompt_Printf(arg->prompt, "\n Defaults: MRU = %d, ", lcp->cfg.mru);
if (l->lcp.cfg.mtu)
- prompt_Printf(&prompt, "MTU = %d, ", lcp->cfg.mtu);
- prompt_Printf(&prompt, "ACCMAP = %08lx\n", (u_long)lcp->cfg.accmap);
- prompt_Printf(&prompt, " LQR period = %us, ", lcp->cfg.lqrperiod);
- prompt_Printf(&prompt, "Open Mode = %s",
+ prompt_Printf(arg->prompt, "MTU = %d, ", lcp->cfg.mtu);
+ prompt_Printf(arg->prompt, "ACCMAP = %08lx\n", (u_long)lcp->cfg.accmap);
+ prompt_Printf(arg->prompt, " LQR period = %us, ",
+ lcp->cfg.lqrperiod);
+ prompt_Printf(arg->prompt, "Open Mode = %s",
lcp->cfg.openmode == OPEN_PASSIVE ? "passive" : "active");
if (lcp->cfg.openmode > 0)
- prompt_Printf(&prompt, " (delay %ds)", lcp->cfg.openmode);
- prompt_Printf(&prompt, "\n FSM retry = %us\n", lcp->cfg.fsmretry);
+ prompt_Printf(arg->prompt, " (delay %ds)", lcp->cfg.openmode);
+ prompt_Printf(arg->prompt, "\n FSM retry = %us\n",
+ lcp->cfg.fsmretry);
return 0;
}