change the ip address of an interface

27 views
Skip to first unread message

Kai Wang

unread,
Aug 24, 2016, 7:19:48 AM8/24/16
to ns-3-users
Hello,

I want to realise a dhcp-like thing in my simulation, but I don't know how to change the IP address of an interface. I found something like n->GetObject<Ipv4>()->SetAddress(interface_num, address), but I can't find that function in current version of NS3.  Could anyone tell me how to change the IP address?
Thanks a lot !!

Best wishes,
Kai

Tommaso Pecorella

unread,
Aug 26, 2016, 6:46:53 PM8/26/16
to ns-3-users
It's in Ipv4L3Protocol and it's documented in the Doxygen manuals:

T.
Reply all
Reply to author
Forward
0 new messages