diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-06-07 16:41:13 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-06-07 16:41:13 +0800 |
commit | 1e065cdd0fb3c48d26baeceef9cc8573137d820f (patch) | |
tree | 448dc722eb4ad2bb34aa4b79eb8e0d5a5c4ffa13 /include | |
parent | 4d0d4eb9117c6557b701725643935dea97d05682 (diff) | |
download | pttbbs-1e065cdd0fb3c48d26baeceef9cc8573137d820f.tar pttbbs-1e065cdd0fb3c48d26baeceef9cc8573137d820f.tar.gz pttbbs-1e065cdd0fb3c48d26baeceef9cc8573137d820f.tar.bz2 pttbbs-1e065cdd0fb3c48d26baeceef9cc8573137d820f.tar.lz pttbbs-1e065cdd0fb3c48d26baeceef9cc8573137d820f.tar.xz pttbbs-1e065cdd0fb3c48d26baeceef9cc8573137d820f.tar.zst pttbbs-1e065cdd0fb3c48d26baeceef9cc8573137d820f.zip |
* improve tobind() with customizable parameters
* add ancillary remote fd API
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4507 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'include')
-rw-r--r-- | include/cmsys.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/cmsys.h b/include/cmsys.h index d680ae2a..833dc7aa 100644 --- a/include/cmsys.h +++ b/include/cmsys.h @@ -76,10 +76,11 @@ extern void PttLock(int fd, int start, int size, int mode); /* net.c */ extern uint32_t ipstr2int(const char *ip); -extern int tobind(const char *addr); +extern int tobind (const char *addr); +extern int tobindex (const char *addr, int qlen, int (*setsock)(int), int do_listen); extern int toconnect(const char *addr); -extern int toread(int fd, void *buf, int len); -extern int towrite(int fd, const void *buf, int len); +extern int toread (int fd, void *buf, int len); +extern int towrite (int fd, const void *buf, int len); /* sort.c */ extern int cmp_int(const void *a, const void *b); @@ -174,6 +175,9 @@ extern void Vector_sublist(const struct Vector *src, struct Vector *dst, const c extern int Vector_remove(struct Vector *self, const char *name); extern int Vector_search(const struct Vector *self, const char *name); +extern int send_remote_fd(int tunnel, int fd); +extern int recv_remote_fd(int tunnel); + /* telnet.c */ struct TelnetCallback { void (*term_resize)(int w, int h); |