summaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/ipcp.c
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>1998-02-10 03:23:50 +0000
committerBrian Somers <brian@FreeBSD.org>1998-02-10 03:23:50 +0000
commit85b542cf4f3d3d3338529aad0f9f006cdaeef9a8 (patch)
tree9fdd24c83a0136107bd305b7b6c3d41626e818de /usr.sbin/ppp/ipcp.c
parentb77776a7f2087e0ff8b0a215e831a1ff3859081a (diff)
downloadsrc-test2-85b542cf4f3d3d3338529aad0f9f006cdaeef9a8.tar.gz
src-test2-85b542cf4f3d3d3338529aad0f9f006cdaeef9a8.zip
Notes
Diffstat (limited to 'usr.sbin/ppp/ipcp.c')
-rw-r--r--usr.sbin/ppp/ipcp.c36
1 files changed, 17 insertions, 19 deletions
diff --git a/usr.sbin/ppp/ipcp.c b/usr.sbin/ppp/ipcp.c
index f444ae8c1178..5ad090da7dbf 100644
--- a/usr.sbin/ppp/ipcp.c
+++ b/usr.sbin/ppp/ipcp.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: ipcp.c,v 1.50.2.11 1998/02/08 19:29:44 brian Exp $
+ * $Id: ipcp.c,v 1.50.2.12 1998/02/09 19:20:52 brian Exp $
*
* TODO:
* o More RFC1772 backwoard compatibility
@@ -67,6 +67,7 @@
#include "id.h"
#include "arp.h"
#include "systems.h"
+#include "prompt.h"
struct compreq {
u_short proto;
@@ -152,38 +153,36 @@ IpcpAddOutOctets(int n)
int
ReportIpcpStatus(struct cmdargs const *arg)
{
- if (!VarTerm)
- return 1;
- fprintf(VarTerm, "%s [%s]\n", IpcpInfo.fsm.name,
+ prompt_Printf(&prompt, "%s [%s]\n", IpcpInfo.fsm.name,
StateNames[IpcpInfo.fsm.state]);
if (IpcpInfo.fsm.state == ST_OPENED) {
- fprintf(VarTerm, " His side: %s, %s\n",
+ prompt_Printf(&prompt, " His side: %s, %s\n",
inet_ntoa(IpcpInfo.his_ipaddr), vj2asc(IpcpInfo.his_compproto));
- fprintf(VarTerm, " My side: %s, %s\n",
+ prompt_Printf(&prompt, " My side: %s, %s\n",
inet_ntoa(IpcpInfo.want_ipaddr), vj2asc(IpcpInfo.want_compproto));
}
- fprintf(VarTerm, "\nDefaults:\n");
- fprintf(VarTerm, " My Address: %s/%d\n",
+ prompt_Printf(&prompt, "\nDefaults:\n");
+ prompt_Printf(&prompt, " My Address: %s/%d\n",
inet_ntoa(IpcpInfo.DefMyAddress.ipaddr), IpcpInfo.DefMyAddress.width);
if (iplist_isvalid(&IpcpInfo.DefHisChoice))
- fprintf(VarTerm, " His Address: %s\n",
+ prompt_Printf(&prompt, " His Address: %s\n",
IpcpInfo.DefHisChoice.src);
else
- fprintf(VarTerm, " His Address: %s/%d\n",
+ prompt_Printf(&prompt, " His Address: %s/%d\n",
inet_ntoa(IpcpInfo.DefHisAddress.ipaddr),
IpcpInfo.DefHisAddress.width);
if (IpcpInfo.HaveTriggerAddress)
- fprintf(VarTerm, " Negotiation(trigger): %s\n",
+ prompt_Printf(&prompt, " Negotiation(trigger): %s\n",
inet_ntoa(IpcpInfo.TriggerAddress));
else
- fprintf(VarTerm, " Negotiation(trigger): MYADDR\n");
- fprintf(VarTerm, " Initial VJ slots: %d\n", IpcpInfo.VJInitSlots);
- fprintf(VarTerm, " Initial VJ compression: %s\n",
+ prompt_Printf(&prompt, " Negotiation(trigger): MYADDR\n");
+ prompt_Printf(&prompt, " Initial VJ slots: %d\n", IpcpInfo.VJInitSlots);
+ prompt_Printf(&prompt, " Initial VJ compression: %s\n",
IpcpInfo.VJInitComp ? "on" : "off");
- fprintf(VarTerm, "\n");
- throughput_disp(&IpcpInfo.throughput, VarTerm);
+ prompt_Printf(&prompt, "\n");
+ throughput_disp(&IpcpInfo.throughput);
return 0;
}
@@ -531,8 +530,7 @@ IpcpLayerUp(struct fsm *fp)
if (ipcp_SetIPaddress(fp->bundle, ipcp, ipcp->want_ipaddr,
ipcp->his_ipaddr, ifnetmask, 0) < 0) {
- if (VarTerm)
- LogPrintf(LogERROR, "IpcpLayerUp: unable to set ip address\n");
+ LogPrintf(LogERROR, "IpcpLayerUp: unable to set ip address\n");
return;
}
@@ -557,7 +555,7 @@ IpcpLayerUp(struct fsm *fp)
throughput_start(&ipcp->throughput);
StartIdleTimer();
- Prompt(fp->bundle);
+ prompt_Display(&prompt, fp->bundle);
}
void