I am trying to write code in C to get and set the default route or gateway address on a specific piece of hardware. I have tried many different things, but nothing seems to work. The closest way that looks close to me is using RTNetlink, however I'm not sure if that even works. When I use RTNetlink, I get a gateway address to return, however it is always 0.0.0.0. Any help would be great.