Commit e4e766f2 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Move the tcp.c file to libvarnish, we need the primitives in varnishtest

also.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@3126 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 87bdac19
......@@ -53,7 +53,6 @@ varnishd_SOURCES = \
storage_malloc.c \
storage_synth.c \
storage_umem.c \
tcp.c \
varnishd.c
noinst_HEADERS = \
......
......@@ -42,21 +42,6 @@ void VSL_Panic(int *len, char **ptr);
void VSL_MgtInit(const char *fn, unsigned size);
extern struct varnish_stats *VSL_stats;
/* tcp.c */
/* NI_MAXHOST and NI_MAXSERV are ridiculously long for numeric format */
#define TCP_ADDRBUFSIZE 64
#define TCP_PORTBUFSIZE 16
void TCP_name(const struct sockaddr *addr, unsigned l, char *abuf, unsigned alen, char *pbuf, unsigned plen);
void TCP_myname(int sock, char *abuf, unsigned alen, char *pbuf, unsigned plen);
int TCP_filter_http(int sock);
void TCP_blocking(int sock);
void TCP_nonblocking(int sock);
#ifdef SOL_SOCKET
int TCP_connect(int s, const struct sockaddr *name, socklen_t namelen, int msec);
void TCP_close(int *s);
#endif
#define TRUST_ME(ptr) ((void*)(uintptr_t)(ptr))
/* Really belongs in mgt.h, but storage_file chokes on both */
......
......@@ -50,6 +50,21 @@ uint32_t crc32_l(const void *p1, unsigned l);
/* from libvarnish/num.c */
const char *str2bytes(const char *p, uintmax_t *r, uintmax_t rel);
/* from libvarnish/tcp.c */
/* NI_MAXHOST and NI_MAXSERV are ridiculously long for numeric format */
#define TCP_ADDRBUFSIZE 64
#define TCP_PORTBUFSIZE 16
void TCP_myname(int sock, char *abuf, unsigned alen, char *pbuf, unsigned plen);
int TCP_filter_http(int sock);
void TCP_blocking(int sock);
void TCP_nonblocking(int sock);
#ifdef SOL_SOCKET
void TCP_name(const struct sockaddr *addr, unsigned l, char *abuf, unsigned alen, char *pbuf, unsigned plen);
int TCP_connect(int s, const struct sockaddr *name, socklen_t namelen, int msec);
void TCP_close(int *s);
#endif
/* from libvarnish/time.c */
void TIM_format(double t, char *p);
time_t TIM_parse(const char *p);
......
......@@ -14,6 +14,7 @@ libvarnish_la_SOURCES = \
flopen.c \
num.c \
time.c \
tcp.c \
vct.c \
version.c \
vev.c \
......
......@@ -53,7 +53,7 @@
#include "compat/strlcpy.h"
#endif
#include "mgt.h"
#include "libvarnish.h"
/*--------------------------------------------------------------------*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment