Network tools (time, byte ordering, ...)
More...
◆ 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
-
cbk | user data passed to gf_net_enum_interfaces |
name | interface name |
IP | interface IP address string, may be NULL |
flags | flags for interface and address |
- Returns
- true to cancel enumeration
◆ 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
|
◆ 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
-
- Returns
- true 1 if address is IPV6 one, 0 otherwise
◆ gf_net_enum_interfaces()
Enumerates available network interfaces with IP. The callback function is called for each defined IP address of the interface
- Parameters
-
enum_cbk | user data passed to callback function, may be NULL |
do_enum | callback function |
- Returns
- true if enumeration succeeded, false if not supported
◆ gf_htonl()
host to network conversion of integer
- Parameters
-
- Returns
- converted integer
◆ gf_ntohl()
network to host conversion of integer
- Parameters
-
- Returns
- converted integer
◆ gf_htons()
host to network conversion of short integer
- Parameters
-
val | short integrer to convert |
- Returns
- converted integer
◆ gf_ntohs()
network to host conversion of short integer
- Parameters
-
val | short integrer to convert |
- Returns
- converted integer