« Previous | Next » 

Revision 77d8e4c0

ID77d8e4c0276573f0becde8ac7ae8f846dd61e216
Parent 73a45622
Child c97510ad

Added by Saúl Ibarra Corretgé over 6 years ago

sip: Simplify getting local IP address

Instead of iteraring the list of interfaces, skipping some and taking
the first one available, pick the IP address of the default route. This
is done by creating a UDP socket and connecting to address 1.2.3.4.
Because the socket is UDP no traffic is sent, but we can query the local
address using getsockname.

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences