MathiasJeschkeRestricted: Difference between revisions

From
Jump to navigation Jump to search
No edit summary
 
(25 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Wifi Benchmark =
* ath <--> ath0 ~ 1 MByte/s
* ath <--> prism2 ~ ?? MByte/s
* ath <--> prism2/ath <--> ath ~ ?? MByte/s (2 Channels)

= Get versions from neighbour beacons =
= Get versions from neighbour beacons =
$ click-align /mnt/mj/brn/dump_sdp.click | /tmp/clickrun/click
$ click-align /mnt/mj/brn/dump_sdp.click | /tmp/clickrun/click
Line 6: Line 11:
#!/bin/sh
#!/bin/sh
ADD_HOSTS="mn11"
exec 2>&-
exec 2>&-
HOSTS=${1:-$(seq 21 55)}
if [ -z $1 ]
then
for i in $(seq 21 55)
do
HOSTS="$HOSTS wgt$i"
done
HOSTS="$HOSTS $ADD_HOSTS"
else
HOSTS="$1"
fi
for i in $HOSTS
for i in $HOSTS
do
do
echo -n "wgt$i "
echo -n "$i "
echo -n "read sdp/sdp.meta" | netcat -w 1 wgt$i 7777 | sed -n 4p | sed 's/.*\(version="[0-9]*"\).*\(start_time="[0-9]*"\).*/\1 \2/' |tr '\012' ' '
echo -n "read sdp/sdp.meta" | netcat -w 1 $i 7777 | sed -n 4p | sed 's/.*\(version="[0-9]*"\).*\(start_time="[0-9]*"\).*/\1 \2/' |tr '\012' ' '
echo
echo
done
done



= Kernel-Click =
= Kernel-Click =
Line 33: Line 47:
sh build.sh
sh build.sh


== Minimal Kernel-Click-Config for SDP ==
<pre>
FromDevice(wlan0) //, PROMISC true
-> Prism2Decap()
-> ExtraDecap()
-> FilterPhyErr()
-> filter :: FilterTX();

filter[0]
-> WifiDupeFilter()
-> mgm_clf :: Classifier(0/00%0f, -); // management frames

mgm_clf[0] //handle mgmt frames
-> Discard;

mgm_clf[1] //handle other frames (data)
-> WifiDecap()
-> Classifier(12/8086)
-> EtherDecap()
-> brnclf :: Classifier(0/01, //BrnSDP
0/02, //BrnTFTP
- //other
);

brnclf[0] // sdp
-> to_user_click::Null;

brnclf[1] // tftp
-> to_user_click;

to_user_click
-> PushMACHeader()
-> Print(to_user_click)
-> WifiEncap(0x00, 0:0:0:0:0:0)
-> ToHostSniffers(wlan0);

brnclf[2] //dsr
-> Discard;
</pre>

== Symbol problem with i586 ==
* elements/brn/brnlinktable.hh
** Vector<EtherAddress> last_route;

== Telnet/IP access ==
* svn://brn-svn/BerlinRoofNet/trunk/click/configurations/main/brn.kclick


= Files for Geode Nodes =
= Files for Geode Nodes =
Line 39: Line 99:
* /brn/sdp/current_id (contains 0)
* /brn/sdp/current_id (contains 0)
* /brn/start.sh
* /brn/start.sh
* /brn/ath_hal.ko
* /brn/ath_pci.ko
* /brn/click-align
* /usr/sbin/click-align -> /brn/click-align
* /etc/rc2.d/S99brnstart -> /brn/start.sh
* /var/updatelink -> /tmp/sdp
* /usr/sbin/rcclick -> /var/updatelink/current/activate
* /var/update/fallback-stage1
* /usr/sbin/click-align -> /brn/click-align

echo 'savedefault --default=1 --once' | grub --batch

= Links =
[[Multiplatform-SDP]]


brn-hu-wlan1.dyndns.org -> 141.20.192.200

ifconfig eth1 up
wl scan
wl scnaresults
wl join <essid> [key xxxxxxxxxx]


= VMware Server for OSP =
* VM duplizieren
** vmx-Files anpassen (MAC-Adressen)
** VMs in Server eintragen (/etc/vmware/vm-list)
** auf private setzen (/etc/vmware/vm-list-private)
** Was ist mit den UUID der VMs?
** Nutzer und Passwörter generieren und setzen (home: /vmware/home/osp01..osp12)
** <pre>ssh sarprk -p 22xx -l root</pre>
* VM TODO
** Zeit-Problem lösen / NTP einrichten
** Software
***

= MRTG =
$ yast -i mrtg


= click-core für linux-2.6.16.13 =
Index: linuxmodule/proclikefs.c
===================================================================
--- linuxmodule/proclikefs.c (Revision 2589)
+++ linuxmodule/proclikefs.c (Arbeitskopie)
@@ -222,8 +222,15 @@
struct list_head *p;
DEBUG("killing files");
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16)
file_list_lock();
+ list_for_each(p, &sb->s_files) {
+ struct file *filp = list_entry(p, struct file, f_u.fu_list);
+ filp->f_op = dummy;
+ }
+ file_list_unlock();
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0)
+ file_list_lock();
for (p = sb->s_files.next; p != &sb->s_files; p = p->next) {
struct file *filp = list_entry(p, struct file, f_list);
filp->f_op = dummy;
@@ -259,7 +266,11 @@
/* Prepend children to dentry_tree */
next = active->d_subdirs.next;
while (next != &active->d_subdirs) {
- struct dentry *child = list_entry(next, struct dentry, d_child);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16)
+ struct dentry *child = list_entry(next, struct dentry, d_u.d_child);
+#else
+ struct dentry *child = list_entry(next, struct dentry, d_child);
+#endif
next = next->next;
d_drop(child);
child->d_fsdata = (void *)dentry_tree;
Index: linuxmodule/skbmgr.cc
===================================================================
--- linuxmodule/skbmgr.cc (Revision 2589)
+++ linuxmodule/skbmgr.cc (Arbeitskopie)
@@ -257,7 +257,9 @@
skb->pkt_bridged = 0;
#endif
skb->prev = NULL;
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 15)
skb->list = NULL;
+#endif
skb->sk = NULL;
#if HAVE_LINUX_SKBUFF_SECURITY
skb->security = 0;
Index: include/click/packet.hh
===================================================================
--- include/click/packet.hh (Revision 2589)
+++ include/click/packet.hh (Arbeitskopie)
@@ -197,9 +197,27 @@
#ifdef CLICK_LINUXMODULE
- const Timestamp &timestamp_anno() const { return *(const Timestamp*) &skb()->stamp; }
- Timestamp &timestamp_anno() { return *(Timestamp*) &skb()->stamp; }
- void set_timestamp_anno(const Timestamp &tv) { memcpy(&skb()->stamp, &tv, 8); }
+ const Timestamp &timestamp_anno() const {
+ # if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 13)
+ return *(const Timestamp *) &skb()->stamp;
+ # else
+ return *(const Timestamp *) &skb()->tstamp;
+ # endif
+ }
+ Timestamp &timestamp_anno() {
+ # if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 13)
+ return *(Timestamp *) &skb()->stamp;
+ # else
+ return *(Timestamp *) &skb()->tstamp;
+ # endif
+ }
+ void set_timestamp_anno(const Timestamp &tv) {
+ # if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 13)
+ memcpy(&skb()->stamp, &tv, 8);
+ # else
+ memcpy(&skb()->tstamp, &tv, 8);
+ # endif
+ }
net_device *device_anno() const { return skb()->dev; }
void set_device_anno(net_device *dev) { skb()->dev = dev; }
PacketType packet_type_anno() const { return (PacketType)(skb()->pkt_type & PACKET_TYPE_MASK); }
@@ -440,7 +458,9 @@
{
struct sk_buff *b = skb();
b->next = b->prev = 0;
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 15)
b->list = 0;
+#endif
skbmgr_recycle_skbs(b);
}
#endif
Index: conf_mips.sh
===================================================================
--- conf_mips.sh (Revision 2589)
+++ conf_mips.sh (Arbeitskopie)
@@ -1,3 +1,4 @@
#! /bin/sh
-./configure --host=mipsel-linux --build=i686-pc-linux-gnu --with-linux=`pwd`/../../platform/wgt634u/linux-kernel-2.6.12-rc3/ --enable-tools=host CFLAGS="-mlong-calls -g -O2"
+./configure --host=mipsel-linux --build=i686-pc-linux-gnu --with-linux=/tmp/WGT634U-Linux-2.6.16.13/linux-2.6.16.13-mips-click/ --enable-tools=host CFLAGS="-mlong-calls -g -O2"
+#./configure --host=mipsel-linux --build=i686-pc-linux-gnu --with-linux=/tmp/WGT634U-Linux-2.6.16.13/linux-2.6.16.13-mips-click/ --enable-tools=host --disable-int64 CFLAGS="-mlong-calls -g -O2"
Index: elements/standard/script.cc
===================================================================
--- elements/standard/script.cc (Revision 2589)
+++ elements/standard/script.cc (Arbeitskopie)
@@ -597,7 +597,7 @@
accum += (what == AR_ADD || first ? arg : -arg);
first = false;
}
- str = String(accum);
+ str = String((unsigned long) accum);
return 0;
}
Index: elements/standard/counter.cc
===================================================================
--- elements/standard/counter.cc (Revision 2589)
+++ elements/standard/counter.cc (Arbeitskopie)
@@ -62,7 +62,7 @@
if (!PARSECMD(cp_pop_spacevec(count_call), &_count_trigger))
return errh->error("'COUNT_CALL' first word should be unsigned (count)");
else if (cp_errno == CPE_OVERFLOW)
- errh->error("COUNT_CALL too large; max %s", String(_count_trigger).c_str());
+ errh->error("COUNT_CALL too large; max %s", String((unsigned long) _count_trigger).c_str());
_count_trigger_h = new HandlerCall(count_call);
} else
_count_trigger = (counter_t)(-1);
@@ -71,7 +71,7 @@
if (!PARSECMD(cp_pop_spacevec(byte_count_call), &_byte_trigger))
return errh->error("'BYTE_COUNT_CALL' first word should be unsigned (count)");
else if (cp_errno == CPE_OVERFLOW)
- errh->error("BYTE_COUNT_CALL too large; max %s", String(_count_trigger).c_str());
+ errh->error("BYTE_COUNT_CALL too large; max %s", String((unsigned long) _count_trigger).c_str());
_byte_trigger_h = new HandlerCall(byte_count_call);
} else
_byte_trigger = (counter_t)(-1);


= Nightly Build =
$ svn co svn://repos.majes.de:8690/studienarbeit/nightly-build


= BRN -at- Stanford =
Nodes:


Revisions:
* Kernel: 2700 (svn://brn-svn.sar.informatik.hu-berlin.de/BerlinRoofNet/trunk/platform/wgt634u/linux-2.6.16.13-mips-click)
* click: build: Sep 20 2006 17:53:58 by jmueller@brn-suse093-4, $Rev: 2831 $ (svn://brn-svn.sar.informatik.hu-berlin.de/BerlinRoofNet/trunk/click/click-core)
* click-config: 2827 (svn://brn-svn/BerlinRoofNet/trunk/click/configurations/main) -- differences between r2827 and shipped firmware: http://openwgt.informatik.hu-berlin.de/brn/diff-to-r2827.diff


= Troubleshooting =
* Routing geht nicht?
* NVRAM-Einstellungen auf default oder falsch

Latest revision as of 15:13, 19 March 2007

Wifi Benchmark

  • ath <--> ath0 ~ 1 MByte/s
  • ath <--> prism2 ~ ?? MByte/s
  • ath <--> prism2/ath <--> ath ~ ?? MByte/s (2 Channels)

Get versions from neighbour beacons

$ click-align /mnt/mj/brn/dump_sdp.click | /tmp/clickrun/click


Get versions via telnet (Ethernet conn. required)

#!/bin/sh

ADD_HOSTS="mn11"

exec 2>&-
if [ -z $1 ]
then
    for i in $(seq 21 55)
    do
        HOSTS="$HOSTS wgt$i"
    done
    HOSTS="$HOSTS $ADD_HOSTS"
else
    HOSTS="$1"
fi

for i in $HOSTS
do
  echo -n "$i "
  echo -n "read sdp/sdp.meta" | netcat -w 1 $i 7777 | sed -n 4p | sed 's/.*\(version="[0-9]*"\).*\(start_time="[0-9]*"\).*/\1 \2/' |tr '\012' ' '
  echo
done

Kernel-Click

  • Checkout latest click
svn co svn://merkur.sardmn.informatik.hu-berlin.de/brn/archives/click-20051012/
  • Checkout BRN sources
cd  click-20051012
cd elements
svn co svn://merkur.sardmn.informatik.hu-berlin.de/brn/platform/wgt634u/brn/src brn
cd ..
sh conf_geode.sh
cd linuxmodule
vi build.sh
sh build.sh 

Minimal Kernel-Click-Config for SDP

FromDevice(wlan0) //, PROMISC true
  -> Prism2Decap()
  -> ExtraDecap()
  -> FilterPhyErr()
  -> filter :: FilterTX();

filter[0]
  -> WifiDupeFilter()
  -> mgm_clf :: Classifier(0/00%0f, -); // management frames

mgm_clf[0] //handle mgmt frames
  -> Discard;

mgm_clf[1] //handle other frames (data)
  -> WifiDecap()
  -> Classifier(12/8086)
  -> EtherDecap()
  -> brnclf :: Classifier(0/01, //BrnSDP
                          0/02, //BrnTFTP
                          -        //other
                          );

brnclf[0] // sdp
-> to_user_click::Null;

brnclf[1] // tftp
-> to_user_click;

to_user_click
        -> PushMACHeader()
        -> Print(to_user_click)
        -> WifiEncap(0x00, 0:0:0:0:0:0)
        -> ToHostSniffers(wlan0);

brnclf[2] //dsr
  -> Discard;

Symbol problem with i586

  • elements/brn/brnlinktable.hh
    • Vector<EtherAddress> last_route;

Telnet/IP access

Files for Geode Nodes

  • /brn/sdp/library/0
  • /brn/sdp/current -> library/0
  • /brn/sdp/current_id (contains 0)
  • /brn/start.sh
  • /brn/ath_hal.ko
  • /brn/ath_pci.ko
  • /brn/click-align
  • /usr/sbin/click-align -> /brn/click-align
  • /etc/rc2.d/S99brnstart -> /brn/start.sh
  • /var/updatelink -> /tmp/sdp
  • /usr/sbin/rcclick -> /var/updatelink/current/activate
  • /var/update/fallback-stage1
  • /usr/sbin/click-align -> /brn/click-align
echo 'savedefault --default=1 --once' | grub --batch

Links

Multiplatform-SDP


brn-hu-wlan1.dyndns.org -> 141.20.192.200

ifconfig eth1 up
wl scan
wl scnaresults
wl join <essid> [key xxxxxxxxxx]


VMware Server for OSP

  • VM duplizieren
    • vmx-Files anpassen (MAC-Adressen)
    • VMs in Server eintragen (/etc/vmware/vm-list)
    • auf private setzen (/etc/vmware/vm-list-private)
    • Was ist mit den UUID der VMs?
    • Nutzer und Passwörter generieren und setzen (home: /vmware/home/osp01..osp12)
    • ssh sarprk -p 22xx -l root
  • VM TODO
    • Zeit-Problem lösen / NTP einrichten
    • Software

MRTG

$ yast -i mrtg


click-core für linux-2.6.16.13

Index: linuxmodule/proclikefs.c
===================================================================
--- linuxmodule/proclikefs.c    (Revision 2589)
+++ linuxmodule/proclikefs.c    (Arbeitskopie)
@@ -222,8 +222,15 @@
     struct list_head *p;

     DEBUG("killing files");
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16)
     file_list_lock();
+    list_for_each(p, &sb->s_files) {
+    struct file *filp = list_entry(p, struct file, f_u.fu_list);
+    filp->f_op = dummy;
+    }
+    file_list_unlock();
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0)
+    file_list_lock();
     for (p = sb->s_files.next; p != &sb->s_files; p = p->next) {
        struct file *filp = list_entry(p, struct file, f_list);
        filp->f_op = dummy;
@@ -259,7 +266,11 @@
        /* Prepend children to dentry_tree */
        next = active->d_subdirs.next;
        while (next != &active->d_subdirs) {
-           struct dentry *child = list_entry(next, struct dentry, d_child);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 16)
+        struct dentry *child = list_entry(next, struct dentry, d_u.d_child);
+#else
+        struct dentry *child = list_entry(next, struct dentry, d_child);
+#endif
            next = next->next;
            d_drop(child);
            child->d_fsdata = (void *)dentry_tree;
Index: linuxmodule/skbmgr.cc
===================================================================
--- linuxmodule/skbmgr.cc       (Revision 2589)
+++ linuxmodule/skbmgr.cc       (Arbeitskopie)
@@ -257,7 +257,9 @@
     skb->pkt_bridged = 0;
 #endif
     skb->prev = NULL;
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 15)
     skb->list = NULL;
+#endif
     skb->sk = NULL;
 #if HAVE_LINUX_SKBUFF_SECURITY
     skb->security = 0;
Index: include/click/packet.hh
===================================================================
--- include/click/packet.hh     (Revision 2589)
+++ include/click/packet.hh     (Arbeitskopie)
@@ -197,9 +197,27 @@


 #ifdef CLICK_LINUXMODULE
-  const Timestamp &timestamp_anno() const { return *(const Timestamp*) &skb()->stamp; }
-  Timestamp &timestamp_anno()          { return *(Timestamp*) &skb()->stamp; }
-  void set_timestamp_anno(const Timestamp &tv) { memcpy(&skb()->stamp, &tv, 8); }
+  const Timestamp &timestamp_anno() const {
+    # if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 13)
+      return *(const Timestamp *) &skb()->stamp;
+    # else
+      return *(const Timestamp *) &skb()->tstamp;
+    # endif
+  }
+  Timestamp &timestamp_anno()          {
+    # if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 13)
+      return *(Timestamp *) &skb()->stamp;
+    # else
+      return *(Timestamp *) &skb()->tstamp;
+    # endif
+  }
+  void set_timestamp_anno(const Timestamp &tv) {
+    # if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 13)
+         memcpy(&skb()->stamp, &tv, 8);
+    # else
+         memcpy(&skb()->tstamp, &tv, 8);
+    # endif
+  }
   net_device *device_anno() const      { return skb()->dev; }
   void set_device_anno(net_device *dev)        { skb()->dev = dev; }
   PacketType packet_type_anno() const  { return (PacketType)(skb()->pkt_type & PACKET_TYPE_MASK); }
@@ -440,7 +458,9 @@
 {
   struct sk_buff *b = skb();
   b->next = b->prev = 0;
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 15)
   b->list = 0;
+#endif
   skbmgr_recycle_skbs(b);
 }
 #endif
Index: conf_mips.sh
===================================================================
--- conf_mips.sh        (Revision 2589)
+++ conf_mips.sh        (Arbeitskopie)
@@ -1,3 +1,4 @@
 #! /bin/sh

-./configure --host=mipsel-linux --build=i686-pc-linux-gnu --with-linux=`pwd`/../../platform/wgt634u/linux-kernel-2.6.12-rc3/  --enable-tools=host CFLAGS="-mlong-calls -g -O2"
+./configure --host=mipsel-linux --build=i686-pc-linux-gnu --with-linux=/tmp/WGT634U-Linux-2.6.16.13/linux-2.6.16.13-mips-click/ --enable-tools=host CFLAGS="-mlong-calls -g -O2"
+#./configure --host=mipsel-linux --build=i686-pc-linux-gnu --with-linux=/tmp/WGT634U-Linux-2.6.16.13/linux-2.6.16.13-mips-click/ --enable-tools=host --disable-int64 CFLAGS="-mlong-calls -g -O2"
Index: elements/standard/script.cc
===================================================================
--- elements/standard/script.cc (Revision 2589)
+++ elements/standard/script.cc (Arbeitskopie)
@@ -597,7 +597,7 @@
            accum += (what == AR_ADD || first ? arg : -arg);
            first = false;
        }
-       str = String(accum);
+       str = String((unsigned long) accum);
        return 0;
     }

Index: elements/standard/counter.cc
===================================================================
--- elements/standard/counter.cc        (Revision 2589)
+++ elements/standard/counter.cc        (Arbeitskopie)
@@ -62,7 +62,7 @@
     if (!PARSECMD(cp_pop_spacevec(count_call), &_count_trigger))
       return errh->error("'COUNT_CALL' first word should be unsigned (count)");
     else if (cp_errno == CPE_OVERFLOW)
-      errh->error("COUNT_CALL too large; max %s", String(_count_trigger).c_str());
+      errh->error("COUNT_CALL too large; max %s", String((unsigned long) _count_trigger).c_str());
     _count_trigger_h = new HandlerCall(count_call);
   } else
     _count_trigger = (counter_t)(-1);
@@ -71,7 +71,7 @@
     if (!PARSECMD(cp_pop_spacevec(byte_count_call), &_byte_trigger))
       return errh->error("'BYTE_COUNT_CALL' first word should be unsigned (count)");
     else if (cp_errno == CPE_OVERFLOW)
-      errh->error("BYTE_COUNT_CALL too large; max %s", String(_count_trigger).c_str());
+      errh->error("BYTE_COUNT_CALL too large; max %s", String((unsigned long) _count_trigger).c_str());
     _byte_trigger_h = new HandlerCall(byte_count_call);
   } else
     _byte_trigger = (counter_t)(-1);


Nightly Build

$ svn co svn://repos.majes.de:8690/studienarbeit/nightly-build


BRN -at- Stanford

Nodes:


Revisions:


Troubleshooting

  • Routing geht nicht?
  • NVRAM-Einstellungen auf default oder falsch