diff options
Diffstat (limited to 'sys/i4b/layer2')
-rw-r--r-- | sys/i4b/layer2/i4b_iframe.c | 21 | ||||
-rw-r--r-- | sys/i4b/layer2/i4b_l2.c | 31 | ||||
-rw-r--r-- | sys/i4b/layer2/i4b_l2.h | 14 | ||||
-rw-r--r-- | sys/i4b/layer2/i4b_l2fsm.c | 20 | ||||
-rw-r--r-- | sys/i4b/layer2/i4b_l2fsm.h | 7 | ||||
-rw-r--r-- | sys/i4b/layer2/i4b_l2timer.c | 20 | ||||
-rw-r--r-- | sys/i4b/layer2/i4b_lme.c | 21 | ||||
-rw-r--r-- | sys/i4b/layer2/i4b_mbuf.c | 33 | ||||
-rw-r--r-- | sys/i4b/layer2/i4b_sframe.c | 20 | ||||
-rw-r--r-- | sys/i4b/layer2/i4b_tei.c | 45 | ||||
-rw-r--r-- | sys/i4b/layer2/i4b_uframe.c | 20 | ||||
-rw-r--r-- | sys/i4b/layer2/i4b_util.c | 20 |
12 files changed, 36 insertions, 236 deletions
diff --git a/sys/i4b/layer2/i4b_iframe.c b/sys/i4b/layer2/i4b_iframe.c index 4280528..7d5cbd1 100644 --- a/sys/i4b/layer2/i4b_iframe.c +++ b/sys/i4b/layer2/i4b_iframe.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved. + * Copyright (c) 1997, 2002 Hellmuth Michaelis. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,19 +27,14 @@ * i4b_iframe.c - i frame handling routines * ------------------------------------------ * - * $Id: i4b_iframe.c,v 1.25 2000/08/24 11:48:57 hm Exp $ - * * $FreeBSD$ * - * last edit-date: [Thu Aug 24 12:49:18 2000] + * last edit-date: [Sat Mar 9 16:07:21 2002] * *---------------------------------------------------------------------------*/ -#ifdef __FreeBSD__ #include "i4bq921.h" -#else -#define NI4BQ921 1 -#endif + #if NI4BQ921 > 0 #include <sys/param.h> @@ -49,18 +44,8 @@ #include <sys/socket.h> #include <net/if.h> -#if defined(__NetBSD__) && __NetBSD_Version__ >= 104230000 -#include <sys/callout.h> -#endif - -#ifdef __FreeBSD__ #include <machine/i4b_debug.h> #include <machine/i4b_trace.h> -#else -#include <i4b/i4b_debug.h> -#include <i4b/i4b_ioctl.h> -#include <i4b/i4b_trace.h> -#endif #include <i4b/include/i4b_global.h> #include <i4b/include/i4b_l1l2.h> diff --git a/sys/i4b/layer2/i4b_l2.c b/sys/i4b/layer2/i4b_l2.c index 96a4a15..745b465 100644 --- a/sys/i4b/layer2/i4b_l2.c +++ b/sys/i4b/layer2/i4b_l2.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved. + * Copyright (c) 1997, 2002 Hellmuth Michaelis. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -29,15 +29,12 @@ * * $FreeBSD$ * - * last edit-date: [Fri Jan 12 16:43:31 2001] + * last edit-date: [Sat Mar 9 16:11:14 2002] * *---------------------------------------------------------------------------*/ -#ifdef __FreeBSD__ #include "i4bq921.h" -#else -#define NI4BQ921 1 -#endif + #if NI4BQ921 > 0 #include <sys/param.h> @@ -46,16 +43,7 @@ #include <sys/socket.h> #include <net/if.h> -#if defined(__NetBSD__) && __NetBSD_Version__ >= 104230000 -#include <sys/callout.h> -#endif - -#ifdef __FreeBSD__ #include <machine/i4b_debug.h> -#else -#include <i4b/i4b_debug.h> -#include <i4b/i4b_ioctl.h> -#endif #include <i4b/include/i4b_l1l2.h> #include <i4b/include/i4b_l2l3.h> @@ -276,29 +264,18 @@ i4b_mph_status_ind(int unit, int status, int parm) l2sc->unit = unit; l2sc->i_queue.ifq_maxlen = IQUEUE_MAXLEN; -#if defined(__FreeBSD__) && __FreeBSD__ > 4 if(!mtx_initialized(&l2sc->i_queue.ifq_mtx)) mtx_init(&l2sc->i_queue.ifq_mtx, "i4b_l2sc", MTX_DEF); -#endif + l2sc->ua_frame = NULL; bzero(&l2sc->stat, sizeof(lapdstat_t)); i4b_l2_unit_init(unit); -#if defined(__FreeBSD__) /* initialize the callout handles for timeout routines */ callout_handle_init(&l2sc->T200_callout); callout_handle_init(&l2sc->T202_callout); callout_handle_init(&l2sc->T203_callout); callout_handle_init(&l2sc->IFQU_callout); -#endif -#if defined(__NetBSD__) && __NetBSD_Version__ >= 104230000 - /* initialize the callout handles for timeout routines */ - callout_init(&l2sc->T200_callout); - callout_init(&l2sc->T202_callout); - callout_init(&l2sc->T203_callout); - callout_init(&l2sc->IFQU_callout); -#endif - break; case STI_L1STAT: /* state of layer 1 */ diff --git a/sys/i4b/layer2/i4b_l2.h b/sys/i4b/layer2/i4b_l2.h index 5277a06..15c6ef8 100644 --- a/sys/i4b/layer2/i4b_l2.h +++ b/sys/i4b/layer2/i4b_l2.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved. + * Copyright (c) 1997, 2002 Hellmuth Michaelis. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,11 +27,9 @@ * i4b_l2.h - ISDN layer 2 (Q.921) definitions * --------------------------------------------- * - * $Id: i4b_l2.h,v 1.23 2000/08/24 11:48:58 hm Exp $ - * * $FreeBSD$ * - * last edit-date: [Sat Mar 18 10:28:22 2000] + * last edit-date: [Sat Mar 9 16:12:20 2002] * *---------------------------------------------------------------------------*/ @@ -63,18 +61,10 @@ typedef struct { void(*T202func)(void *);/* function to be called when T202 expires */ int T203; /* max line idle time */ -#if defined(__FreeBSD__) struct callout_handle T200_callout; struct callout_handle T202_callout; struct callout_handle T203_callout; struct callout_handle IFQU_callout; -#endif -#if defined(__NetBSD__) && __NetBSD_Version__ >= 104230000 - struct callout T200_callout; - struct callout T202_callout; - struct callout T203_callout; - struct callout IFQU_callout; -#endif /* * i4b_iframe.c, i4b_i_frame_queued_up(): value of IFQU_DLY diff --git a/sys/i4b/layer2/i4b_l2fsm.c b/sys/i4b/layer2/i4b_l2fsm.c index 441b314..a0ca484 100644 --- a/sys/i4b/layer2/i4b_l2fsm.c +++ b/sys/i4b/layer2/i4b_l2fsm.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved. + * Copyright (c) 1997, 2002 Hellmuth Michaelis. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,19 +27,14 @@ * i4b_l2fsm.c - layer 2 FSM * ------------------------- * - * $Id: i4b_l2fsm.c,v 1.22 2000/08/24 11:48:58 hm Exp $ - * * $FreeBSD$ * - * last edit-date: [Tue May 30 15:48:20 2000] + * last edit-date: [Sat Mar 9 16:14:07 2002] * *---------------------------------------------------------------------------*/ -#ifdef __FreeBSD__ #include "i4bq921.h" -#else -#define NI4BQ921 1 -#endif + #if NI4BQ921 > 0 #include <sys/param.h> @@ -47,17 +42,8 @@ #include <sys/socket.h> #include <net/if.h> -#if defined(__NetBSD__) && __NetBSD_Version__ >= 104230000 -#include <sys/callout.h> -#endif - -#ifdef __FreeBSD__ #include <machine/i4b_debug.h> #include <machine/i4b_ioctl.h> -#else -#include <i4b/i4b_debug.h> -#include <i4b/i4b_ioctl.h> -#endif #include <i4b/include/i4b_global.h> #include <i4b/include/i4b_l2l3.h> diff --git a/sys/i4b/layer2/i4b_l2fsm.h b/sys/i4b/layer2/i4b_l2fsm.h index c7ddaee..0589560 100644 --- a/sys/i4b/layer2/i4b_l2fsm.h +++ b/sys/i4b/layer2/i4b_l2fsm.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved. + * Copyright (c) 1997, 2002 Hellmuth Michaelis. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,11 +27,9 @@ * i4b_l2fsm.h - layer 2 FSM * ------------------------- * - * $Id: i4b_l2fsm.h,v 1.6 2000/03/18 09:33:48 hm Exp $ - * * $FreeBSD$ * - * last edit-date: [Sat Mar 18 10:28:37 2000] + * last edit-date: [Sat Mar 9 17:47:53 2002] * *---------------------------------------------------------------------------*/ @@ -81,4 +79,3 @@ enum Q921_events { }; #endif /* _I4B_L2FSM_H_ */ - diff --git a/sys/i4b/layer2/i4b_l2timer.c b/sys/i4b/layer2/i4b_l2timer.c index 4ee335a..c3cbf1d 100644 --- a/sys/i4b/layer2/i4b_l2timer.c +++ b/sys/i4b/layer2/i4b_l2timer.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved. + * Copyright (c) 1997, 2002 Hellmuth Michaelis. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,19 +27,14 @@ * i4b_l2timer.c - layer 2 timer handling * -------------------------------------- * - * $Id: i4b_l2timer.c,v 1.20 2000/08/24 11:48:58 hm Exp $ - * * $FreeBSD$ * - * last edit-date: [Thu Aug 24 12:48:52 2000] + * last edit-date: [Sat Mar 9 17:48:58 2002] * *---------------------------------------------------------------------------*/ -#ifdef __FreeBSD__ #include "i4bq921.h" -#else -#define NI4BQ921 1 -#endif + #if NI4BQ921 > 0 #include <sys/param.h> @@ -48,16 +43,7 @@ #include <sys/socket.h> #include <net/if.h> -#if defined(__NetBSD__) && __NetBSD_Version__ >= 104230000 -#include <sys/callout.h> -#endif - -#ifdef __FreeBSD__ #include <machine/i4b_debug.h> -#else -#include <i4b/i4b_debug.h> -#include <i4b/i4b_ioctl.h> -#endif #include <i4b/include/i4b_global.h> diff --git a/sys/i4b/layer2/i4b_lme.c b/sys/i4b/layer2/i4b_lme.c index 7bc08ab..fce3712 100644 --- a/sys/i4b/layer2/i4b_lme.c +++ b/sys/i4b/layer2/i4b_lme.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved. + * Copyright (c) 1997, 2002 Hellmuth Michaelis. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,19 +27,14 @@ * i4b_lme.c - layer management entity * ------------------------------------- * - * $Id: i4b_lme.c,v 1.15 2000/08/24 11:48:58 hm Exp $ - * * $FreeBSD$ * - * last edit-date: [Mon May 29 16:55:12 2000] + * last edit-date: [Sat Mar 9 17:49:42 2002] * *---------------------------------------------------------------------------*/ -#ifdef __FreeBSD__ #include "i4bq921.h" -#else -#define NI4BQ921 1 -#endif + #if NI4BQ921 > 0 #include <sys/param.h> @@ -47,17 +42,7 @@ #include <sys/socket.h> #include <net/if.h> -#if defined(__NetBSD__) && __NetBSD_Version__ >= 104230000 -#include <sys/callout.h> -#endif - -#ifdef __FreeBSD__ #include <machine/i4b_debug.h> -#else -#include <i4b/i4b_debug.h> -#include <i4b/i4b_ioctl.h> -#endif - #include <i4b/layer2/i4b_l2.h> diff --git a/sys/i4b/layer2/i4b_mbuf.c b/sys/i4b/layer2/i4b_mbuf.c index 665ff67..95f234c 100644 --- a/sys/i4b/layer2/i4b_mbuf.c +++ b/sys/i4b/layer2/i4b_mbuf.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved. + * Copyright (c) 1997, 2002 Hellmuth Michaelis. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -29,7 +29,7 @@ * * $FreeBSD$ * - * last edit-date: [Sat Jan 13 13:15:45 2001] + * last edit-date: [Sat Mar 9 17:51:22 2002] * *---------------------------------------------------------------------------*/ @@ -46,18 +46,9 @@ #ifdef I4B_MBUF_TYPE_DEBUG -#ifdef __FreeBSD__ - #define MT_DCHAN 42 #define MT_BCHAN 43 -#else /* NetBSD */ - -#define MT_DCHAN MT_DATA -#define MT_BCHAN MT_DATA - -#endif - #define MT_I4B_D MT_DCHAN #define MT_I4B_B MT_BCHAN @@ -140,16 +131,8 @@ i4b_Dcleanifq(struct ifqueue *ifq) { int x = splimp(); -#if defined (__FreeBSD__) && __FreeBSD__ > 4 IF_DRAIN(ifq); -#else - struct mbuf *m; - while(!IF_QEMPTY(ifq)) - { - IF_DEQUEUE(ifq, m); - i4b_Dfreembuf(m); - } -#endif + splx(x); } @@ -225,16 +208,8 @@ i4b_Bcleanifq(struct ifqueue *ifq) { int x = splimp(); -#if defined (__FreeBSD__) && __FreeBSD__ > 4 IF_DRAIN(ifq); -#else - struct mbuf *m; - while(!IF_QEMPTY(ifq)) - { - IF_DEQUEUE(ifq, m); - i4b_Bfreembuf(m); - } -#endif + splx(x); } diff --git a/sys/i4b/layer2/i4b_sframe.c b/sys/i4b/layer2/i4b_sframe.c index 34697c9..0b4c6c6 100644 --- a/sys/i4b/layer2/i4b_sframe.c +++ b/sys/i4b/layer2/i4b_sframe.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved. + * Copyright (c) 1997, 2002 Hellmuth Michaelis. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,19 +27,14 @@ * i4b_sframe.c - s frame handling routines * ---------------------------------------- * - * $Id: i4b_sframe.c,v 1.15 2000/08/24 11:48:58 hm Exp $ - * * $FreeBSD$ * - * last edit-date: [Mon May 29 16:55:23 2000] + * last edit-date: [Sat Mar 9 17:52:06 2002] * *---------------------------------------------------------------------------*/ -#ifdef __FreeBSD__ #include "i4bq921.h" -#else -#define NI4BQ921 1 -#endif + #if NI4BQ921 > 0 #include <sys/param.h> @@ -48,16 +43,7 @@ #include <sys/socket.h> #include <net/if.h> -#if defined(__NetBSD__) && __NetBSD_Version__ >= 104230000 -#include <sys/callout.h> -#endif - -#ifdef __FreeBSD__ #include <machine/i4b_debug.h> -#else -#include <i4b/i4b_debug.h> -#include <i4b/i4b_ioctl.h> -#endif #include <i4b/include/i4b_l1l2.h> #include <i4b/include/i4b_mbuf.h> diff --git a/sys/i4b/layer2/i4b_tei.c b/sys/i4b/layer2/i4b_tei.c index 9beadf5..1e5cfa8 100644 --- a/sys/i4b/layer2/i4b_tei.c +++ b/sys/i4b/layer2/i4b_tei.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved. + * Copyright (c) 1997, 2002 Hellmuth Michaelis. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,19 +27,14 @@ * i4b_tei.c - tei handling procedures * ----------------------------------- * - * $Id: i4b_tei.c,v 1.25 2000/09/01 14:11:51 hm Exp $ - * * $FreeBSD$ * - * last edit-date: [Fri Oct 13 15:56:35 2000] + * last edit-date: [Sat Mar 9 17:53:27 2002] * *---------------------------------------------------------------------------*/ -#ifdef __FreeBSD__ #include "i4bq921.h" -#else -#define NI4BQ921 1 -#endif + #if NI4BQ921 > 0 #include <sys/param.h> @@ -49,16 +44,7 @@ #include <sys/socket.h> #include <net/if.h> -#if defined(__NetBSD__) && __NetBSD_Version__ >= 104230000 -#include <sys/callout.h> -#endif - -#ifdef __FreeBSD__ #include <machine/i4b_debug.h> -#else -#include <i4b/i4b_debug.h> -#include <i4b/i4b_ioctl.h> -#endif #include <i4b/include/i4b_global.h> #include <i4b/include/i4b_l1l2.h> @@ -282,9 +268,6 @@ i4b_tei_chkresp(l2_softc_t *l2sc) void i4b_make_rand_ri(l2_softc_t *l2sc) { - -#if defined(__FreeBSD__) - u_short val; #ifdef RANDOMDEV @@ -293,28 +276,6 @@ i4b_make_rand_ri(l2_softc_t *l2sc) val = (u_short)random(); #endif /* RANDOMDEV */ -#else - - register u_short val; - register int i; - static int called = 42; - - val = (l2sc->last_rih << 8) | l2sc->last_ril; - - val += ++called; - - for(i=0; i < 50 ; i++, val++) - { - val |= l2sc->unit+i; - val <<= i; - val ^= (time.tv_sec >> 16) ^ time.tv_usec; - val <<= i; - val ^= time.tv_sec ^ (time.tv_usec >> 16); - - if(val != 0 && val != 0xffff) - break; - } -#endif l2sc->last_rih = (val >> 8) & 0x00ff; l2sc->last_ril = val & 0x00ff; } diff --git a/sys/i4b/layer2/i4b_uframe.c b/sys/i4b/layer2/i4b_uframe.c index 1a29f27..f7c89c2 100644 --- a/sys/i4b/layer2/i4b_uframe.c +++ b/sys/i4b/layer2/i4b_uframe.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved. + * Copyright (c) 1997, 2002 Hellmuth Michaelis. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,19 +27,14 @@ * i4b_uframe.c - routines for handling U-frames * ----------------------------------------------- * - * $Id: i4b_uframe.c,v 1.13 2000/08/24 11:48:58 hm Exp $ - * * $FreeBSD$ * - * last edit-date: [Mon May 29 16:55:30 2000] + * last edit-date: [Sat Mar 9 17:54:08 2002] * *---------------------------------------------------------------------------*/ -#ifdef __FreeBSD__ #include "i4bq921.h" -#else -#define NI4BQ921 1 -#endif + #if NI4BQ921 > 0 #include <sys/param.h> @@ -48,16 +43,7 @@ #include <sys/socket.h> #include <net/if.h> -#if defined(__NetBSD__) && __NetBSD_Version__ >= 104230000 -#include <sys/callout.h> -#endif - -#ifdef __FreeBSD__ #include <machine/i4b_debug.h> -#else -#include <i4b/i4b_debug.h> -#include <i4b/i4b_ioctl.h> -#endif #include <i4b/include/i4b_l1l2.h> #include <i4b/include/i4b_l2l3.h> diff --git a/sys/i4b/layer2/i4b_util.c b/sys/i4b/layer2/i4b_util.c index 0569a84..511df7d 100644 --- a/sys/i4b/layer2/i4b_util.c +++ b/sys/i4b/layer2/i4b_util.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2000 Hellmuth Michaelis. All rights reserved. + * Copyright (c) 1997, 2002 Hellmuth Michaelis. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,19 +27,14 @@ * i4b_util.c - layer 2 utility routines * ------------------------------------- * - * $Id: i4b_util.c,v 1.26 2000/08/24 11:48:58 hm Exp $ - * * $FreeBSD$ * - * last edit-date: [Mon May 29 16:55:35 2000] + * last edit-date: [Sat Mar 9 17:55:03 2002] * *---------------------------------------------------------------------------*/ -#ifdef __FreeBSD__ #include "i4bq921.h" -#else -#define NI4BQ921 1 -#endif + #if NI4BQ921 > 0 #include <sys/param.h> @@ -48,16 +43,7 @@ #include <sys/socket.h> #include <net/if.h> -#if defined(__NetBSD__) && __NetBSD_Version__ >= 104230000 -#include <sys/callout.h> -#endif - -#ifdef __FreeBSD__ #include <machine/i4b_debug.h> -#else -#include <i4b/i4b_debug.h> -#include <i4b/i4b_ioctl.h> -#endif #include <i4b/include/i4b_global.h> #include <i4b/include/i4b_l1l2.h> |