Page 1 of 1
IPv6 on IPv4 network
Posted: Wed Jul 27, 2016 2:10 pm
by SeeCwriter
I think an application that is compiled with IPV6 defined will work on an IPv4 network. If that is correct, can broadcasting still be used? I notice there is a method to set an IP to NULL, but not to -1.
Re: IPv6 on IPv4 network
Posted: Thu Jul 28, 2016 9:23 am
by rnixon
Are you talking about an IPv4 broadcast? That should be 255.255.255.255. I would not label it as null or -1.
Re: IPv6 on IPv4 network
Posted: Thu Jul 28, 2016 9:59 am
by dciliske
Yes, an application that is compiled to support IPv6 can operate on an IPv4 network. If you're trying to send a global broadcast there is an IPADDR4 function (which you really are asking about) called GlobalBroadcast(). It returns an IPADDR4 for the global broadcast address...
You can still pass a 0xFFFFFFFF for broadcast in a function that takes an IPADDR4, but you'll have issues porting your code over to actually handle IPv6 in the future. Unfortunately broadcasts don't really translate to IPv6, where everything is multicast based. This is actually a topic I haven't really thought about much before...
Re: IPv6 on IPv4 network
Posted: Thu Jul 28, 2016 11:37 am
by dciliske
Turns out that while IPv6 is Multicast based, there exists a logical equivalent to the global broadcast address in the form of the ALL_NODES address. Sending a multicast packet to the ALL_NODES address will send to all IPv6 devices on the local link.
We will likely end up with an example of this in the next month or so, but I'm busy working on cryptography...
Re: IPv6 on IPv4 network
Posted: Thu Aug 11, 2016 7:28 am
by SeeCwriter
The include file multicast.h appears to only support IPv4. I am unable to find an IPv6 version of function RegisterMulticastFifo().
Re: IPv6 on IPv4 network
Posted: Thu Aug 11, 2016 10:30 am
by rnixon
IPv6 needs multicast by default. I believe its anything with a FF00: prefix.
Re: IPv6 on IPv4 network
Posted: Thu Aug 11, 2016 10:59 am
by dciliske
Hmm... interesting. I get what you expect that to do. I'll have a look at this later, currently trying to improve performance for Diffie-Hellman key exchange.
Re: IPv6 on IPv4 network
Posted: Thu Oct 20, 2016 7:25 am
by SeeCwriter
Dan,
Have you had a chance to look into the IPv6 equivalent of RegisterMulticastFifo()?
Re: IPv6 on IPv4 network
Posted: Thu Oct 20, 2016 10:29 am
by pbreed
You have to join by interface...
#include <ipv6/ipv6_interface.h>
IPv6Interface * pIf=IPv6Interface::GetFirst_IP6_Interface();
if(pIf)
{
pIf->SendMLDRegistration( const IPADDR & regAddr );
}
If you have more than one interface then you can iterate with the IPv6Interface static members:
static IPv6Interface *GetInterfaceForDestination(const IPADDR6 & ip);
static IPv6Interface *GetInterfaceForSource(const IPADDR6 & ip);
static IPv6Interface *GetInterfaceN(int n);
static IPv6Interface *GetFirst_IP6_Interface();
Or the non static member function:
IPv6Interface *GetNext_IP6_Interface();
Re: IPv6 on IPv4 network
Posted: Mon Oct 31, 2016 3:10 pm
by dciliske
IPv6 support has now been added to RegisterMulticastFifo. It's a little rudimentary (we don't currently support *full* MLDv2 querying for instance), but appears to be functional.
-Dan