summaryrefslogtreecommitdiff
path: root/sslutils.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-01-09 19:18:03 -0800
committerGuy Harris <guy@alum.mit.edu>2019-01-09 19:18:03 -0800
commit5ec780d84809c8be1398f55527ada06f4ec7034e (patch)
treeb0df286c06f17565f6d239bce522bebc8b948808 /sslutils.h
parent0bbe3cec72aaaac416055bef2ea83ec3db627878 (diff)
downloadlibpcap-5ec780d84809c8be1398f55527ada06f4ec7034e.tar.gz
Don't use two sockets for the control connection.
If we do the accept() ourselves, we get only one socket on which we send and from which we receive messages. If we're run by an inetd-compatible daemon, it does the accept() and gets only one socket, which it proceeds to dup and hand to us as the standard input, output, and error; we really only need to use one of them. In the latter case, just dup the standard input, and then close the standard input, output, and error as we dup a descriptor for /dev/null to them. In both cases, just hand the one control socket to daemon_serviceloop(). Close it in daemon_serviceloop() before it returns, rather than in the caller after it returns. Only free the SSL structure for the control connection right before we close the socket for the control connection; we don't need to free it when we close a data connection.
Diffstat (limited to 'sslutils.h')
-rw-r--r--sslutils.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/sslutils.h b/sslutils.h
index a9ffde83..3661a3ce 100644
--- a/sslutils.h
+++ b/sslutils.h
@@ -46,7 +46,6 @@ void ssl_set_certfile(const char *certfile);
void ssl_set_keyfile(const char *keyfile);
int ssl_init_once(int is_server, int enable_compression, char *errbuf, size_t errbuflen);
SSL *ssl_promotion(int is_server, SOCKET s, char *errbuf, size_t errbuflen);
-SSL *ssl_promotion_rw(int is_server, SOCKET in, SOCKET out, char *errbuf, size_t errbuflen);
int ssl_send(SSL *, char const *buffer, int size, char *errbuf, size_t errbuflen);
int ssl_recv(SSL *, char *buffer, int size, char *errbuf, size_t errbuflen);