Get gateway from give local IP

Job ID: 37667786

Budget: $10 – $100 USD

I'm seeking a skilled developer to create a function for Windows,

My Object is...
I'm trying to find the local IP being used on my PC.
However, if there are multiple IPs, I don't know which one to choose, so I'm going to get them using the following method.

1. Obtain IP4 IP address using inet
2. If the IP has a gateway (excluding 0.0.0.0), I will recognize it as a local IP.

Develop tool: C++ or C with MSVC 2017 (v141)

Thank you