Re: IPv6 support in ccRTP

David Sugar <[email protected]> Thu, 05 Oct 2006 08:01:50 -0400
Newsgroups gmane.comp.gnu.ccrtp.devel
Message-ID <[email protected]>
When I look into the case of OutgoingDataQueue, I was thinking maybe in 
that particular case, we can have a CCXX_IPV6 wrapped 
OutgoingDataQueueIPV6 which inherits from the existing 
OutgoingDataQueue.  It could re-implement just those methods that deal 
with addresses with new methods that use the IPV6Host objects, cap the 
v4 virtual with a dummy method, and offer a new v6 virtual of it's own. 
  We could then feed OutgoingDataQueueIPV6 to the upper level template. 
  That might be ugly, but it could work without breaking a lot of 
existing code or writing all that much new code.  The same could 
probably be done for the other two classes.

I would like to see some feedback on this before doing this :).

David Sugar wrote:
> More than likely the IPV6Host... method handlers wrapped in CCXX_IPV6
> defines in the other classes are missing.  One of the unfortunate
> effects of the way we do address objects is that we have to have
> separate methods for ipv4 and ipv6.  If you add pure IPV6 virtuals for
> OutgoingDataQueue, etc, however, that will mean the RTPSession (ipv4)
> will need then fake ipv6 handlers.
> 
> The other ugly possibility is to also have a separate
> OutgoingDataQueueIPV6 class, etc...
> 
> Let me think about how we got here and what we should do...
> 
> Gabor Ivan wrote:
>> 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 the following errors:
>>
>> 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? How is it possible to use ccRTP 
>> over an IPv6-based protocol stack?
>>
>> Thanks,
>>
>> Gabor Ivan
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Ccrtp-devel mailing list
>> [email protected]
>> http://lists.gnu.org/mailman/listinfo/ccrtp-devel
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Ccrtp-devel mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/ccrtp-devel

_______________________________________________
Ccrtp-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/ccrtp-devel
dyfet.vcf (text/x-vcard, 177 B)
begin:vcard
fn:David Sugar
n:Sugar;David
org:GNU Telephony
email;internet:[email protected]
tel;work:+1 201 215 2609
url:http://www.gnutelephony.org
version:2.1
end:vcard