Hello all,
I am trying to assign an IPv6 address to an Ipv6 Interface 'manually', but I am getting the following error,
Command ['/home/xxxxx/Desktop/ns-allinone-3.26/ns-3.26/build/scratch/ripng-simple-network02'] terminated with signal SIGSEGV. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").
I have tried many things, but it is not working. Will greatly appreciate if someone could guide me, as to how to accomplish this.
Ipv6InterfaceAddress ipv6Addr = Ipv6InterfaceAddress (Ipv6Address ("2001:db8:f00d:cafe::42"), Ipv6Prefix (64));
Ptr<Ipv6> ipv6Proto = database->GetObject<Ipv6>(); //'database is a node'
int32_t ifIndex = ipv6Proto->GetInterfaceForDevice(ndc15.Get(1)); //GetInterfaceForDevice() returns the interface of the specified NetDevice.
ipv6Proto->AddAddress (ifIndex, ipv6Addr);
I have tried to search for the relevant information, but have not been able to locate for what I have been looking for. The code is attached, and I will be grateful for any useful feedback.