Thanks a lot Tom, I didn't know the address got from a netDevice was
the mac address.....
I will just show how I did it, just in case someone wants to do the
same.
I was trying to get the Ipv4 address from a device. The code is the
following:
Ptr<Ipv4> ipv4 = GetNode()->GetObject<Ipv4>();
Ipv4InterfaceAddress iaddr = ipv4->GetAddress (1,0);
Ipv4Address addri = iaddr.GetLocal ();
Variable addri has the Ipv4 value you set when initializing the
system.