libgpac
Documentation of the core library of GPAC
Network Time and helpers

Network tools (time, byte ordering, ...) More...

+ Collaboration diagram for Network Time and helpers:

Typedefs

typedef Bool(* gf_net_ifce_enum) (void *cbk, const char *name, const char *IP, u32 flags)
 

Enumerations

enum  {
  GF_NETIF_ACTIVE = 1 , GF_NETIF_NO_MCAST = 1<<1 , GF_NETIF_RECV_ONLY = 1<<2 , GF_NETIF_LOOPBACK = 1<<3 ,
  GF_NETIF_IPV6 = 1<<4
}
 

Functions

u32 gf_net_has_ipv6 ()
 gets ipv6 support More...
 
Bool gf_net_is_ipv6 (const char *address)
 checks address type More...
 
Bool gf_net_enum_interfaces (gf_net_ifce_enum do_enum, void *enum_cbk)
 enumerate network interfaces More...
 
u32 gf_htonl (u32 val)
 
u32 gf_ntohl (u32 val)
 
u16 gf_htons (u16 val)
 
u16 gf_ntohs (u16 val)
 

Detailed Description

Typedef Documentation

◆ gf_net_ifce_enum

typedef Bool(* gf_net_ifce_enum) (void *cbk, const char *name, const char *IP, u32 flags)

network interface enumeration callback

Parameters
cbkuser data passed to gf_net_enum_interfaces
nameinterface name
IPinterface IP address string, may be NULL
flagsflags for interface and address
Returns
true to cancel enumeration

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Flags for interface enumeration result

Enumerator
GF_NETIF_ACTIVE 

set if interface is active

GF_NETIF_NO_MCAST 

set if interface has no multicast support

GF_NETIF_RECV_ONLY 

set if interface is receive only

GF_NETIF_LOOPBACK 

set if interface is loopback

GF_NETIF_IPV6 

set if IP address is IPv6

Function Documentation

◆ gf_net_has_ipv6()

u32 gf_net_has_ipv6 ( )

Returns IPV6 support information.

Returns
2 if the machine has IPV6 support, 1 if the library was compiled with IPV6 support, 0 otherwise

◆ gf_net_is_ipv6()

Bool gf_net_is_ipv6 ( const char *  address)

Checks if an address is an IPV6 or IPV4 one.

Parameters
addressaddress to check
Returns
true 1 if address is IPV6 one, 0 otherwise

◆ gf_net_enum_interfaces()

Bool gf_net_enum_interfaces ( gf_net_ifce_enum  do_enum,
void *  enum_cbk 
)

Enumerates available network interfaces with IP. The callback function is called for each defined IP address of the interface

Parameters
enum_cbkuser data passed to callback function, may be NULL
do_enumcallback function
Returns
true if enumeration succeeded, false if not supported

◆ gf_htonl()

u32 gf_htonl ( u32  val)

host to network conversion of integer

Parameters
valintegrer to convert
Returns
converted integer

◆ gf_ntohl()

u32 gf_ntohl ( u32  val)

network to host conversion of integer

Parameters
valintegrer to convert
Returns
converted integer

◆ gf_htons()

u16 gf_htons ( u16  val)

host to network conversion of short integer

Parameters
valshort integrer to convert
Returns
converted integer

◆ gf_ntohs()

u16 gf_ntohs ( u16  val)

network to host conversion of short integer

Parameters
valshort integrer to convert
Returns
converted integer