aboutsummaryrefslogtreecommitdiff
path: root/rpcap-protocol.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-01-06 16:08:00 -0800
committerGuy Harris <guy@alum.mit.edu>2019-01-06 16:08:00 -0800
commit9956745b7df4e9ffa6bc97f411779167bde69e70 (patch)
treea26b8b4d0d843957ac9d51419f2ab4069debfc40 /rpcap-protocol.c
parent9ece72846ad2a5d493703e6be20e21ccf88e9460 (diff)
parente6796ccd1c07e806a49f8821480a566dee85c1ee (diff)
Merge branch 'master' of https://github.com/rixed/libpcap into rixed-master
Diffstat (limited to 'rpcap-protocol.c')
-rw-r--r--rpcap-protocol.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/rpcap-protocol.c b/rpcap-protocol.c
index 692f7c5c..0cdc0ba3 100644
--- a/rpcap-protocol.c
+++ b/rpcap-protocol.c
@@ -61,6 +61,8 @@
*
* \param sock: the socket we are currently using.
*
+ * \param ssl: if compiled with openssl, the optional ssl handler to use with the above socket.
+ *
* \param ver: the protocol version we want to put in the reply.
*
* \param errcode: a integer which tells the other party the type of error
@@ -78,7 +80,7 @@
* error message is returned in the 'errbuf' variable.
*/
int
-rpcap_senderror(SOCKET sock, uint8 ver, unsigned short errcode, const char *error, char *errbuf)
+rpcap_senderror(SOCKET sock, SSL *ssl, uint8 ver, unsigned short errcode, const char *error, char *errbuf)
{
char sendbuf[RPCAP_NETBUF_SIZE]; /* temporary buffer in which data to be sent is buffered */
int sendbufidx = 0; /* index which keeps the number of bytes currently buffered */
@@ -99,7 +101,7 @@ rpcap_senderror(SOCKET sock, uint8 ver, unsigned short errcode, const char *erro
RPCAP_NETBUF_SIZE, SOCKBUF_BUFFERIZE, errbuf, PCAP_ERRBUF_SIZE))
return -1;
- if (sock_send(sock, sendbuf, sendbufidx, errbuf, PCAP_ERRBUF_SIZE) < 0)
+ if (sock_send(sock, ssl, sendbuf, sendbufidx, errbuf, PCAP_ERRBUF_SIZE) < 0)
return -1;
return 0;