IPv6 support in ccRTP

Gabor Ivan <[email protected]> Mon, 02 Oct 2006 14:17:04 +0200
Newsgroups gmane.comp.gnu.ccrtp.devel
Message-ID <[email protected]>
Dear ccRTP developers,

I tried to use ccRTP over an IPv6 protocol stack. If I'm not mistaken, 
the only main change (compared to IPv4) is that the class 
"RTPSessionIPV6" has to be used instead of "RTPSession". I tried to 
create an instance of the class "RTPSessionIPv6":

RTPSessionIPV6 * socket = new RTPSessionIPV6 (IPV6Host("localhost"), port);

and the compiler gave me the following error:

error: cannot allocate an object of abstract type 'ost::RTPSessionIPV6', 
because the following virtual functions are pure within 
'ost::RTPSessionIPV6':
/usr/include/ccrtp/oqueue.h: virtual void 
ost::OutgoingDataQueue::setControlPeer (const ost::IPV4Address&, 
ost::tpport_t)
/usr/include/ccrtp/oqueue.h: virtual void 
ost::OutgoingDataQueue::setDataPeer (const ost::IPV4Address&, ost::tpport_t)
/usr/include/ccrtp/iqueue.h: virtual void 
ost::IncomingDataQueue::recvData (unsigned char *, size_t, const 
ost::IPV4Address&, ost::tpport_t&)
/usr/include/ccrtp/cqueue.h: virtual void 
ost::QueueRTCPManager::recvControl (unsigned char *, size_t, 
ost::IPV4Address&, ost::tpport_t&)

The functions mentioned above are pure virtual functions, making e.g. 
the class "OutgoingDataQueue" an abstract class, which cannot be 
instantiated. As RTPSessionIPV6 does not implement these fucntions 
either, it also becomes an abstract class.

So, the problem is that RTPSessionIPV6 does not implement the functions 
mentioned above; instead it implements _almost_ the same functions, but 
with "IPV6Host&"-type addresses (and not "IPV4Address&"). Unfortunately 
these count as a whole new function in C++, so I assume this to be the 
cause of the errors.

The solution could probably be to append the class "RTPSessionIPV6" with 
a "fake implementation" of the above mentioned functions, _and_ also 
adding the already implemented functions from "RTPSessionIPv6" (which 
get the IP address in an  "IPV6Host"-type parameter) as a virtual 
function of the classes "OutgoingDataQueue", "IncomingDataQueue", 
"QueueRTCPManager".

Sure that mine is not a very nice solution, and, as I'm not quite 
familiar with ccRTP yet, it could possibly not work. That's why I'm 
asking Your advice: do you consider this a real bug in ccRTP library? If 
yes, what solution would You suggest?

Thanks,

Gabor Ivan