summaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/async.c
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>1998-01-30 19:46:07 +0000
committerBrian Somers <brian@FreeBSD.org>1998-01-30 19:46:07 +0000
commit8c07a7b2e0d7046e042a0c38fb62f75013bcf072 (patch)
tree59710c84158fc1016e7402b09ab15f150e34f0aa /usr.sbin/ppp/async.c
parentc8ee0d78b635b119034cc1d40d949fc37f28c19d (diff)
downloadsrc-test2-8c07a7b2e0d7046e042a0c38fb62f75013bcf072.tar.gz
src-test2-8c07a7b2e0d7046e042a0c38fb62f75013bcf072.zip
Notes
Diffstat (limited to 'usr.sbin/ppp/async.c')
-rw-r--r--usr.sbin/ppp/async.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/usr.sbin/ppp/async.c b/usr.sbin/ppp/async.c
index 5c6b123007b5..dbf64d374960 100644
--- a/usr.sbin/ppp/async.c
+++ b/usr.sbin/ppp/async.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: async.c,v 1.15 1998/01/21 02:15:08 brian Exp $
+ * $Id: async.c,v 1.15.2.1 1998/01/29 00:49:10 brian Exp $
*
*/
#include <sys/param.h>
@@ -40,6 +40,8 @@
#include "loadalias.h"
#include "vars.h"
#include "async.h"
+#include "throughput.h"
+#include "link.h"
#include "physical.h"
#define HDLCSIZE (MAX_MRU*2+6)
@@ -98,7 +100,7 @@ HdlcPutByte(u_char **cp, u_char c, int proto)
}
void
-AsyncOutput(int pri, struct mbuf *bp, int proto, struct physical *physical)
+AsyncOutput(int pri, struct mbuf *bp, int proto, struct link *l)
{
struct async_state *hs = &AsyncState;
u_char *cp, *sp, *ep;
@@ -128,8 +130,8 @@ AsyncOutput(int pri, struct mbuf *bp, int proto, struct physical *physical)
cnt = cp - hs->xbuff;
LogDumpBuff(LogASYNC, "WriteModem", hs->xbuff, cnt);
- WriteModem(physical, pri, (char *) hs->xbuff, cnt);
- ModemAddOutOctets(physical, cnt);
+ link_Write(l, pri, (char *)hs->xbuff, cnt);
+ link_AddOutOctets(l, cnt);
pfree(bp);
}
@@ -181,7 +183,8 @@ AsyncInput(u_char *buff, int cnt, struct physical *physical)
{
struct mbuf *bp;
- ModemAddInOctets(physical, cnt);
+ link_AddInOctets(physical2link(physical), cnt);
+
if (Physical_IsSync(physical)) {
bp = mballoc(cnt, MB_ASYNC);
memcpy(MBUF_CTOP(bp), buff, cnt);