diff --git a/doc/snmp-pain.in b/doc/snmp-pain.in index aa86811dea5b0b314d7cafccea6ad684757c274d..1e2f86f12487758cf999f30202dfaf09b6b37368 100644 --- a/doc/snmp-pain.in +++ b/doc/snmp-pain.in @@ -630,7 +630,7 @@ approach like the global PPSi values described in @ref{wrsPpsi}. The implementation is easier, because I rely on the fact that versions never change while the process runs. So I retrieve the version strings -at initialization time, by calling ``@t{wrsw_version -t}'' (tagged) +at initialization time, by calling ``@t{wrs_version -t}'' (tagged) and parsing its @i{stdout}. Parsing is easier than what we have in @i{wrsPpsi}, but my plan is having a unified parser overall, and eventually get rid of this simplified special case. diff --git a/doc/user_guide/wrs-user_guide.md b/doc/user_guide/wrs-user_guide.md index 915741f06d52ca737e309b0d6f82b1a89d810143..25a2e75b146d63c2968366cc9f12b0ebbc18ea0d 100644 --- a/doc/user_guide/wrs-user_guide.md +++ b/doc/user_guide/wrs-user_guide.md @@ -366,7 +366,7 @@ All these tools are found in `/wr/bin/` which is included in the `$PATH`. The following list resumes the most interesting commands: - * `wrsw_version`: Print information about the SW & HW version of the [WRS]. + * `wrs_version`: Print information about the SW & HW version of the [WRS]. * `rtu_stat`: Routing Table Unit Statistic, returns the routing table information where we can find which MAC needs to be forwarded to which port. It also allows to add and delete entries. * `wr_mon`: WR Switch Sync Monitor, outputs information about the state of WR syncrhonisation such as Phase Tracking, Master-Slave delay, link asymmetry, etc... * `spll_dbg_proxy`: SoftPLL debug proxy, reads out the debug FIFO datastream from the SoftPLL and proxies it via TCP connection to the application running on an outside host, where it can be plotted, analyzed, etc. @@ -686,7 +686,7 @@ executing the following command: ~~~~~{.bash} #On the WRS -wrsw_version > /tmp/bug_report.txt +wrs_version > /tmp/bug_report.txt rtu_stat >> /tmp/bug_report.txt dmesg >> /tmp/bug_report.txt diff --git a/doc/wrs-build.in b/doc/wrs-build.in index 7c1b368a936ce94964bbacdd77254bfcf92ac881..26c6a44f6898ba36dfa5f8dff709608a94c86044 100644 --- a/doc/wrs-build.in +++ b/doc/wrs-build.in @@ -1414,13 +1414,13 @@ The most important tools in @file{userspace/tools} are the following: inconsistent with anything else in the switch, so it is being replaces. -@item wrsw_vlans +@item wrs_vlans The tool allows to configure and unconfigure the VLAN settings for each port and for the RTU daemon. The @t{--help} option lists all configuration items of the tool. @c FIXME: document lm32-vuart rtu_stat spll_dbg_proxy wr_management -@c FIXME: document wrsw_pstats +@c FIXME: document wrs_pstats @end table Please note that to compile the applications and tools outside of the build diff --git a/userspace/rootfs_override/var/www/contact.php b/userspace/rootfs_override/var/www/contact.php index a6df139044087a1826244311030c4eb78a6a7ea8..603f53e9951e44d7825517aa14fd6808bf749b4f 100644 --- a/userspace/rootfs_override/var/www/contact.php +++ b/userspace/rootfs_override/var/www/contact.php @@ -21,7 +21,7 @@ <?php $_SESSION['advance']=""; ?> <p><strong>WRSW OS: <?php $str = shell_exec("uname -r"); echo $str; ?> </strong></p> - <p><strong><?php $str = shell_exec("/wr/bin/wrsw_version -g"); $str = str_replace("\n","<br>",$str); + <p><strong><?php $str = shell_exec("/wr/bin/wrs_version -g"); $str = str_replace("\n","<br>",$str); $str=str_replace("Reading GW info","",$str); echo $str; ?></strong></p><p> </p> <br> <center><p align=right><strong>Open Hardware Repository <a href="http://www.ohwr.org/projects/white-rabbit/wiki">http://www.ohwr.org/projects/white-rabbit/wiki</a> </strong></p></strong></p><p> </p> diff --git a/userspace/rootfs_override/var/www/delvlan.php b/userspace/rootfs_override/var/www/delvlan.php index 4afceb7db4c696ad294c3a847994481f503ac843..cf14551ed563f66a4d7c7c34d4f40ba4df5e50ec 100644 --- a/userspace/rootfs_override/var/www/delvlan.php +++ b/userspace/rootfs_override/var/www/delvlan.php @@ -26,10 +26,10 @@ <?php if(!strcmp($_GET['vlan'],"all")){ // Delete all vlans and free ports - shell_exec("/wr/bin/wrsw_vlans --clear"); + shell_exec("/wr/bin/wrs_vlans --clear"); }else{ - shell_exec("/wr/bin/wrsw_vlans --rvid ".$_GET['vlan']." --del"); + shell_exec("/wr/bin/wrs_vlans --rvid ".$_GET['vlan']." --del"); } diff --git a/userspace/rootfs_override/var/www/functions.php b/userspace/rootfs_override/var/www/functions.php index 0bd1f964a9ef9cf6ba5f14351af13503dfcba2e3..43eb7edc919fe4604bf832154cc44e771d3f00f3 100644 --- a/userspace/rootfs_override/var/www/functions.php +++ b/userspace/rootfs_override/var/www/functions.php @@ -109,7 +109,7 @@ function wrs_header_ports(){ * @author José Luis Gutiérrez <jlgutierrez@ugr.es> * * Displays the info comming from the following commands: - * uname, wrsw_version, wr_date and php.ini + * uname, wrs_version, wr_date and php.ini * */ function wrs_main_info(){ @@ -140,13 +140,13 @@ function wrs_main_info(){ //echo '<tr><th> <b>OS name:</b> </th><th><center>'; $str = shell_exec("uname -s"); echo $str; echo '</center></th></tr>'; echo '<tr><th align=center> <b><font color="darkblue">Kernel Version</font></b> </th><th><center>'; $str = shell_exec("uname -r"); echo $str; $str = shell_exec("uname -v"); echo $str; echo '</center></th></tr>'; - echo '<tr><th align=center> <b><font color="darkblue">Firmware Version</font></b> </th><th><center> '; $str = shell_exec("/wr/bin/wrsw_version | awk '{print $4}'"); + echo '<tr><th align=center> <b><font color="darkblue">Firmware Version</font></b> </th><th><center> '; $str = shell_exec("/wr/bin/wrs_version | awk '{print $4}'"); echo '<a href="showfile.php?help_id=gateware&name=GateWare Info" onClick="showPopup(this.href);return(false);"</a>'; echo $str; echo '</center></th></tr>'; - echo '<tr><th align=center> <b><font color="darkblue">PCB Version</font></b> </th><th><center>'; $str = shell_exec("/wr/bin/wrsw_version -p"); echo $str; echo '</center></th></tr>'; - echo '<tr><th align=center> <b><font color="darkblue">FPGA</font></b> </th><th><center>'; $str = shell_exec("/wr/bin/wrsw_version -f"); echo $str; echo '</center></th></tr>'; - echo '<tr><th align=center> <b><font color="darkblue">Compiling Date</font></b> </th><th><center>'; $str = shell_exec("/wr/bin/wrsw_version -c"); echo $str; echo '</center></th></tr>'; + echo '<tr><th align=center> <b><font color="darkblue">PCB Version</font></b> </th><th><center>'; $str = shell_exec("/wr/bin/wrs_version -p"); echo $str; echo '</center></th></tr>'; + echo '<tr><th align=center> <b><font color="darkblue">FPGA</font></b> </th><th><center>'; $str = shell_exec("/wr/bin/wrs_version -f"); echo $str; echo '</center></th></tr>'; + echo '<tr><th align=center> <b><font color="darkblue">Compiling Date</font></b> </th><th><center>'; $str = shell_exec("/wr/bin/wrs_version -c"); echo $str; echo '</center></th></tr>'; echo '<tr><th align=center> <b><font color="darkblue">White-Rabbit Date</font></b></th><th><center>'; $str = shell_exec("export TZ=".$_SESSION['utc']." /wr/bin/wr_date -n get"); echo str_replace("\n","<br>",$str); echo '</center></th></tr>'; echo '<tr><th align=center> <b><font color="darkblue">PPSi</font></b> </th><th><center>'; echo wrs_check_ptp_status() ? '[<A HREF="ptp.php">on</A>]' : '[<A HREF="ptp.php">off</A>]'; echo '</center></th></tr>'; echo '<tr><th align=center> <b><font color="darkblue">Net-SNMP Server</font></b> </th><th><center>'; echo check_snmp_status() ? '[on] ' : '[off] '; echo ' ver. '; echo shell_exec("snmpd -v | grep version | awk '{print $3}'"); @@ -1051,7 +1051,7 @@ function wrs_display_help($help_id, $name){ $message = "<p>This is a switch console emulator windows. Use it as if you were using a ssh session.</p>"; } else if (!strcmp($help_id, "gateware")){ - $msg = shell_exec("/wr/bin/wrsw_version -g"); + $msg = shell_exec("/wr/bin/wrs_version -g"); $msg = explode("\n", $msg); for($i=0; $i<5; $i++){ diff --git a/userspace/rootfs_override/var/www/newvlan.php b/userspace/rootfs_override/var/www/newvlan.php index 7bb753bc4cf5a9b13b0f372c4175e2cb10b0a53a..336d3015bb9d52cdd8f2136bfe332edea6d7dd68 100644 --- a/userspace/rootfs_override/var/www/newvlan.php +++ b/userspace/rootfs_override/var/www/newvlan.php @@ -25,7 +25,7 @@ <?php - $vlan_cmd = "/wr/bin/wrsw_vlans "; + $vlan_cmd = "/wr/bin/wrs_vlans "; if(!empty($_POST['vid'])){ $vlan_cmd .= " --rvid ".$_POST['vid'];} if(!empty($_POST['fid'])){$vlan_cmd .= " --rfid ".$_POST['fid'];} if(!empty($_POST['mask'])){$vlan_cmd .= " --rmask ".$_POST['mask'];} diff --git a/userspace/rootfs_override/var/www/port2vlan.php b/userspace/rootfs_override/var/www/port2vlan.php index f3e1c99c30d2b1a8f0f16f8132bdfd9b136ef45c..a2921bcda1aecbcff12b40514065c66d79131322 100644 --- a/userspace/rootfs_override/var/www/port2vlan.php +++ b/userspace/rootfs_override/var/www/port2vlan.php @@ -26,7 +26,7 @@ // Get VLANS echo '<center><strong>Port-VLAN List</strong></center><hr>'; $tmp_vlan_file="/tmp/vlans.conf"; - $vlans = shell_exec("/wr/bin/wrsw_vlans --list >".$tmp_vlan_file); + $vlans = shell_exec("/wr/bin/wrs_vlans --list >".$tmp_vlan_file); $vlans = shell_exec("cat ".$tmp_vlan_file." | sed -n '/ /s/ \+/ /gp'"); $vlans = explode("\n", $vlans); $name_vlans=""; @@ -44,7 +44,7 @@ // Get Previous assignment $tmp_assign_file="/tmp/port2vlan.conf"; - $vlans_assignment = shell_exec("/wr/bin/wrsw_vlans --elist >".$tmp_assign_file); + $vlans_assignment = shell_exec("/wr/bin/wrs_vlans --elist >".$tmp_assign_file); $vlans_assignment = shell_exec("cat ".$tmp_assign_file." | sed -n '/ /s/ \+/ /gp'"); $vlans_assignment = explode("\n", $vlans_assignment); @@ -116,7 +116,7 @@ echo '<br>'.$_POST['mode0']; //Parse input and run the command if (!empty($_POST['updatevlan'])){ - $vlan_cmd= "/wr/bin/wrsw_vlans "; + $vlan_cmd= "/wr/bin/wrs_vlans "; for($i = 0; $i < 18; $i++){ //if(strcmp($_POST['vlan'.$i],"disabled")){ //VLAN selected @@ -139,7 +139,7 @@ //} - $vlan_cmd= "/wr/bin/wrsw_vlans "; + $vlan_cmd= "/wr/bin/wrs_vlans "; } header('Location: vlan.php'); } diff --git a/userspace/rootfs_override/var/www/vlan.php b/userspace/rootfs_override/var/www/vlan.php index 81d82076d7b60ae394ff2f91536760c9717d8933..81403e09a3876e370072561e554784b124d168d0 100644 --- a/userspace/rootfs_override/var/www/vlan.php +++ b/userspace/rootfs_override/var/www/vlan.php @@ -27,7 +27,7 @@ echo '<center><strong>Existing VLANs</strong></center><hr>'; $tmp_vlan_file="/tmp/vlans.conf"; - $vlans = shell_exec("/wr/bin/wrsw_vlans --list >".$tmp_vlan_file); + $vlans = shell_exec("/wr/bin/wrs_vlans --list >".$tmp_vlan_file); $vlans = shell_exec("cat ".$tmp_vlan_file." | sed -n '/ /s/ \+/ /gp'"); $vlans = explode("\n", $vlans); @@ -90,7 +90,7 @@ echo '<tr align=center><th><font color="blue">Port</font></strong></th><th><font color="blue">QMode</font></th><th><font color="blue">Priority</font></th><th><font color="blue">VLAN ID</font></th><th><font color="blue">MAC Address</font></th></tr>'; $tmp_vlan_file="/tmp/port2vlan.conf"; - $vlans = shell_exec("/wr/bin/wrsw_vlans --elist >".$tmp_vlan_file); + $vlans = shell_exec("/wr/bin/wrs_vlans --elist >".$tmp_vlan_file); $vlans = shell_exec("cat ".$tmp_vlan_file." | sed -n '/ /s/ \+/ /gp'"); $vlans = explode("\n", $vlans); diff --git a/userspace/rootfs_override/wr/bin/wrsw_pstats b/userspace/rootfs_override/wr/bin/wrsw_pstats new file mode 120000 index 0000000000000000000000000000000000000000..df1898ebac0feeeccf5cace3d7a134222559f77d --- /dev/null +++ b/userspace/rootfs_override/wr/bin/wrsw_pstats @@ -0,0 +1 @@ +wrs_pstats \ No newline at end of file diff --git a/userspace/rootfs_override/wr/bin/wrsw_version b/userspace/rootfs_override/wr/bin/wrsw_version new file mode 120000 index 0000000000000000000000000000000000000000..b48943db98639ceebbb26ae6b3115f0e5836fc8c --- /dev/null +++ b/userspace/rootfs_override/wr/bin/wrsw_version @@ -0,0 +1 @@ +wrs_version \ No newline at end of file diff --git a/userspace/rootfs_override/wr/bin/wrsw_vlans b/userspace/rootfs_override/wr/bin/wrsw_vlans new file mode 120000 index 0000000000000000000000000000000000000000..14ef2a2d23ada5ff25a16fe965b010cfbda070a8 --- /dev/null +++ b/userspace/rootfs_override/wr/bin/wrsw_vlans @@ -0,0 +1 @@ +wrs_vlans \ No newline at end of file diff --git a/userspace/rootfs_override/wr/sbin/startup-mb.sh b/userspace/rootfs_override/wr/sbin/startup-mb.sh index f80a3cdab32b192f03ac3abd97b0c44cfcc20e84..cc785842797eecce7bdc2fadfbfc610bac2a7204 100755 --- a/userspace/rootfs_override/wr/sbin/startup-mb.sh +++ b/userspace/rootfs_override/wr/sbin/startup-mb.sh @@ -10,7 +10,7 @@ for arg in $(cat /proc/cmdline); do done # Obtain the type of FPGA (LX130XT or LX240XT) -tfpga=$($WR_HOME/bin/wrsw_version -F) +tfpga=$($WR_HOME/bin/wrs_version -F) $WR_HOME/bin/load-virtex $WR_HOME/lib/firmware/18p_mb-${tfpga}.bin $WR_HOME/bin/load-lm32 $WR_HOME/lib/firmware/rt_cpu.bin diff --git a/userspace/snmpd/wrsVersion.c b/userspace/snmpd/wrsVersion.c index 7eeef7a76a984d0e31cdc6b066fd311be1797075..10a22f00a510cbb16e729aacb714191be2781f7b 100644 --- a/userspace/snmpd/wrsVersion.c +++ b/userspace/snmpd/wrsVersion.c @@ -65,7 +65,7 @@ static int version_group(netsnmp_mib_handler *handler, static void wrs_v_init(void) { char s[80], key[40], value[40]; - FILE *f = popen("/wr/bin/wrsw_version -t", "r"); + FILE *f = popen("/wr/bin/wrs_version -t", "r"); int i; if (!f) { diff --git a/userspace/tools/.gitignore b/userspace/tools/.gitignore index 2014f5d0d8a807ef805ad252850be288084b0bca..2834ca88f7b3991287dee53e5b72e6005fd22e5f 100644 --- a/userspace/tools/.gitignore +++ b/userspace/tools/.gitignore @@ -7,11 +7,11 @@ wr_phytool com mapper wmapper -wrsw_version +wrs_version wr_date fix_tai_offset wr_management lm32-vuart tru_mon -wrsw_pstats -wrsw_vlans +wrs_pstats +wrs_vlans diff --git a/userspace/tools/Makefile b/userspace/tools/Makefile index 04705f886c26da7e16ee79f3dce767d751edaa7b..a86e60b0732275fb524c6f96010d6282b36ea3a8 100644 --- a/userspace/tools/Makefile +++ b/userspace/tools/Makefile @@ -1,7 +1,7 @@ TOOLS = rtu_stat wr_mon wr_phytool spll_dbg_proxy load-lm32 load-virtex com TOOLS += mapper wmapper -TOOLS += wrsw_version wr_date wr_management lm32-vuart wrsw_pstats -TOOLS += wrsw_vlans +TOOLS += wrs_version wr_date wr_management lm32-vuart wrs_pstats +TOOLS += wrs_vlans # # Standard stanza for cross-compilation (courtesy of the linux makefile) @@ -62,11 +62,11 @@ load-virtex: load-virtex.o load-fpga.o load-lm32: load-lm32.o ${CC} -o $@ $^ $(LDFLAGS) -wrsw_version.o: wrsw_version.c +wrs_version.o: wrs_version.c ${CC} ${CFLAGS} -D__GIT_USR__="\"${GIT_USR}\"" \ -D__GIT_VER__="\"${GIT_VER}\"" $(LDFLAGS) -c -o $@ $^ -wrsw_version: wrsw_version.o +wrs_version: wrs_version.o ${CC} -o $@ $^ $(LDFLAGS) test_rt: test_rt.o ../wrsw_hal/rt_client.o @@ -77,13 +77,13 @@ test_ts: test_ts.o ../wrsw_hal/rt_client.o port_calibrator: port_calibrator.o ../wrsw_hal/rt_client.o ${CC} -o $@ $^ $(LDFLAGS) -wrsw_pstats: wrsw_pstats.o +wrs_pstats: wrs_pstats.o ${CC} -o $@ $^ $(LDFLAGS) lm32-vuart: lm32-vuart.o ${CC} -o $@ $^ $(LDFLAGS) -wrsw_vlans: wrsw_vlans.o +wrs_vlans: wrs_vlans.o ${CC} -o $@ $^ $(LDFLAGS) clean: diff --git a/userspace/tools/wrsw_pstats.c b/userspace/tools/wrs_pstats.c similarity index 100% rename from userspace/tools/wrsw_pstats.c rename to userspace/tools/wrs_pstats.c diff --git a/userspace/tools/wrsw_version.c b/userspace/tools/wrs_version.c similarity index 99% rename from userspace/tools/wrsw_version.c rename to userspace/tools/wrs_version.c index b311ab522f9e2a8eb4db29e5a593dbb1b835c280..8bae3f31ca9b95e3e1ba754ddc91c8a2207b1b2c 100644 --- a/userspace/tools/wrsw_version.c +++ b/userspace/tools/wrs_version.c @@ -1,5 +1,5 @@ /* - * wrsw_version.c + * wrs_version.c * * Obtain the HW version and FPGA type. * diff --git a/userspace/tools/wrsw_vlans.c b/userspace/tools/wrs_vlans.c similarity index 99% rename from userspace/tools/wrsw_vlans.c rename to userspace/tools/wrs_vlans.c index e9ae3b0499eef137209ebb85bcc44683787b26c5..444190477e49e3a8706897f479303a5d042b0a96 100644 --- a/userspace/tools/wrsw_vlans.c +++ b/userspace/tools/wrs_vlans.c @@ -32,7 +32,7 @@ #include "switch_hw.h" #include "fpga_io.h" -#include "wrsw_vlans.h" +#include "wrs_vlans.h" diff --git a/userspace/tools/wrsw_vlans.h b/userspace/tools/wrs_vlans.h similarity index 100% rename from userspace/tools/wrsw_vlans.h rename to userspace/tools/wrs_vlans.h