Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Apr 1998 20:50:21 +0200 (CEST)
From:      balu@dva.in-berlin.de (Boris Staeblow)
To:        freebsd-isdn@FreeBSD.ORG
Subject:   diff for BISDNTEST3 and latest FreeBSD-current!
Message-ID:  <m0yORpe-000JzaC@dva.in-berlin.de>

next in thread | raw e-mail | index | archive | help

Because of the recent time-changes in FreeBSD-current i've spend some
hours to make bisdntest-3 work and compile with the latest current.

I'm not so familiar with C and kernel-hacking, so i hope i've
done it in the right way. My kernel is running fine now.

Can anyone confirm the correctness of this diff?

Boris

diff -r -u ../bisdntest.orig/diffs/sys-conf-files.diff ./diffs/sys-conf-files.diff
--- ../bisdntest.orig/diffs/sys-conf-files.diff	Sat Aug 30 16:34:45 1997
+++ ./diffs/sys-conf-files.diff	Sun Apr 12 20:02:13 1998
@@ -1,88 +1,61 @@
-*** files.orig	Sat Aug 30 16:23:12 1997
---- files	Sat Aug 30 16:32:30 1997
-***************
-*** 28,33 ****
---- 28,42 ----
-  dev/ppbus/ppi.c		optional ppi
-  dev/ppbus/vpo.c		optional vpo
-  dev/vn/vn.c		optional vn
-+ bisdn/b_isdntel.c       optional ispy device-driver
-+ bisdn/b_isdntel.c       optional itel device-driver
-+ bisdn/b_isdntty.c       optional ity device-driver
-+ bisdn/b_isdnipi.c       optional ipi device-driver
-+ bisdn/b_isdnipp.c       optional ipp device-driver
-+ bisdn/b_isdn.c          optional isdn device-driver
-+ bisdn/b_isdnlap.c       optional disdn device-driver
-+ bisdn/b_disdn.c         optional disdn device-driver
-+ 
-  dev/vx/if_vx.c		optional vx  device-driver
-  gnu/ext2fs/ext2_alloc.c		optional ext2fs
-  gnu/ext2fs/ext2_balloc.c	optional ext2fs
-***************
-*** 84,90 ****
-  kern/kern_sysctl.c	standard
-  kern/kern_time.c	standard
-  kern/kern_xxx.c		standard
-- kern/md5c.c		optional md5
-  kern/subr_diskslice.c	standard
-  kern/subr_dkbad.c	standard
-  kern/subr_log.c		standard
---- 93,98 ----
-***************
-*** 167,172 ****
---- 175,181 ----
-  net/bpf.c		optional bpfilter
-  net/bpf_filter.c	optional bpfilter
-  net/bsd_comp.c		optional ppp_bsdcomp
-+ net/bsd_comp.c		optional ipp
-  net/hostcache.c		standard
-  net/if.c		standard
-  net/if_atmsubr.c	optional atm
-***************
-*** 177,193 ****
---- 186,206 ----
-  net/if_media.c		standard
-  net/if_mib.c		standard
-  net/if_ppp.c		optional ppp
-+ net/if_ppp.c		optional ipp
-  net/if_sl.c		optional sl
-  net/if_spppsubr.c	optional sppp
-  net/if_tun.c		optional tun
-  net/ppp_deflate.c	optional ppp_deflate
-  net/ppp_tty.c		optional ppp
-+ net/ppp_tty.c		optional ipp
-  net/radix.c		standard
-  net/raw_cb.c		standard
-  net/raw_usrreq.c	standard
-  net/route.c		standard
-  net/rtsock.c		standard
-  net/slcompress.c	optional ppp
-+ net/slcompress.c	optional ipp
-+ net/slcompress.c	optional ipi
-  net/slcompress.c	optional sl
-  net/zlib.c		optional ppp_deflate
-  netatalk/aarp.c		optional netatalk
-***************
-*** 229,234 ****
---- 242,252 ----
-  netinet/in_proto.c	optional inet
-  netinet/in_rmx.c	optional inet
-  netinet/ip_divert.c	optional ipdivert
-+ netinet/ip_fil.c      optional ipfilter inet
-+ netinet/fil.c         optional ipfilter inet
-+ netinet/ip_nat.c      optional ipfilter inet
-+ netinet/ip_frag.c     optional ipfilter inet
-+ netinet/ip_state.c    optional ipfilter inet
-  netinet/ip_fw.c		optional ipfirewall
-  netinet/ip_icmp.c	optional inet
-  netinet/ip_input.c	optional inet
-***************
-*** 355,361 ****
-  pci/pci.c		optional pci device-driver
-  pci/pci_compat.c	optional pci
-  pci/pcisupport.c	optional pci
-- pci/tek390.c		optional amd device-driver
-  pci/wdc_p.c		optional wdc device-driver
-  scsi/cd.c		optional cd
-  scsi/ch.c		optional ch
---- 373,378 ----
+--- files.orig	Sun Apr 12 15:20:45 1998
++++ files	Sun Apr 12 19:15:10 1998
+@@ -54,6 +54,14 @@
+ dev/ppbus/pps.c		optional pps
+ dev/ppbus/vpo.c		optional vpo
+ dev/vn/vn.c		optional vn
++bisdn/b_isdntel.c       optional ispy device-driver
++bisdn/b_isdntel.c       optional itel device-driver
++bisdn/b_isdntty.c       optional ity device-driver
++bisdn/b_isdnipi.c       optional ipi device-driver
++bisdn/b_isdnipp.c       optional ipp device-driver
++bisdn/b_isdn.c          optional isdn device-driver
++bisdn/b_isdnlap.c       optional disdn device-driver
++bisdn/b_disdn.c         optional disdn device-driver
+ dev/vx/if_vx.c		optional vx  device-driver
+ gnu/ext2fs/ext2_alloc.c		optional ext2fs
+ gnu/ext2fs/ext2_balloc.c	optional ext2fs
+@@ -196,6 +204,7 @@
+ net/bpf.c		optional bpfilter
+ net/bpf_filter.c	optional bpfilter
+ net/bsd_comp.c		optional ppp_bsdcomp
++net/bsd_comp.c          optional ipp
+ #net/hostcache.c		standard
+ net/if.c		standard
+ net/if_atmsubr.c	optional atm
+@@ -206,12 +215,14 @@
+ net/if_media.c		standard
+ net/if_mib.c		standard
+ net/if_ppp.c		optional ppp
++net/if_ppp.c		optional ipp
+ net/if_sl.c		optional sl
+ net/if_spppsubr.c	optional sppp
+ net/if_tun.c		optional tun
+ net/if_vlan.c		optional vlan
+ net/ppp_deflate.c	optional ppp_deflate
+ net/ppp_tty.c		optional ppp
++net/ppp_tty.c		optional ipp
+ net/radix.c		standard
+ net/raw_cb.c		standard
+ net/raw_usrreq.c	standard
+@@ -219,6 +230,8 @@
+ net/rtsock.c		standard
+ net/slcompress.c	optional ppp
+ net/slcompress.c	optional sl
++net/slcompress.c	optional ipp
++net/slcompress.c	optional ipi
+ net/zlib.c		optional ppp_deflate
+ netatalk/aarp.c		optional netatalk
+ netatalk/at_control.c	optional netatalk
+@@ -229,6 +242,11 @@
+ netatalk/ddp_usrreq.c	optional netatalk
+ #netccitt/ccitt_proto.c	optional ccitt
+ #netccitt/hd_debug.c	optional hdlc
++netinet/ip_fil.c      optional ipfilter inet
++netinet/fil.c         optional ipfilter inet
++netinet/ip_nat.c      optional ipfilter inet
++netinet/ip_frag.c     optional ipfilter inet
++netinet/ip_state.c    optional ipfilter inet
+ #netccitt/hd_input.c	optional hdlc
+ #netccitt/hd_output.c	optional hdlc
+ #netccitt/hd_subr.c	optional hdlc
diff -r -u ../bisdntest.orig/sys-bisdn/b_disdn.c ./sys-bisdn/b_disdn.c
--- ../bisdntest.orig/sys-bisdn/b_disdn.c	Tue Oct  7 23:31:29 1997
+++ ./sys-bisdn/b_disdn.c	Sun Apr 12 20:02:42 1998
@@ -725,7 +725,11 @@
 	ctrl->appl = an;
 
 	cs = splclock();
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+	getmicrotime(&ltime);
+#else
 	ltime = time;
+#endif
 	splx(cs);
 
 	ctrl->lastact = ltime.tv_sec;
@@ -835,7 +839,11 @@
 		int cs;
 
 		cs = splclock();
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+		getmicrotime(&ltime);
+#else
 		ltime = time;
+#endif
 		splx(cs);
 
 		ctrl->lastact = ltime.tv_sec;
@@ -926,7 +934,11 @@
 		int cs;
 
 		cs = splclock();
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+		getmicrotime(&ltime);
+#else
 		ltime = time;
+#endif
 		splx(cs);
 
 		ctrl->lastact = ltime.tv_sec;
@@ -1361,7 +1373,11 @@
 	ctrl = &isdn_ctrl[msg->ctrl];
 
 	cs = splclock();
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+	getmicrotime(&ltime);
+#else
 	ltime = time;
+#endif
 	splx(cs);
 
 	ctrl->lastact = ltime.tv_sec;
@@ -1499,7 +1515,11 @@
 			ctrl = &isdn_ctrl[msg->ctrl];
 
 			cs = splclock();
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+			getmicrotime(&ltime);
+#else
 			ltime = time;
+#endif
 			splx(cs);
 
 			ctrl->lastact = ltime.tv_sec;
@@ -1892,7 +1912,11 @@
 		return(0);
 
 	cs = splclock();
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+	getmicrotime(&ltime);
+#else
 	ltime = time;
+#endif
 	splx(cs);
 
 	ctrl->lastact = ltime.tv_sec;
@@ -2213,7 +2237,11 @@
 	if(sc->sc_tei == 0xff)
 	{
 		cs = splclock();
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+		getmicrotime(&ltime);
+#else
 		ltime = time;
+#endif
 		splx(cs);
 
 		for(i=0; i < 16 ; i++, sc->sc_ri++)
@@ -2277,7 +2305,11 @@
 		return;
 
 	cs = splclock();
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+	getmicrotime(&ltime);
+#else
 	ltime = time;
+#endif
 	splx(cs);
 
 	m->m_len = 8;
diff -r -u ../bisdntest.orig/sys-bisdn/b_isdn.c ./sys-bisdn/b_isdn.c
--- ../bisdntest.orig/sys-bisdn/b_isdn.c	Wed Oct  8 00:34:27 1997
+++ ./sys-bisdn/b_isdn.c	Sun Apr 12 20:02:42 1998
@@ -98,6 +98,9 @@
 #include <sys/conf.h>
 #include <sys/mbuf.h>
 #include <sys/proc.h>
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#include <sys/uio.h>
+#endif
 
 #if BSD > 199306 && defined(DEVFS)
 #include <sys/devfsext.h>
@@ -783,7 +786,11 @@
 			{
 				isdn_timeout = 1;
 				cs = splclock();
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+				getmicrotime(&ltime);
+#else
 				ltime = time;
+#endif
 				splx(cs);
 #ifdef TO_DEBUG
 /* if (to_debug) */
@@ -835,7 +842,11 @@
 		(*appl->Connect) (appl->drivno);
 
 	cs = splclock();
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+	isdn_ctrl[cn].call_start = time_second;
+#else
 	isdn_ctrl[cn].call_start = time.tv_sec;
+#endif
 	splx (cs);
 	
 	if((isdn_timeout == 0) && appl->idle_time)
diff -r -u ../bisdntest.orig/sys-bisdn/b_isdnipi.c ./sys-bisdn/b_isdnipi.c
--- ../bisdntest.orig/sys-bisdn/b_isdnipi.c	Tue Oct  7 23:31:29 1997
+++ ./sys-bisdn/b_isdnipi.c	Sun Apr 12 20:02:42 1998
@@ -101,6 +101,10 @@
  *
  *---------------------------------------------------------------------------*/
 
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#include "opt_inet.h"
+#endif
+ 
 #ifdef INET
 
 #include "ipi.h"
@@ -111,6 +115,11 @@
 #include <sys/mbuf.h>
 #include <sys/socket.h>
 #include <sys/errno.h>
+
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+#include <sys/malloc.h>
+#endif
+
 #if BSD > 199306 && defined (__FreeBSD__)
 #include <sys/ioccom.h>
 #include <sys/sockio.h>
@@ -663,7 +672,11 @@
 
 #endif /* IPI_VJ */
 
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+	getmicrotime(&sc->sc_if.if_lastchange);
+#else
 	sc->sc_if.if_lastchange = time;
+#endif
 	
 	x = splimp();
 
@@ -803,7 +816,11 @@
 	m->m_pkthdr.rcvif = &sc->sc_if;
 	m->m_pkthdr.len = m->m_len;
 
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+	getmicrotime(&sc->sc_if.if_lastchange);
+#else
 	sc->sc_if.if_lastchange = time;
+#endif
 	
 #ifdef IPI_VJ
 	sc->sc_cinb += m->m_pkthdr.len;
diff -r -u ../bisdntest.orig/sys-bisdn/b_isdnlap.c ./sys-bisdn/b_isdnlap.c
--- ../bisdntest.orig/sys-bisdn/b_isdnlap.c	Tue Oct  7 23:31:29 1997
+++ ./sys-bisdn/b_isdnlap.c	Sun Apr 12 20:02:42 1998
@@ -507,7 +507,11 @@
 	{
 		/* Start round trip timer */
 		hd->rtt_seq = (hd->vs-1) & hd->mmask;
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+		getmicrotime(&hd->rtt_time);
+#else
 		hd->rtt_time = time;
+#endif
 		hd->flags.rtt_run = 1;
 	}
 	return 1;
@@ -653,6 +657,15 @@
 timediff(struct timeval *t1)
 {
 	long t;
+	struct timeval tv;
+	getmicrotime(&tv);
+
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+	t= (tv.tv_usec - t1->tv_usec) / 1000;
+	return(t + (tv.tv_sec - t1->tv_sec)*1000);
+#else
 	t= (time.tv_usec - t1->tv_usec) / 1000;
 	return(t + (time.tv_sec - t1->tv_sec)*1000);
+#endif
+
 }
diff -r -u ../bisdntest.orig/sys-bisdn/b_isdntel.c ./sys-bisdn/b_isdntel.c
--- ../bisdntest.orig/sys-bisdn/b_isdntel.c	Sat Apr  5 14:43:42 1997
+++ ./sys-bisdn/b_isdntel.c	Sun Apr 12 20:02:42 1998
@@ -170,7 +170,12 @@
 	{
 		m->m_data[0]= out;
 		*(u_long *) &m->m_data[1]= ispyabscnt++;
+
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+		getmicrotime(&*(struct timeval *) &m->m_data[5]);
+#else
 		*(struct timeval *) &m->m_data[5]= time;
+#endif
 	}
 	IS_ENQUEUE(&i_q[no],m);
 
 
-- 
balu@dva.in-berlin.de
   Boris Staeblow

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isdn" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m0yORpe-000JzaC>