mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
add mac to hwinfo
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@985 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: eb70beffa4
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2010-12-31 (Fri, 31 Dec 2010)
Origin message was:
------------------
-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 was generated by Migit
This commit is contained in:
@@ -31,6 +31,7 @@
|
|||||||
#include <zapit/channel.h>
|
#include <zapit/channel.h>
|
||||||
#include <zapit/bouquets.h>
|
#include <zapit/bouquets.h>
|
||||||
#include <configfile.h>
|
#include <configfile.h>
|
||||||
|
#include <system/configure_network.h>
|
||||||
#include <cs_api.h>
|
#include <cs_api.h>
|
||||||
#include <global.h>
|
#include <global.h>
|
||||||
// yhttpd
|
// yhttpd
|
||||||
@@ -583,11 +584,20 @@ void CControlAPI::HWInfoCGI(CyhookHandler *hh)
|
|||||||
{
|
{
|
||||||
unsigned int system_rev = cs_get_revision();
|
unsigned int system_rev = cs_get_revision();
|
||||||
std::string boxname;
|
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)
|
switch(system_rev)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
boxname = "TripleDragon";
|
if( boxname == "Armas ")
|
||||||
|
boxname += "TripleDragon";
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
boxname += "HD1";
|
boxname += "HD1";
|
||||||
@@ -612,7 +622,7 @@ void CControlAPI::HWInfoCGI(CyhookHandler *hh)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
boxname += (g_info.delivery_system == DVB_S || (system_rev == 1)) ? " SAT":" CABLE";
|
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());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -29,6 +29,7 @@
|
|||||||
#include <zapit/channel.h>
|
#include <zapit/channel.h>
|
||||||
#include <zapit/bouquets.h>
|
#include <zapit/bouquets.h>
|
||||||
#include <cs_api.h>
|
#include <cs_api.h>
|
||||||
|
#include <system/configure_network.h>
|
||||||
|
|
||||||
extern tallchans allchans;
|
extern tallchans allchans;
|
||||||
extern CBouquetManager *g_bouquetManager;
|
extern CBouquetManager *g_bouquetManager;
|
||||||
@@ -655,11 +656,20 @@ std::string CNeutrinoYParser::func_get_boxtype(CyhookHandler *, std::string)
|
|||||||
{
|
{
|
||||||
unsigned int system_rev = cs_get_revision();
|
unsigned int system_rev = cs_get_revision();
|
||||||
std::string boxname;
|
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)
|
switch(system_rev)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
boxname = "TripleDragon";
|
if( boxname == "Armas ")
|
||||||
|
boxname += "TripleDragon";
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
boxname += "HD1";
|
boxname += "HD1";
|
||||||
@@ -683,6 +693,7 @@ std::string CNeutrinoYParser::func_get_boxtype(CyhookHandler *, std::string)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
boxname += (g_info.delivery_system == DVB_S || (system_rev == 1)) ? " SAT":" CABLE";
|
boxname += (g_info.delivery_system == DVB_S || (system_rev == 1)) ? " SAT":" CABLE";
|
||||||
return boxname;
|
return boxname;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user