typedef struct{
int af;
- union {
- struct sockaddr_in v4;
- struct sockaddr_in6 v6;
- } bound;
} fdinfo;
static fdinfo **table;
static int tablesz;
table[fd]=malloc(sizeof(*table[fd]));
if (!table[fd]) goto fail;
table[fd]->af=domain;
- table[fd]->bound.v4.sin_family=0;
return fd;
fail: