summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-02-15 06:29:47 +0000
committerjkh <jkh@FreeBSD.org>1995-02-15 06:29:47 +0000
commitcf2ee7fe73a3dfed6105159eaca6bb98b7617033 (patch)
tree2877718d266019b7d27bfbf0891077f8b4fa690b
parent4b93208ed1ccc9ccc0338fa9c1984b4edd206949 (diff)
downloadFreeBSD-src-cf2ee7fe73a3dfed6105159eaca6bb98b7617033.zip
FreeBSD-src-cf2ee7fe73a3dfed6105159eaca6bb98b7617033.tar.gz
And fix some more compiler warnings. Then give up. /sys/net* is FULL of
bogus code! And besides, Poul's doing this already.. It's just that fixing compiler warnings is sort of like eating potato chips.. :-)
-rw-r--r--sys/netccitt/hd_debug.c4
-rw-r--r--sys/netccitt/hd_input.c22
-rw-r--r--sys/netccitt/hd_output.c69
-rw-r--r--sys/netccitt/hd_subr.c15
-rw-r--r--sys/netccitt/hd_timer.c7
-rw-r--r--sys/netccitt/if_x25subr.c17
6 files changed, 86 insertions, 48 deletions
diff --git a/sys/netccitt/hd_debug.c b/sys/netccitt/hd_debug.c
index 058a21c..bfd63a1 100644
--- a/sys/netccitt/hd_debug.c
+++ b/sys/netccitt/hd_debug.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)hd_debug.c 8.1 (Berkeley) 6/10/93
- * $Id$
+ * $Id: hd_debug.c,v 1.2 1994/08/02 07:46:59 davidg Exp $
*/
#include <sys/param.h>
@@ -68,8 +68,10 @@ struct hdlctrace {
int lasttracelogged, freezetrace;
#endif
+void
hd_trace (hdp, direction, frame)
struct hdcb *hdp;
+int direction;
register struct Hdlc_frame *frame;
{
register char *s;
diff --git a/sys/netccitt/hd_input.c b/sys/netccitt/hd_input.c
index 9bdab0b..b547ffd 100644
--- a/sys/netccitt/hd_input.c
+++ b/sys/netccitt/hd_input.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)hd_input.c 8.1 (Berkeley) 6/10/93
- * $Id$
+ * $Id: hd_input.c,v 1.2 1994/08/02 07:47:01 davidg Exp $
*/
#include <sys/param.h>
@@ -55,9 +55,11 @@
#include <netccitt/hd_var.h>
#include <netccitt/x25.h>
-static frame_reject();
-static rej_routine();
-static free_iframes();
+static void frame_reject();
+static void rej_routine();
+static void free_iframes();
+void process_sframe ();
+
/*
* HDLC INPUT INTERFACE
*
@@ -65,6 +67,7 @@ static free_iframes();
* completed reading a frame.
*/
+void
hdintr ()
{
register struct mbuf *m;
@@ -116,6 +119,7 @@ hdintr ()
}
}
+int
process_rxframe (hdp, fbuf)
register struct hdcb *hdp;
register struct mbuf *fbuf;
@@ -314,6 +318,7 @@ register struct mbuf *fbuf;
return (queued);
}
+int
process_iframe (hdp, fbuf, frame)
register struct hdcb *hdp;
struct mbuf *fbuf;
@@ -442,9 +447,10 @@ int rear,
* condition Y (frame length error) are handled elsewhere.
*/
-static
+static void
frame_reject (hdp, rejectcode, frame)
struct hdcb *hdp;
+int rejectcode;
struct Hdlc_iframe *frame;
{
register struct Frmr_frame *frmr = &hd_frmr;
@@ -489,6 +495,7 @@ struct Hdlc_iframe *frame;
* frames is done here.
*/
+void
process_sframe (hdp, frame, frametype)
register struct hdcb *hdp;
register struct Hdlc_sframe *frame;
@@ -547,6 +554,7 @@ int frametype;
bool
valid_nr (hdp, nr, finalbit)
register struct hdcb *hdp;
+int nr;
register int finalbit;
{
/* Make sure it really does acknowledge something. */
@@ -591,7 +599,7 @@ register int finalbit;
* It then resets the Send State Variable V(S) to accomplish this.
*/
-static
+static void
rej_routine (hdp, rejnr)
register struct hdcb *hdp;
register int rejnr;
@@ -635,7 +643,7 @@ register int rejnr;
* when a previously written iframe is acknowledged.
*/
-static
+static void
free_iframes (hdp, nr, finalbit)
register struct hdcb *hdp;
int *nr;
diff --git a/sys/netccitt/hd_output.c b/sys/netccitt/hd_output.c
index c1db5f0..08530ad 100644
--- a/sys/netccitt/hd_output.c
+++ b/sys/netccitt/hd_output.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)hd_output.c 8.1 (Berkeley) 6/10/93
- * $Id$
+ * $Id: hd_output.c,v 1.2 1994/08/02 07:47:05 davidg Exp $
*/
#include <sys/param.h>
@@ -64,6 +64,39 @@
* by the input and control routines of the HDLC layer.
*/
+void
+hd_start (hdp)
+register struct hdcb *hdp;
+{
+ register struct mbuf *m;
+
+ /*
+ * The iframe is only transmitted if all these conditions are FALSE.
+ * The iframe remains queued (hdp->hd_txq) however and will be
+ * transmitted as soon as these conditions are cleared.
+ */
+
+ while (!(hdp->hd_condition & (TIMER_RECOVERY_CONDITION | REMOTE_RNR_CONDITION | REJ_CONDITION))) {
+ if (hdp->hd_vs == (hdp->hd_lastrxnr + hdp->hd_xcp->xc_lwsize) % MODULUS) {
+
+ /* We have now exceeded the maximum number of
+ outstanding iframes. Therefore, we must wait
+ until at least one is acknowledged if this
+ condition is not turned off before we are
+ requested to write another iframe. */
+ hdp->hd_window_condition++;
+ break;
+ }
+
+ /* hd_remove top iframe from transmit queue. */
+ if ((m = hd_remove (&hdp->hd_txq)) == NULL)
+ break;
+
+ hd_send_iframe (hdp, m, POLLOFF);
+ }
+}
+
+void
hd_output (hdp, m0)
register struct hdcb *hdp;
struct mbuf *m0;
@@ -100,37 +133,6 @@ struct mbuf *m0;
hd_start (hdp);
}
-hd_start (hdp)
-register struct hdcb *hdp;
-{
- register struct mbuf *m;
-
- /*
- * The iframe is only transmitted if all these conditions are FALSE.
- * The iframe remains queued (hdp->hd_txq) however and will be
- * transmitted as soon as these conditions are cleared.
- */
-
- while (!(hdp->hd_condition & (TIMER_RECOVERY_CONDITION | REMOTE_RNR_CONDITION | REJ_CONDITION))) {
- if (hdp->hd_vs == (hdp->hd_lastrxnr + hdp->hd_xcp->xc_lwsize) % MODULUS) {
-
- /* We have now exceeded the maximum number of
- outstanding iframes. Therefore, we must wait
- until at least one is acknowledged if this
- condition is not turned off before we are
- requested to write another iframe. */
- hdp->hd_window_condition++;
- break;
- }
-
- /* hd_remove top iframe from transmit queue. */
- if ((m = hd_remove (&hdp->hd_txq)) == NULL)
- break;
-
- hd_send_iframe (hdp, m, POLLOFF);
- }
-}
-
/*
* This procedure is passed a buffer descriptor for an iframe. It builds
* the rest of the control part of the frame and then writes it out. It
@@ -141,6 +143,7 @@ register struct hdcb *hdp;
* of old frames is required.
*/
+void
hd_send_iframe (hdp, buf, poll_bit)
register struct hdcb *hdp;
register struct mbuf *buf;
@@ -192,6 +195,7 @@ int poll_bit;
SET_TIMER (hdp);
}
+void
hd_ifoutput(hdp, m)
register struct mbuf *m;
register struct hdcb *hdp;
@@ -222,6 +226,7 @@ register struct hdcb *hdp;
* received an acknowledgement for a iframe.
*/
+void
hd_resend_iframe (hdp)
register struct hdcb *hdp;
{
diff --git a/sys/netccitt/hd_subr.c b/sys/netccitt/hd_subr.c
index 7d05127..6dcfe2f 100644
--- a/sys/netccitt/hd_subr.c
+++ b/sys/netccitt/hd_subr.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)hd_subr.c 8.1 (Berkeley) 6/10/93
- * $Id$
+ * $Id: hd_subr.c,v 1.2 1994/08/02 07:47:07 davidg Exp $
*/
#include <sys/param.h>
@@ -57,13 +57,16 @@
#include <netccitt/x25.h>
#include <netccitt/pk_var.h>
+void
hd_init ()
{
hdintrq.ifq_maxlen = IFQ_MAXLEN;
}
+int
hd_ctlinput (prc, addr)
+int prc;
struct sockaddr *addr;
{
register struct x25config *xcp = (struct x25config *)addr;
@@ -71,6 +74,8 @@ struct sockaddr *addr;
register struct ifaddr *ifa;
struct ifnet *ifp;
caddr_t pk_newlink();
+ void hd_writeinternal();
+ void hd_message();
if (addr->sa_family != AF_CCITT)
return (EAFNOSUPPORT);
@@ -148,6 +153,7 @@ struct sockaddr *addr;
return (0);
}
+void
hd_initvars (hdp)
register struct hdcb *hdp;
{
@@ -174,6 +180,7 @@ register struct hdcb *hdp;
hdp->hd_condition = 0;
}
+int
hd_decode (hdp, frame)
register struct hdcb *hdp;
struct Hdlc_frame *frame;
@@ -239,6 +246,7 @@ struct Hdlc_frame *frame;
* Only supervisory or unnumbered frames are processed.
*/
+void
hd_writeinternal (hdp, frametype, pf)
register struct hdcb *hdp;
register int frametype, pf;
@@ -247,6 +255,7 @@ register int frametype, pf;
struct Hdlc_frame *frame;
register struct Hdlc_sframe *sframe;
register struct Hdlc_uframe *uframe;
+ void hd_flush();
MGETHDR (buf, M_DONTWAIT, MT_HEADER);
if (buf == 0)
@@ -338,6 +347,7 @@ struct hdtxq *q;
return (m);
}
+void
hd_append (q, m)
register struct hdtxq *q;
register struct mbuf *m;
@@ -351,6 +361,7 @@ register struct mbuf *m;
q -> tail = m;
}
+void
hd_flush (ifp)
struct ifnet *ifp;
{
@@ -367,6 +378,7 @@ struct ifnet *ifp;
}
}
+void
hd_message (hdp, msg)
struct hdcb *hdp;
char *msg;
@@ -380,6 +392,7 @@ char *msg;
}
#ifdef HDLCDEBUG
+void
hd_status (hdp)
struct hdcb *hdp;
{
diff --git a/sys/netccitt/hd_timer.c b/sys/netccitt/hd_timer.c
index 8b2ede4..925ff6a 100644
--- a/sys/netccitt/hd_timer.c
+++ b/sys/netccitt/hd_timer.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)hd_timer.c 8.1 (Berkeley) 6/10/93
- * $Id$
+ * $Id: hd_timer.c,v 1.2 1994/08/02 07:47:09 davidg Exp $
*/
#include <sys/param.h>
@@ -60,10 +60,6 @@
* default values are inappropriate
*/
-int hd_t1 = T1;
-int hd_t3 = T3;
-int hd_n2 = N2;
-
/*
* HDLC TIMER
*
@@ -71,6 +67,7 @@ int hd_n2 = N2;
* amount - if expired then process the event.
*/
+void
hd_timer ()
{
register struct hdcb *hdp;
diff --git a/sys/netccitt/if_x25subr.c b/sys/netccitt/if_x25subr.c
index c75cdd4..c7b625e 100644
--- a/sys/netccitt/if_x25subr.c
+++ b/sys/netccitt/if_x25subr.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if_x25subr.c 8.1 (Berkeley) 6/10/93
- * $Id: if_x25subr.c,v 1.2 1994/08/02 07:47:14 davidg Exp $
+ * $Id: if_x25subr.c,v 1.3 1994/12/13 22:32:12 wollman Exp $
*/
#include <sys/param.h>
@@ -127,6 +127,8 @@ register struct rtentry *rt;
}
return lx;
}
+
+void
x25_lxfree(lx)
register struct llinfo_x25 *lx;
{
@@ -145,9 +147,11 @@ register struct llinfo_x25 *lx;
remque(lx);
FREE(lx, M_PCB);
}
+
/*
* Process a x25 packet as datagram;
*/
+void
x25_ifinput(lcp, m)
struct pklcd *lcp;
register struct mbuf *m;
@@ -157,6 +161,7 @@ register struct mbuf *m;
struct ifqueue *inq;
extern struct timeval time;
int s, len, isr;
+ void x25_connect_callback();
if (m == 0 || lcp->lcd_state != DATA_TRANSFER) {
x25_connect_callback(lcp, 0);
@@ -211,6 +216,8 @@ register struct mbuf *m;
}
splx(s);
}
+
+void
x25_connect_callback(lcp, m)
register struct pklcd *lcp;
register struct mbuf *m;
@@ -242,6 +249,7 @@ register struct mbuf *m;
#define SA(p) ((struct sockaddr *)(p))
#define RT(p) ((struct rtentry *)(p))
+void
x25_dgram_incoming(lcp, m0)
register struct pklcd *lcp;
struct mbuf *m0;
@@ -276,6 +284,7 @@ refuse: lcp->lcd_upper = 0;
/*
* X.25 output routine.
*/
+int
x25_ifoutput(ifp, m0, dst, rt)
struct ifnet *ifp;
struct mbuf *m0;
@@ -390,6 +399,7 @@ next_circuit:
/*
* Simpleminded timer routine.
*/
+void
x25_iftimeout(ifp)
struct ifnet *ifp;
{
@@ -413,7 +423,10 @@ struct ifnet *ifp;
* This routine gets called when validating additions of new routes
* or deletions of old ones.
*/
+
+void
x25_rtrequest(cmd, rt, dst)
+int cmd;
register struct rtentry *rt;
struct sockaddr *dst;
{
@@ -424,7 +437,6 @@ struct sockaddr *dst;
/* would put this pk_init, except routing table doesn't
exist yet. */
if (x25_dgram_sockmask == 0) {
- struct radix_node *rn_addmask();
x25_dgram_sockmask =
SA(rn_addmask((caddr_t)&x25_dgmask, 0, 4)->rn_key);
}
@@ -464,6 +476,7 @@ struct sockaddr *dst;
int x25_dont_rtinvert = 0;
+void
x25_rtinvert(cmd, sa, rt)
register struct sockaddr *sa;
register struct rtentry *rt;
OpenPOWER on IntegriCloud