added my responsibility for the `cpm' port
[unix-history] / sys / netccitt / pk_output.c
index ff1d17e..347bd1c 100644 (file)
@@ -35,7 +35,8 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *     @(#)pk_output.c 7.10 (Berkeley) 5/29/91
+ *     from: @(#)pk_output.c   7.10 (Berkeley) 5/29/91
+ *     $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 *);
 
 
-pk_output (lcp)
-register struct pklcd *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;
+       struct mbuf *n;
 {
        register struct x25_packet *xp;
        register struct mbuf *m;
 {
        register struct x25_packet *xp;
        register struct mbuf *m;
@@ -64,7 +72,7 @@ register struct pklcd *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) {
@@ -165,7 +173,7 @@ register struct pklcd *lcp;
 
                default: 
                        m_freem (m);
 
                default: 
                        m_freem (m);
-                       return;
+                       return 0;
                }
 
                /* Trace the packet. */
                }
 
                /* Trace the packet. */
@@ -176,6 +184,7 @@ register struct pklcd *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;
 }
 
 /* 
 }
 
 /* 
@@ -183,9 +192,9 @@ register struct pklcd *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;