Lines Matching defs:sockctrl
94 PCAP_SOCKET sockctrl;
178 static void rpcap_msg_err(PCAP_SOCKET sockctrl, SSL *, uint32 plen, char *remote_errbuf);
751 if (temp->sockctrl == pr->rmt_sockctrl)
1132 if (temp->sockctrl == pr->rmt_sockctrl)
1974 static int rpcap_doauth(PCAP_SOCKET sockctrl, SSL *ssl, uint8 *ver,
2076 if (sock_send(sockctrl, ssl, sendbuf, sendbufidx, errbuf,
2081 if (rpcap_process_msg_header(sockctrl, ssl, 0, RPCAP_MSG_AUTH_REQ,
2101 (void)rpcap_discard(sockctrl, ssl, plen, NULL);
2126 (void)rpcap_discard(sockctrl, ssl, plen, NULL);
2131 if (rpcap_recv(sockctrl, ssl, (char *)&authreply,
2134 (void)rpcap_discard(sockctrl, ssl, plen, NULL);
2139 if (rpcap_discard(sockctrl, ssl, plen, errbuf) == -1)
2314 *sockctrlp = activeconn->sockctrl;
2448 PCAP_SOCKET sockctrl;
2496 if (rpcap_setup_session(fp->opt.device, auth, &active, &sockctrl,
2523 if (sock_send(sockctrl, ssl, sendbuf, sendbufidx, errbuf,
2528 if (rpcap_process_msg_header(sockctrl, ssl, protocol_version,
2534 if (rpcap_recv(sockctrl, ssl, (char *)&openreply,
2539 if (rpcap_discard(sockctrl, ssl, plen, errbuf) == -1)
2544 pr->rmt_sockctrl = sockctrl;
2578 (void)rpcap_discard(sockctrl, pr->ctrl_ssl, plen, NULL);
2591 sock_close(sockctrl, NULL, 0);
2620 PCAP_SOCKET sockctrl; /* socket descriptor of the control connection */
2621 SSL *ssl = NULL; /* optional SSL handler for sockctrl */
2640 if (rpcap_setup_session(source, auth, &active, &sockctrl, &uses_ssl,
2652 if (sock_send(sockctrl, ssl, (char *)&header, sizeof(struct rpcap_header),
2657 if (rpcap_process_msg_header(sockctrl, ssl, protocol_version,
2676 if (rpcap_recv(sockctrl, ssl, (char *)&findalldevs_if,
2725 if (rpcap_recv(sockctrl, ssl, tmpstring,
2754 if (rpcap_recv(sockctrl, ssl, tmpstring,
2779 if (rpcap_recv(sockctrl, ssl, (char *)&ifaddr,
2853 if (rpcap_discard(sockctrl, ssl, plen, errbuf) == 1)
2868 if (sock_close(sockctrl, errbuf, PCAP_ERRBUF_SIZE))
2891 (void) rpcap_discard(sockctrl, ssl, plen, NULL);
2905 sock_close(sockctrl, NULL, 0);
2931 PCAP_SOCKET sockctrl; /* keeps the main socket identifier */
2932 SSL *ssl = NULL; /* Optional SSL handler for sockctrl */
2978 sockctrl = accept(sockmain, (struct sockaddr *) &from, &fromlen);
2985 if (sockctrl == INVALID_SOCKET)
2995 ssl = ssl_promotion(0, sockctrl, errbuf, PCAP_ERRBUF_SIZE);
2998 sock_close(sockctrl, NULL, 0);
3003 sock_close(sockctrl, NULL, 0);
3013 rpcap_senderror(sockctrl, ssl, 0, PCAP_ERR_REMOTEACCEPT, errbuf, NULL);
3022 sock_close(sockctrl, NULL, 0);
3029 rpcap_senderror(sockctrl, ssl, 0, PCAP_ERR_REMOTEACCEPT, errbuf, NULL);
3038 sock_close(sockctrl, NULL, 0);
3045 if (rpcap_doauth(sockctrl, ssl, &protocol_version, &byte_swapped,
3049 rpcap_senderror(sockctrl, ssl, 0, PCAP_ERR_REMOTEACCEPT, errbuf, NULL);
3058 sock_close(sockctrl, NULL, 0);
3072 return sockctrl;
3094 rpcap_senderror(sockctrl, ssl, protocol_version, PCAP_ERR_REMOTEACCEPT, errbuf, NULL);
3103 sock_close(sockctrl, NULL, 0);
3108 temp->sockctrl = sockctrl;
3114 return sockctrl;
3161 if (sock_send(temp->sockctrl, temp->ssl,
3180 (void)sock_close(temp->sockctrl, NULL,
3196 if (sock_close(temp->sockctrl, errbuf,
3482 static void rpcap_msg_err(PCAP_SOCKET sockctrl, SSL *ssl, uint32 plen, char *remote_errbuf)
3492 if (sock_recv(sockctrl, ssl, remote_errbuf, PCAP_ERRBUF_SIZE - 1,
3520 (void)rpcap_discard(sockctrl, ssl, plen - (PCAP_ERRBUF_SIZE - 1), remote_errbuf);
3529 if (sock_recv(sockctrl, ssl, remote_errbuf, plen,