2 * LIBPING socket header file
4 * Copyright (C) 2000, 2001, 2002 by
5 * Jeffrey Fulmer - <jdfulmer@armstrong.com>
6 * This file is distributed as part of libping
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 #ifdef HAVE_ARPA_INET_H
26 # include <arpa/inet.h>
27 #endif/*HAVE_ARPA_INET_H*/
29 #ifdef HAVE_SYS_SOCKET_H
30 # include <sys/socket.h>
31 #endif/*HAVE_SYS_SOCKET_H*/
35 #endif/*HAVE_UNISTD_H*/
37 #ifdef HAVE_NETINET_IN_H
38 # include <netinet/in.h>
39 #endif/*HAVE_NETINET_IN_H*/
41 #ifdef HAVE_SYS_TIMES_H
42 # include <sys/times.h>
43 #endif /*HAVE_SYS_TIMES_H*/
44 #if TIME_WITH_SYS_TIME
45 # include <sys/time.h>
49 # include <sys/time.h>
53 #endif/*TIME_WITH_SYS_TIME*/
57 #endif/*HAVE_NETDB_H*/
60 # include <openssl/ssl.h>
61 # include <openssl/err.h>
62 # include <openssl/rsa.h>
63 # include <openssl/crypto.h>
64 # include <openssl/x509.h>
65 # include <openssl/pem.h>
102 * const char *hostname
103 * const char *service
105 int JOEsocket( CONN *conn, const char *hostname );
108 * checks the socket for both
109 * readability, writeability or both.
111 int JOEsocket_check( CONN *C, SDSET S );
116 * unsigned int length
118 int JOEsocket_write( CONN *conn, const void *b, size_t n );
125 ssize_t JOEread_byte( CONN *conn, void *buf, size_t len );
126 ssize_t JOEreadline( CONN *C, char *ptr, size_t len );
127 ssize_t JOEsocket_read( CONN *conn, void *buf, size_t len );
132 void JOEclose( CONN *C );