From: Jan Michel Date: Tue, 9 Aug 2022 14:36:04 +0000 (+0200) Subject: update network map to show Trb5sc MAC/IP X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=e8b58d9759c39b852a5b9a3d828c49db6fb61081;p=daqtools.git update network map to show Trb5sc MAC/IP --- diff --git a/web/htdocs/network/map.pl b/web/htdocs/network/map.pl index d9f820b..c9d9251 100755 --- a/web/htdocs/network/map.pl +++ b/web/htdocs/network/map.pl @@ -172,7 +172,7 @@ if($ENV{'QUERY_STRING'} =~ /getmap/) { } if ($feat eq "") {$feat = "N/A";} } - if($table == 1) { + if($table == 1 || $table == 2) { if($inclHigh->{$addr}&0x80) { #CTS $feat .= "\nCTS: "; if(($inclLow->{$addr} & 0xF) == 1) { $feat .= "CBM-MBS module, ";} @@ -412,11 +412,14 @@ sub GetMac { $r = sprintf('%u.%u.%u.%u',$ip&0xFF,$ip>>8&0xFF,$ip>>16&0xFF,$ip>>24&0xFF); } else { - $id = sprintf('%08x',$id); + $id = sprintf('%16x',$id); $r = 'da:7a:3'.substr($id,7,1).':'.substr($id,8,2).':'.substr($id,10,2).':'.substr($id,12,2); if ($btype =~ /TRB3sc/i) { $r = 'da:7a:0'.substr($id,7,1).':'.substr($id,8,2).':'.substr($id,10,2).':'.substr($id,12,2); } + if ($btype =~ /TRB5sc/i) { + $r = 'da:1a:'.substr($id,4,2).':'.substr($id,6,2).':'.substr($id,8,2).':'.substr($id,10,2); + } } return $r; }