59 node->AggregateObject(ipv6);
60 node->AggregateObject(icmpv6);
64 node->AddDevice(device);
65 interface->SetDevice(device);
66 interface->SetNode(node);
67 index = ipv6->AddIpv6Interface(interface);
71 node->AddDevice(device2);
72 interface2->SetDevice(device2);
73 interface2->SetNode(node);
74 index = ipv6->AddIpv6Interface(interface2);
85 "interface has always a link-local address");
90 interface->AddAddress(ifaceAddr1);
93 interface->AddAddress(ifaceAddr2);
97 interface2->AddAddress(ifaceAddr3);
99 uint32_t num = interface->GetNAddresses();
103 "Number of addresses should be 3??");
105 num = interface2->GetNAddresses();
109 "1 global addresses + link-local ones");
111 interface->RemoveAddress(2);
112 num = interface->GetNAddresses();
118 index = ipv6->GetInterfaceForPrefix(
"2001:1234:5678:9000::0",
Ipv6Prefix(64));
121 "We should get one address??");
123 index = ipv6->GetInterfaceForAddress(
"2001:ffff:5678:9001::2");
126 index = ipv6->GetInterfaceForAddress(
"2001:ffff:5678:9000::1");
130 output = interface->RemoveAddress(
Ipv6Address(
"2001:1234:5678:9000::1"));
132 num = interface->GetNAddresses();
136 output = interface->RemoveAddress(
Ipv6Address(
"2001:1234:5678:9000::1"));
138 num = interface->GetNAddresses();
144 num = interface->GetNAddresses();
148 index = ipv6->GetInterfaceForAddress(
"2001:ffff:5678:9001::2");
149 bool result = ipv6->RemoveAddress(index,
Ipv6Address(
"2001:ffff:5678:9001::2"));
151 num = interface2->GetNAddresses();
155 result = ipv6->RemoveAddress(index,
Ipv6Address(
"2001:ffff:5678:9001::2"));
157 num = interface2->GetNAddresses();
163 num = interface2->GetNAddresses();
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.