Good morning, what kernel space function could i use to get the ip address
interface connected to the external Internet?
When i receive a packet, i would like to compare its destination address
with the one
corresponding to the interface connected to the internet, to distinguish
packets that originate from my internal net between those who come from the
I want it in a general way, such as taken from routing tables, not by
interface name or
other interface properties. In my case external interface would be ppp0, but
system may change, so i would like to get it in a general way.