A Dijous 29 Març 2007 10:40, Jan Kiszka va escriure:
[....]
> >
> > you have also to add in the rtnet.conf:
> > RTROUTE="${exec_prefix}/sbin/rtroute"
> >
> > this script need to improve a part, because it supposes that the IP
> > address is 192.168.1.X, and it's not correct always. But I don't know how
> > to make some edit of the  $IPADDR var in the way of have the XXX.XXX.XXX.
> > part. Also, the loop should look the netmask to calculate till when the
> > for have to arrive. Well, all of this for the v.0.2 ....
>
> Thanks, looking forward. Just please generate your patch in "unified"
> form (diff -up).

Ok,

sending it. Remember that it has to be improved with the IPaddress. My 
knowledge of regular expressions is very poor and I don't know how to take 
only the first 3 numbers of the IPADDR var to make the loop more clean.

Regards,

Leo
--- rtnet	2007-03-08 18:17:56.000000000 +0100
+++ rtnet-notdma	2007-03-27 13:21:37.000000000 +0200
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# script for loading/unloading RTnet, RTmac/TMDA, and RTcap
+# script for loading/unloading RTnet
 #
 
 prefix="/usr/local/rtnet"
@@ -23,7 +23,10 @@ Usage:
 
     $0 [-cf <config-file>] [-v] capture
         Start only passive realtime capturing
-
+    
+    $0 [-cf <config-file>] [-v] {notdma}
+        Start only in without tdma
+    
     The additional switch -v enables verbose output.
 EOF
 }
@@ -59,6 +62,20 @@ init_rtnet() {
     insmod $RTNET_MOD/tdma$MODULE_EXT >/dev/null
 }
 
+init_notdma() {
+    insmod $RTNET_MOD/rtnet$MODULE_EXT >/dev/null || exit 1
+    insmod $RTNET_MOD/rtipv4$MODULE_EXT >/dev/null || exit 1
+    insmod $RTNET_MOD/rtpacket$MODULE_EXT >/dev/null || exit 1
+    insmod $RTNET_MOD/$RT_DRIVER$MODULE_EXT $RT_DRIVER_OPTIONS >/dev/null || exit 1
+
+    insmod $RTNET_MOD/rt_loopback$MODULE_EXT >/dev/null || exit 1
+
+    $RTIFCONFIG rtlo up 127.0.0.1
+    insmod $RTNET_MOD/rtcfg$MODULE_EXT >/dev/null
+}
+
+
+
 submit_cfg() {
     case "$STATION_TYPE" in
         master)
@@ -251,6 +268,7 @@ if [ "$1" = "-v" ]; then
     RTIFCONFIG="debug_func $RTIFCONFIG"
     RTCFG="debug_func $RTCFG"
     TDMACFG="debug_func $TDMACFG"
+    RTROUTE="debug_func $RTROUTE"
     shift 1
 fi
 
@@ -318,6 +336,15 @@ case "$1" in
         ifconfig rteth0 up
         ifconfig rteth0-mac up
         ;;
+     
+     notdma)
+        init_notdma
+
+        $RTIFCONFIG rteth0 up $IPADDR $NETMASK_OPT
+	for (( i=0; i<255; i++)); do
+	   $RTROUTE solicit 192.168.1.$i dev rteth0
+	done
+	;;
 
     *)
         usage
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
RTnet-users mailing list
RTnet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rtnet-users

Reply via email to