netatalk  4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
getiface.c File Reference
#include <errno.h>
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <atalk/util.h>

Macros

#define IFACE_NUM   5
 

Functions

static int addname (char **list, int *i, const char *name)
 
static int getifaces (const int sockfd, char ***list)
 
char ** getifacelist (void)
 Get interfaces from the kernel.
 
void freeifacelist (char **ifacelist)
 

Macro Definition Documentation

◆ IFACE_NUM

#define IFACE_NUM   5

Function Documentation

◆ addname()

static int addname ( char **  list,
int *  i,
const char *  name 
)
static

we leave all of the ioctl's to the application

◆ freeifacelist()

void freeifacelist ( char **  ifacelist)

go through and free the interface list

◆ getifacelist()

char ** getifacelist ( void  )

Get interfaces from the kernel.

Note
we keep an extra null entry to signify the end of the interface list.

◆ getifaces()

static int getifaces ( const int  sockfd,
char ***  list 
)
static