help getting external interface address

From: Giacomo (jacum_at_libero.it)
Date: 09/17/05


Date: Sat, 17 Sep 2005 13:08:00 GMT

Good morning, what kernel space function could i use to get the ip address
of the
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
internet.

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
in another
system may change, so i would like to get it in a general way.

Thanks.

Giacomo



Relevant Pages

  • Re: Problem configuring NAT to share Internet Connection
    ... One of my NICs in the server connect to a DSL ... modem and it connects to internet. ... > interface, that connects to the DSL modem, LAN interface, that connects to ... >> 7.- To connect server to Internet, I create a new network connection. ...
    (microsoft.public.win2000.ras_routing)
  • Internet thru Cisco 871
    ... SDM wizards and didn't get the internet. ... expected static IP address on the Dialer0 interface but fail ping ... zone security private ... ip http access-class 3 ...
    (comp.dcom.sys.cisco)
  • Re: NAT question
    ... one on your local network and one attached the Internet. ... > From time to time I get a packet on the inside network that has 137 UDP ... I would block these ports outbound on the external interface as well, ... The second possibility is that some machine on your local network has ...
    (comp.os.linux.security)
  • Re: Problem configuring NAT to share Internet Connection
    ... This is the IPCONFIG information of the server (where you can see Internet ... interface, that connects to the DSL modem, LAN interface, that connects to ... > 7.- To connect server to Internet, I create a new network connection. ...
    (microsoft.public.win2000.ras_routing)
  • Re: How to read an XML file in Visual C++ 6
    ... I am against it when it actively interferes with my productivity ... I use remote desktop extensively, particularly in the summer, so I can work on all my ... Web mail interface comes ahead of my filters and I get the "raw" messages, ... I have no idea of the quality of the throughput band of your Internet ...
    (microsoft.public.vc.mfc)