summaryrefslogtreecommitdiff
path: root/src/core/net-nonblock.h
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-05-25 11:30:47 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-05-25 11:30:47 +0000
commit76605ad0aed7e53c4a9dab686474235f547a5837 (patch)
tree078c0ebf5f7099daaa2dcf9ff252f418dedcce34 /src/core/net-nonblock.h
parent487da4174504f797171f12a01636c54272ec6a62 (diff)
downloadirssi-76605ad0aed7e53c4a9dab686474235f547a5837.zip
Added bot plugin, it also has almost-functional botnet.
Changed configure.in's functionality so that you could tell what modules you want to build in main irssi binary and it will create automatically the .c files that need to call the module_init()/deinit() functions. Fixed several minor things.. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@230 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/net-nonblock.h')
-rw-r--r--src/core/net-nonblock.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/core/net-nonblock.h b/src/core/net-nonblock.h
index 6ae05e82..6e4e10f4 100644
--- a/src/core/net-nonblock.h
+++ b/src/core/net-nonblock.h
@@ -11,10 +11,22 @@ typedef struct {
need to free() it yourself unless it's NULL */
} RESOLVED_IP_REC;
+typedef struct {
+ int namelen;
+ char *name;
+
+ int error;
+ int errlen;
+ char *errorstr;
+} RESOLVED_NAME_REC;
+
typedef void (*NET_CALLBACK) (int, void *);
+typedef void (*NET_HOST_CALLBACK) (RESOLVED_NAME_REC *, void *);
/* nonblocking gethostbyname(), PID of the resolver child is returned. */
-int net_gethostname_nonblock(const char *addr, int pipe);
+int net_gethostbyname_nonblock(const char *addr, int pipe);
+/* Get host's name, call func when finished */
+int net_gethostbyaddr_nonblock(IPADDR *ip, NET_HOST_CALLBACK func, void *data);
/* get the resolved IP address. returns -1 if some error occured with read() */
int net_gethostbyname_return(int pipe, RESOLVED_IP_REC *rec);