summaryrefslogtreecommitdiff
path: root/src/sock.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sock.h')
-rw-r--r--src/sock.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/sock.h b/src/sock.h
index 61c7432..78191ea 100644
--- a/src/sock.h
+++ b/src/sock.h
@@ -1,9 +1,9 @@
-/* $Id: sock.h,v 1.11 2003-01-27 18:45:25 rjkaes Exp $
+/* $Id: sock.h,v 1.12 2004-02-18 20:18:53 rjkaes Exp $
*
* See 'sock.c' for a detailed description.
*
* Copyright (C) 1998 Steven Young
- * Copyright (C) 1999 Robert James Kaes (rjkaes@flarenet.com)
+ * Copyright (C) 1999,2004 Robert James Kaes (rjkaes@users.sourceforge.net)
*
* 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 the
@@ -19,12 +19,13 @@
#ifndef TINYPROXY_SOCK_H
#define TINYPROXY_SOCK_H
-#define PEER_IP_LENGTH 16
-#define PEER_STRING_LENGTH 256
+/* The IP length is set to 48, since IPv6 can be that long */
+#define PEER_IP_LENGTH 48
+#define PEER_STRING_LENGTH 1024
#define MAXLINE (1024 * 4)
-extern int opensock(char *ip_addr, uint16_t port);
+extern int opensock(const char* host, int port);
extern int listen_sock(uint16_t port, socklen_t* addrlen);
extern int socket_nonblocking(int sock);