10 static struct taia now;
11 static struct taia deadline;
13 static int mywrite(
int fd,
char *
buf,
int len)
18 x.events = IOPAUSE_WRITE;
28 return write(fd,buf,len);
31 static int myread(
int fd,
char *buf,
int len)
36 x.events = IOPAUSE_READ;
46 return read(fd,buf,len);
58 if (
timeoutconn6(s,ipremote,113,timeout,netif) == -1)
return -1;
71 if ((ch ==
' ') || (ch ==
'\t') || (ch ==
'\r'))
continue;
72 if (ch ==
'\n')
return 0;
74 if (ch ==
':') ++numcolons;
78 if (out->len > 256)
return 0;
83 int remoteinfo6(stralloc *out,
char ipremote[16],
uint16 portremote,
char iplocal[16],
uint16 portlocal,
unsigned int timeout,uint32 netif)
95 if (s == -1)
return -1;
96 r = doit(out,s,ipremote,portremote,iplocal,portlocal,timeout,netif);
int iopause(iopause_fd *x, unsigned int len, struct taia *deadline, struct taia *stamp)
unsigned int fmt_ulong(char *, unsigned long)
void buffer_init(buffer *s, int(*op)(), int fd, char *buf, unsigned int len)
int buffer_put(buffer *, const char *, unsigned int)
int remoteinfo6(stralloc *out, char ipremote[16], uint16 portremote, char iplocal[16], uint16 portlocal, unsigned int timeout, uint32 netif)
int socket_bind6(int s, const char *ip, uint16 port, uint32 scope_id)
int stralloc_append(stralloc *, const char *)
int taia_now(struct taia *)
int taia_less(const struct taia *, const struct taia *)
void taia_add(struct taia *, const struct taia *, const struct taia *)
void taia_uint(struct taia *, unsigned int)
int buffer_get(buffer *, char *, unsigned int)
int stralloc_copys(stralloc *, const char *)
int timeoutconn6(int, char *, uint16, unsigned int, uint32)
int buffer_flush(buffer *)