RetroArch
Classes | Typedefs | Functions
compat_ifaddrs.c File Reference
#include <compat/ifaddrs.h>
#include <string.h>
#include <stdlib.h>
#include <stddef.h>
#include <errno.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netpacket/packet.h>
#include <net/if_arp.h>
#include <netinet/in.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
Include dependency graph for compat_ifaddrs.c:

Classes

struct  NetlinkList
 

Typedefs

typedef struct NetlinkList NetlinkList
 

Functions

static int netlink_socket (void)
 
static int netlink_send (int p_socket, int p_request)
 
static int netlink_recv (int p_socket, void *p_buffer, size_t p_len)
 
static struct nlmsghdr * getNetlinkResponse (int p_socket, int *p_size, int *p_done)
 
static NetlinkListnewListItem (struct nlmsghdr *p_data, unsigned int p_size)
 
static void freeResultList (NetlinkList *p_list)
 
static NetlinkListgetResultList (int p_socket, int p_request)
 
static size_t maxSize (size_t a, size_t b)
 
static size_t calcAddrLen (sa_family_t p_family, int p_dataSize)
 
static void makeSockaddr (sa_family_t p_family, struct sockaddr *p_dest, void *p_data, size_t p_size)
 
static void addToEnd (struct ifaddrs **p_resultList, struct ifaddrs *p_entry)
 
static int interpretLink (struct nlmsghdr *p_hdr, struct ifaddrs **p_resultList)
 
static struct ifaddrsfindInterface (int p_index, struct ifaddrs **p_links, int p_numLinks)
 
static int interpretAddr (struct nlmsghdr *p_hdr, struct ifaddrs **p_resultList, int p_numLinks)
 
static int interpretLinks (int p_socket, NetlinkList *p_netlinkList, struct ifaddrs **p_resultList)
 
static int interpretAddrs (int p_socket, NetlinkList *p_netlinkList, struct ifaddrs **p_resultList, int p_numLinks)
 
int getifaddrs (struct ifaddrs **ifap)
 
void freeifaddrs (struct ifaddrs *ifa)
 

Typedef Documentation

◆ NetlinkList

typedef struct NetlinkList NetlinkList

Function Documentation

◆ addToEnd()

static void addToEnd ( struct ifaddrs **  p_resultList,
struct ifaddrs p_entry 
)
static
Here is the caller graph for this function:

◆ calcAddrLen()

static size_t calcAddrLen ( sa_family_t  p_family,
int  p_dataSize 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ findInterface()

static struct ifaddrs* findInterface ( int  p_index,
struct ifaddrs **  p_links,
int  p_numLinks 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freeifaddrs()

void freeifaddrs ( struct ifaddrs ifa)
Here is the caller graph for this function:

◆ freeResultList()

static void freeResultList ( NetlinkList p_list)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getifaddrs()

int getifaddrs ( struct ifaddrs **  ifap)
Here is the caller graph for this function:

◆ getNetlinkResponse()

static struct nlmsghdr* getNetlinkResponse ( int  p_socket,
int *  p_size,
int *  p_done 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getResultList()

static NetlinkList* getResultList ( int  p_socket,
int  p_request 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ interpretAddr()

static int interpretAddr ( struct nlmsghdr *  p_hdr,
struct ifaddrs **  p_resultList,
int  p_numLinks 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ interpretAddrs()

static int interpretAddrs ( int  p_socket,
NetlinkList p_netlinkList,
struct ifaddrs **  p_resultList,
int  p_numLinks 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ interpretLink()

static int interpretLink ( struct nlmsghdr *  p_hdr,
struct ifaddrs **  p_resultList 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ interpretLinks()

static int interpretLinks ( int  p_socket,
NetlinkList p_netlinkList,
struct ifaddrs **  p_resultList 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ makeSockaddr()

static void makeSockaddr ( sa_family_t  p_family,
struct sockaddr p_dest,
void p_data,
size_t  p_size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ maxSize()

static size_t maxSize ( size_t  a,
size_t  b 
)
static
Here is the caller graph for this function:

◆ netlink_recv()

static int netlink_recv ( int  p_socket,
void p_buffer,
size_t  p_len 
)
static
Here is the caller graph for this function:

◆ netlink_send()

static int netlink_send ( int  p_socket,
int  p_request 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ netlink_socket()

static int netlink_socket ( void  )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ newListItem()

static NetlinkList* newListItem ( struct nlmsghdr *  p_data,
unsigned int  p_size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function: