This commit was generated by cvs2svn to track changes on a CVS vendor
[unix-history] / sys / netccitt / pk_output.c
index 3045806..347bd1c 100644 (file)
@@ -36,7 +36,7 @@
  * SUCH DAMAGE.
  *
  *     from: @(#)pk_output.c   7.10 (Berkeley) 5/29/91
  * SUCH DAMAGE.
  *
  *     from: @(#)pk_output.c   7.10 (Berkeley) 5/29/91
- *     $Id: pk_output.c,v 1.2 1993/10/16 19:46:51 rgrimes Exp $
+ *     $Id: pk_output.c,v 1.3 1993/11/25 01:34:30 wollman Exp $
  */
 
 #include "param.h"
  */
 
 #include "param.h"
 #include "pk_var.h"
 
 struct mbuf_cache pk_output_cache = {0 };
 #include "pk_var.h"
 
 struct mbuf_cache pk_output_cache = {0 };
-struct mbuf *nextpk ();
+static struct mbuf *nextpk (struct pklcd *);
 
 
-void
-pk_output (lcp)
+/*
+ * The `n' argument is just there to make if_x25subr.c happy.  We
+ * don't actually do anything with it, although meybe we should.
+ * All the other code passes in a null pointer.
+ */
+int
+pk_output (lcp, n)
        register struct pklcd *lcp;
        register struct pklcd *lcp;
+       struct mbuf *n;
 {
        register struct x25_packet *xp;
        register struct mbuf *m;
 {
        register struct x25_packet *xp;
        register struct mbuf *m;
@@ -66,7 +72,7 @@ pk_output (lcp)
 
        if (lcp == 0 || pkp == 0) {
                printf ("pk_output: zero arg\n");
 
        if (lcp == 0 || pkp == 0) {
                printf ("pk_output: zero arg\n");
-               return;
+               return -1;
        }
 
        while ((m = nextpk (lcp)) != NULL) {
        }
 
        while ((m = nextpk (lcp)) != NULL) {
@@ -167,7 +173,7 @@ pk_output (lcp)
 
                default: 
                        m_freem (m);
 
                default: 
                        m_freem (m);
-                       return;
+                       return 0;
                }
 
                /* Trace the packet. */
                }
 
                /* Trace the packet. */
@@ -178,6 +184,7 @@ pk_output (lcp)
                        mbuf_cache(&pk_output_cache, m);
                (*pkp -> pk_lloutput) (pkp -> pk_llnext, m);
        }
                        mbuf_cache(&pk_output_cache, m);
                (*pkp -> pk_lloutput) (pkp -> pk_llnext, m);
        }
+       return 0;
 }
 
 /* 
 }
 
 /* 
@@ -185,9 +192,9 @@ pk_output (lcp)
  *  packet is composed of one or more mbufs.
  */
 
  *  packet is composed of one or more mbufs.
  */
 
-struct mbuf *
+static struct mbuf *
 nextpk (lcp)
 nextpk (lcp)
-struct pklcd *lcp;
+       struct pklcd *lcp;
 {
        register struct mbuf *m, *n;
        struct socket *so = lcp -> lcd_so;
 {
        register struct mbuf *m, *n;
        struct socket *so = lcp -> lcd_so;