std::string devDemux = str( boost::format(
"/dev/dvb/adapter%d/demux%d") % adapter % device);
int f = open(devDemux.c_str(), O_RDONLY | O_NONBLOCK);
- if (f < 0)
- throw SystemException();
+ if (f < 0){
+ throw SystemException( "Could not open demux device of DVB adapter ") << devDemux;
+ }
fd(f);
}
const
{
if (::ioctl(fd(), DMX_SET_FILTER, filter) < 0)
- throw SystemException();
+ throw SystemException("Could not set section filter of DVB adapter");
}
// ----------------------------------------------------------------
"/dev/dvb/adapter%d/demux%d") % adapter % device);
int f = open(devDemux.c_str(), O_RDONLY | O_NONBLOCK);
if (f < 0)
- throw SystemException();
+ throw SystemException( "Could not open demux device of DVB adapter ") << devDemux;
fd(f);
}
const
{
if (::ioctl(fd(), DMX_SET_PES_FILTER, filter) < 0)
- throw SystemException();
+ throw SystemException("Could not set PES filter of DVB adapter");
}
// ----------------------------------------------------------------
"/dev/dvb/adapter%d/dvr%d") % adapter % device);
int f = open(devDvr.c_str(), O_RDONLY | O_NONBLOCK);
if (f < 0)
- throw SystemException();
+ throw SystemException( "Could not open dvr device of DVB adapter ") << devDvr;
fd(f);
}
"/dev/dvb/adapter%d/frontend%d") % adapter % device);
int f = open(devFrontend.c_str(), O_RDONLY | O_NONBLOCK);
if (f < 0)
- throw SystemException();
+ throw SystemException("Could not open frontend device of DVB adapter ")<< devFrontend;
+
fd(f);
}
const
{
if (::ioctl(fd(), FE_READ_SIGNAL_STRENGTH, strength) < 0)
- throw SystemException();
+ throw SystemException( "Could not get signal strength of DVB adapter");
}
///////////////////////////////cc.e////////////////////////////////////////
{
int f;
if ( (f = ::open("/dev/net/tun", O_RDWR)) < 0 )
- throw SystemException();
+ throw SystemException( "Could not open tap control device: /dev/net/tun");
struct ifreq ifr;
::memset( &ifr, 0, sizeof(ifr));
ifr.ifr_flags = IFF_TAP;
ifr.ifr_flags |= IFF_NO_PI;
interface_name.copy( ifr.ifr_name, IFNAMSIZ);
if (::ioctl(f, TUNSETIFF, (void *) &ifr) < 0 )
- throw SystemException();
+ throw SystemException( "Could not create tap device: ") << ifr.ifr_name;
fd(f);
}