SYNTAX

       #include "socket_if.h"

       uint32 socket_getifidx(const char *ifname);

       const char *socket_getifname(uint32 scope_id);


DESCRIPTION

       socket_getifidx returns the scope_id of an interface named as ifname
       typically ''eth0''.

       socket_getifname retrieves from the operating system's assigned
       scope_id the interface name ifname.


INTERFACE_NAME VERSUS SCOPE_ID

       For IPv6 LLU addresses an additional ifname (interface name) has to be
       provided accompanying the IPv6 address: fe80::1%eth0.  The operating
       systems rather uses scope_id as index for ifname.

       For global IPv6 and ULA addresses ifname can be set to 0.  Since IPv4
       addresses on any interface are always unique, simply use 0 for all
       cases.


BACKGROUND

       Qlib's socket routines provide an easy API to setup TCP or UDP
       connections over IPv4 or IPv6 networks. Together with Qlib's IP address
       parsing capabilities, a set of high-level socket routines allow a
       common IPv4/IPv6 handling.


SOCKET FILES

       socket_bind.c
            bind to or reuse the local IPv4/IPv6 address and port for a socket
            connection

       socket_connect.c
            attempts to setup a TCP or UDP client connection

       socket_info.c
            get local/remote IPv4/IPv6 address of socket

       socket_recv.c
            set up a receiving IPv4/IPv6 connection

       socket_send.c
            send UDP datagram over a IPv4 or IPv6 connection

       socket_setup.c
            listen to and accept an IPv4/IPv6 TCP socket connection

       socket_tcp.c
            create a non-blocking TCP stream socket



SEE ALSO

       socket_bind(3), socket_connect(3), socket_info(3), socket_recv(3),
       socket_send(3), socket_setup(3), socket_tcp(3), socket_udp(3)



                                       3                     qlibs:(socket_if)

Man(1) output converted with man2html