trace route to get default gateway - mac_raw or udp?

Is there a way, as there is in linux and windows, to programmatically get the default gateway IP address using the w5500? In linux, NETLINK_GETROUTE uses the linux kernel (?) for table information. traceroute needs a destination ip.

Does anyone know of a way to get the default gateway address without linux o/s using the w5500?

Use DHCP, one of the parameters returned is router IP address.


I hate it when that happens!

dhcp has all the dhcp stuff already there… I learned a lot trying to figure out where that stuff was kept. I should have just started from scratch, and read a chapter on dhcp. Super bad habit trying to cut corners.

thanks for bailing me out.

may you get rich and famous and have all the borsch you can eat!

um… is there a way to get these values if I have a static ip?

Of course. Just broadcast DHCP discover and request out (following the process) and in the last ack you are guaranteed to get what you need, however only in case there’s DHCP server in the local network.