Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

VBoxNetAdpCtl.cpp File Reference


Detailed Description

Apps - VBoxAdpCtl, Configuration tool for vboxnetX adapters.

Definition in file VBoxNetAdpCtl.cpp.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/wait.h>
#include <sys/ioctl.h>
#include <fcntl.h>

Go to the source code of this file.

Classes

struct  VBoxNetAdpReq

Defines

#define ADPCTLERR_BAD_NAME   2
#define ADPCTLERR_IOCTL_FAILED   4
#define ADPCTLERR_NO_CTL_DEV   3
#define MAX_ADDRESSES   128
#define MAX_ADDRLEN   64
#define VBOXADPCTL_ADD_CMD   "add"
#define VBOXADPCTL_DEL_CMD   "delete"
#define VBOXADPCTL_IFCONFIG_PATH   "/sbin/ifconfig"
#define VBOXNETADP_CTL_ADD   _IOR('v', 1, VBOXNETADPREQ)
#define VBOXNETADP_CTL_DEV_NAME   "/dev/vboxnetctl"
#define VBOXNETADP_CTL_REMOVE   _IOW('v', 2, VBOXNETADPREQ)
#define VBOXNETADP_MAX_NAME_LEN   32
#define VBOXNETADP_NAME   "vboxnet"

Typedefs

typedef VBOXNETADPREQ * PVBOXNETADPREQ
typedef struct VBoxNetAdpReq VBOXNETADPREQ

Functions

int checkAdapterName (const char *pcszNameIn, char *pszNameOut)
int doIOCtl (unsigned long uCmd, void *pData)
static int executeIfconfig (const char *pcszAdapterName, const char *pcszArg1, const char *pcszArg2=NULL, const char *pcszArg3=NULL, const char *pcszArg4=NULL, const char *pcszArg5=NULL)
int main (int argc, char *argv[])
static bool removeAddresses (char *pszAdapterName)
static void showUsage (void)


Generated by  Doxygen 1.6.0   Back to index