-add mac to hwinfo

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@985 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
satbaby
2010-12-31 15:58:03 +00:00
parent e75375ae3d
commit eb70beffa4
2 changed files with 26 additions and 5 deletions

View File

@@ -31,6 +31,7 @@
#include <zapit/channel.h>
#include <zapit/bouquets.h>
#include <configfile.h>
#include <system/configure_network.h>
#include <cs_api.h>
#include <global.h>
// yhttpd
@@ -583,11 +584,20 @@ void CControlAPI::HWInfoCGI(CyhookHandler *hh)
{
unsigned int system_rev = cs_get_revision();
std::string boxname;
boxname = "Coolstream ";
static CNetAdapter netadapter;
std::string eth_id = netadapter.getMacAddr();
std::transform(eth_id.begin(), eth_id.end(), eth_id.begin(), ::tolower);
if("00:c5:5c" == eth_id.substr(0, 8) )
boxname = "Coolstream ";
else if("ba:dd:ad" == eth_id.substr(0, 8) )
boxname = "Armas ";
switch(system_rev)
{
case 1:
boxname = "TripleDragon";
if( boxname == "Armas ")
boxname += "TripleDragon";
break;
case 6:
boxname += "HD1";
@@ -612,7 +622,7 @@ void CControlAPI::HWInfoCGI(CyhookHandler *hh)
break;
}
boxname += (g_info.delivery_system == DVB_S || (system_rev == 1)) ? " SAT":" CABLE";
hh->printf("%s\n", boxname.c_str());
hh->printf("%s\nMAC:%s\n", boxname.c_str(),eth_id.c_str());
}