gsknetworkinterface
Name
gsknetworkinterface --
Details
struct GskNetworkInterface
struct GskNetworkInterface {
const char *ifname;
/* whether this interface is "virtual" -- just connects back to this host */
unsigned is_loopback : 1;
/* whether this interface supports broadcasting. */
unsigned supports_multicast : 1;
/* whether this interface is receiving packets not intended for it. */
unsigned is_promiscuous : 1;
/* ip-address if the interface is up. */
GskSocketAddress *address;
/* if !is_loopback, this is the device's MAC address. */
GskSocketAddress *hw_address;
/* if is_point_to_point, this is the address of the other end of
* the connection.
*/
GskSocketAddress *p2p_address;
/* if supports_broadcast, this is the broadcast address. */
GskSocketAddress *broadcast;
};
struct GskNetworkInterfaceSet
struct GskNetworkInterfaceSet {
int num_interfaces;
GskNetworkInterface *interfaces;
};
enum GskNetworkInterfaceFlags
typedef enum
{
GSK_NETWORK_INTERFACE_UP = (1<<0),
GSK_NETWORK_INTERFACE_LOOPBACK = (1<<1),
GSK_NETWORK_INTERFACE_NON_LOOPBACK = (1<<2),
GSK_NETWORK_INTERFACE_HAS_BROADCAST = (1<<3),
GSK_NETWORK_INTERFACE_HAS_MULTICAST = (1<<4)
} GskNetworkInterfaceFlags;