aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/link.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ppp/link.c')
-rw-r--r--usr.sbin/ppp/link.c55
1 files changed, 27 insertions, 28 deletions
diff --git a/usr.sbin/ppp/link.c b/usr.sbin/ppp/link.c
index c2511f565487..14b61812ad8c 100644
--- a/usr.sbin/ppp/link.c
+++ b/usr.sbin/ppp/link.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: link.c,v 1.1.2.13 1998/03/16 22:54:05 brian Exp $
+ * $Id: link.c,v 1.1.2.14 1998/03/20 19:48:08 brian Exp $
*
*/
@@ -46,13 +46,17 @@
#include "lcpproto.h"
#include "loadalias.h"
#include "vars.h"
-#include "link.h"
#include "fsm.h"
#include "iplist.h"
#include "slcompress.h"
#include "ipcp.h"
#include "filter.h"
#include "descriptor.h"
+#include "async.h"
+#include "lcp.h"
+#include "ccp.h"
+#include "link.h"
+#include "mp.h"
#include "bundle.h"
#include "prompt.h"
@@ -87,6 +91,25 @@ link_QueueLen(struct link *l)
return len;
}
+int
+link_QueueBytes(struct link *l)
+{
+ int i, len, bytes;
+ struct mbuf *m;
+
+ bytes = 0;
+ for (i = 0, len = 0; i < LINK_QUEUES; i++) {
+ len = l->Queue[i].qlen;
+ m = l->Queue[i].top;
+ while (len--) {
+ bytes += plength(m);
+ m = m->pnext;
+ }
+ }
+
+ return bytes;
+}
+
struct mbuf *
link_Dequeue(struct link *l)
{
@@ -123,12 +146,6 @@ link_Write(struct link *l, int pri, const char *ptr, int count)
}
void
-link_StartOutput(struct link *l, struct bundle *bundle)
-{
- (*l->StartOutput)(l, bundle);
-}
-
-void
link_Output(struct link *l, int pri, struct mbuf *bp)
{
struct mbuf *wp;
@@ -143,25 +160,6 @@ link_Output(struct link *l, int pri, struct mbuf *bp)
Enqueue(l->Queue + pri, wp);
}
-int
-link_IsActive(struct link *l)
-{
- return (*l->IsActive)(l);
-}
-
-void
-link_Close(struct link *l, struct bundle *bundle, int dedicated_force, int stay)
-{
- (*l->Close)(l, dedicated_force);
- bundle_LinkLost(bundle, l, stay);
-}
-
-void
-link_Destroy(struct link *l)
-{
- (*l->Destroy)(l);
-}
-
static struct protostatheader {
u_short number;
const char *name;
@@ -176,6 +174,7 @@ static struct protostatheader {
{ PROTO_PAP, "PAP" },
{ PROTO_LQR, "LQR" },
{ PROTO_CHAP, "CHAP" },
+ { PROTO_MP, "MULTILINK" },
{ 0, "Others" }
};
@@ -207,6 +206,6 @@ link_ReportProtocolStatus(struct link *l)
if ((i % 2) == 0)
prompt_Printf(&prompt, "\n");
}
- if (i % 2)
+ if (!(i % 2))
prompt_Printf(&prompt, "\n");
}