misc.c revision 6de922ee8158732706074aacb20c2a5dc6d4d7a3
/*
* Copyright (c) 1995 Danny Gasparovski.
*
* Please read the file COPYRIGHT for the
* terms and conditions of the copyright.
*/
#define WANT_SYS_IOCTL_H
#include <slirp.h>
#ifndef HAVE_INET_ATON
int
{
if (addr == 0xffffffff)
return 0;
return 1;
}
#endif
/*
* Get our IP address and put it in our_addr
*/
void
{
}
struct quehead
{
};
void
{
}
void
{
/* element->qh_link = NULL; TCP FIN1 crashes if you do this. Why ? */
}
int
{
/* First, check if the port is "bound" */
{
return -1;
}
return 0;
}
/*
* Set fd blocking and non-blocking
*/
void
fd_nonblock(int fd)
{
#ifdef FIONBIO
int opt = 1;
#else
int opt;
opt |= O_NONBLOCK;
#endif
}
void
{
#ifdef FIONBIO
int opt = 0;
#else
int opt;
opt &= ~O_NONBLOCK;
#endif
}
#ifdef VBOX_WITH_SLIRP_BSD_MBUF
#define ITEM_MAGIC 0xdead0001
struct item
{
};
#define ZONE_MAGIC 0xdead0002
struct uma_zone
{
const char *name;
int max_items;
int cur_items;
};
{
)
{
/*
* @todo (r=vvl) here should be some
* accounting of extra items in case
* breakthrough barrier
*/
return NULL;
goto allocated;
}
/*@todo 'Z' should be depend on flag */
{
Log(("NAT: uma no memory"));
return NULL;
}
return (void *)&it[1];
}
{
}
{
return zone;
}
{
#if 0
#endif
{
return NULL;
}
return zone;
}
{
}
{
}
{
}
{
/*@todo (r-vvl) this function supposed to work with special zone storing
reference counters */
/* for returning pointer to counter we need get 0 elemnt */
}
{
void *mem;
return NULL;
return mem;
}
{
}
{
return;
{
return;
}
}
{
return 0;
}
{
}
{
/*@todo (r=vvl) make it wiser*/
}
{
return NULL;
}
#endif