do not copy the audio file header
[paraslash.git] / net.h
diff --git a/net.h b/net.h
index f20466642337c1dffbc4f942ba0430066d5aaad3..5ff53987af6591e6192ae034fe6270fbb29df01b 100644 (file)
--- a/net.h
+++ b/net.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2006-2007 Andre Noll <maan@systemlinux.org>
  *
  *     This program is free software; you can redistribute it and/or modify
  *     it under the terms of the GNU General Public License as published by
 #define UNIX_PATH_MAX 108
 #endif
 
-struct hostent *get_host_info(char *);
+/** used to crypt the communication between para_server and para_client */
+typedef void crypt_function(unsigned long len,
+       const unsigned char *indata, unsigned char *outdata, void *private_data);
+
+#include <netdb.h> /* hostent */
+int get_host_info(char *host, struct hostent **ret);
 int get_socket(void);
 void init_sockaddr(struct sockaddr_in*, int, const struct hostent*);
 int para_connect(int, struct sockaddr_in *);
@@ -44,4 +49,7 @@ int recv_cred_buffer(int, char *, size_t);
 ssize_t send_cred_buffer(int, char*);
 int recv_pattern(int fd, const char *pattern, size_t bufsize);
 int init_tcp_socket(int port);
+void enable_crypt(int fd, crypt_function *recv_f, crypt_function *send_f,
+       void *private_data);
+void disable_crypt(int fd);