]> git.ozlabs.org Git - ppp.git/blobdiff - modules/ppp_comp.c
priority queueing stuff
[ppp.git] / modules / ppp_comp.c
index 4c261e7931146e6561447bb3efce867ff9ee502f..03140f8b3aa2a09cf95eab5903a8624881e8a224 100644 (file)
@@ -24,7 +24,7 @@
  * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
  * OR MODIFICATIONS.
  *
- * $Id: ppp_comp.c,v 1.5 1996/08/28 06:36:30 paulus Exp $
+ * $Id: ppp_comp.c,v 1.7 1997/03/04 03:31:51 paulus Exp $
  */
 
 /*
@@ -79,7 +79,11 @@ static int msg_byte __P((mblk_t *, unsigned int));
 
 #define PPP_COMP_ID 0xbadf
 static struct module_info minfo = {
+#ifdef PRIOQ
+    PPP_COMP_ID, "ppp_comp", 0, INFPSZ, 16512, 16384,
+#else
     PPP_COMP_ID, "ppp_comp", 0, INFPSZ, 16384, 4096,
+#endif
 };
 
 static struct qinit r_init = {
@@ -91,6 +95,10 @@ static struct qinit w_init = {
     ppp_comp_wput, ppp_comp_wsrv, NULL, NULL, NULL, &minfo, NULL
 };
 
+#if defined(SVR4) && !defined(SOL2)
+int pcmpdevflag = 0;
+#define ppp_compinfo pcmpinfo
+#endif
 struct streamtab ppp_compinfo = {
     &r_init, &w_init, NULL, NULL
 };
@@ -148,8 +156,12 @@ extern task_t first_task;
  * List of compressors we know about.
  */
 
+#if DO_BSD_COMPRESS
 extern struct compressor ppp_bsd_compress;
+#endif
+#if DO_DEFLATE
 extern struct compressor ppp_deflate;
+#endif
 
 struct compressor *ppp_compressors[] = {
 #if DO_BSD_COMPRESS
@@ -602,7 +614,11 @@ ppp_comp_wsrv(q)
     cp = (comp_state_t *) q->q_ptr;
     while ((mp = getq(q)) != 0) {
        /* assert(mp->b_datap->db_type == M_DATA) */
-       if (!canputnext(q)) {
+#ifdef PRIOQ
+        if (!bcanputnext(q,mp->b_band)) {
+#else
+        if (!canputnext(q)) {
+#endif PRIOQ
            putbq(q, mp);
            return;
        }
@@ -677,6 +693,9 @@ ppp_comp_wsrv(q)
            (*cp->xcomp->compress)(cp->xstate, &cmp, mp, len,
                                   (cp->flags & CCP_ISUP? cp->mtu: 0));
            if (cmp != NULL) {
+#ifdef PRIOQ
+               cmp->b_band=mp->b_band;
+#endif PRIOQ
                freemsg(mp);
                mp = cmp;
            }