YAZ
5.34.0
|
Header for COMSTACK. More...
Go to the source code of this file.
Data Structures | |
struct | comstack |
Macros | |
#define | CS_ST_UNBND 0 |
#define | CS_ST_IDLE 1 |
#define | CS_ST_INCON 2 |
#define | CS_ST_OUTCON 3 |
#define | CS_ST_DATAXFER 4 |
#define | CS_ST_ACCEPT 5 |
#define | CS_ST_CONNECTING 6 |
#define | CS_NONE 0 |
#define | CS_CONNECT 1 |
#define | CS_DISCON 2 |
#define | CS_LISTEN 3 |
#define | CS_DATA 4 |
#define | CS_CLIENT 0 |
#define | CS_SERVER 1 |
#define | cs_put(handle, buf, size) ((*(handle)->f_put)(handle, buf, size)) |
#define | cs_get(handle, buf, size) ((*(handle)->f_get)(handle, buf, size)) |
#define | cs_more(handle) ((*(handle)->f_more)(handle)) |
#define | cs_connect(handle, address) ((*(handle)->f_connect)(handle, address)) |
#define | cs_rcvconnect(handle) ((*(handle)->f_rcvconnect)(handle)) |
#define | cs_bind(handle, ad, mo) ((*(handle)->f_bind)(handle, ad, mo)) |
#define | cs_listen(handle, ap, al) ((*(handle)->f_listen)(handle, ap, al, 0, 0)) |
#define | cs_listen_check(handle, ap, al, cf, cd) ((*(handle)->f_listen)(handle, ap, al, cf, cd)) |
#define | cs_accept(handle) ((*(handle)->f_accept)(handle)) |
#define | cs_close(handle) ((*(handle)->f_close)(handle)) |
#define | cs_create(type, blocking, proto) ((*type)(-1, blocking, proto, 0)) |
#define | cs_createbysocket(sock, type, blocking, proto) ((*type)(sock, blocking, proto, 0)) |
#define | cs_type(handle) ((handle)->type) |
#define | cs_fileno(handle) ((handle)->iofile) |
#define | cs_getstate(handle) ((handle)->getstate) |
#define | cs_errno(handle) ((handle)->cerrno) |
#define | cs_getproto(handle) ((handle)->protocol) |
#define | cs_addrstr(handle) ((*(handle)->f_addrstr)(handle)) |
#define | cs_straddr(handle, str) ((*(handle)->f_straddr)(handle, str)) |
#define | cs_want_read(handle) ((handle)->io_pending & CS_WANT_READ) |
#define | cs_want_write(handle) ((handle)->io_pending & CS_WANT_WRITE) |
#define | cs_set_blocking(handle, blocking) ((handle)->f_set_blocking(handle, blocking)) |
#define | CS_WANT_READ 1 |
#define | CS_WANT_WRITE 2 |
#define | CSNONE 0 |
#define | CSYSERR 1 |
#define | CSOUTSTATE 2 |
#define | CSNODATA 3 |
#define | CSWRONGBUF 4 |
#define | CSDENY 5 |
#define | CSERRORSSL 6 |
#define | CSBUFSIZE 7 |
#define | CSLASTERROR CSBUFSIZE /* must be the value of last CS error */ |
#define | CS_FLAGS_BLOCKING 1 |
#define | CS_FLAGS_NUMERICHOST 2 |
#define | CS_FLAGS_DNS_NO_BLOCK 4 |
Typedefs | |
typedef struct comstack * | COMSTACK |
typedef COMSTACK(* | CS_TYPE) (int s, int flags, int protocol, void *vp) |
Functions | |
int | cs_look (COMSTACK) |
const char * | cs_strerror (COMSTACK h) |
const char * | cs_errmsg (int n) |
COMSTACK | cs_create_host (const char *type_and_host, int blocking, void **vp) |
COMSTACK | cs_create_host_proxy (const char *vhost, int blocking, void **vp, const char *proxy_host) |
COMSTACK | cs_create_host2 (const char *vhost, int blocking, void **vp, const char *proxy_host, int *proxy_mode) |
void | cs_get_host_args (const char *type_and_host, const char **args) |
int | cs_complete_auto_head (const char *buf, int len) |
int | cs_complete_auto (const char *buf, int len) |
void * | cs_get_ssl (COMSTACK cs) |
int | cs_set_ssl_ctx (COMSTACK cs, void *ctx) |
int | cs_set_ssl_certificate_file (COMSTACK cs, const char *fname) |
int | cs_get_peer_certificate_x509 (COMSTACK cs, char **buf, int *len) |
void | cs_set_max_recv_bytes (COMSTACK cs, int max_recv_bytes) |
void | cs_print_session_info (COMSTACK cs) |
int | cs_parse_host (const char *uri, const char **host, CS_TYPE *t, enum oid_proto *proto, char **connect_host) |
int | cs_set_head_only (COMSTACK cs, int head_only) |
Header for COMSTACK.
Definition in file comstack.h.
#define cs_accept | ( | handle | ) | ((*(handle)->f_accept)(handle)) |
Definition at line 98 of file comstack.h.
#define cs_addrstr | ( | handle | ) | ((*(handle)->f_addrstr)(handle)) |
Definition at line 108 of file comstack.h.
#define cs_bind | ( | handle, | |
ad, | |||
mo | |||
) | ((*(handle)->f_bind)(handle, ad, mo)) |
Definition at line 95 of file comstack.h.
#define CS_CLIENT 0 |
Definition at line 77 of file comstack.h.
#define cs_close | ( | handle | ) | ((*(handle)->f_close)(handle)) |
Definition at line 99 of file comstack.h.
#define CS_CONNECT 1 |
Definition at line 66 of file comstack.h.
#define cs_connect | ( | handle, | |
address | |||
) | ((*(handle)->f_connect)(handle, address)) |
Definition at line 93 of file comstack.h.
Definition at line 100 of file comstack.h.
Definition at line 101 of file comstack.h.
#define CS_DATA 4 |
Definition at line 69 of file comstack.h.
#define CS_DISCON 2 |
Definition at line 67 of file comstack.h.
#define cs_errno | ( | handle | ) | ((handle)->cerrno) |
Definition at line 106 of file comstack.h.
#define cs_fileno | ( | handle | ) | ((handle)->iofile) |
Definition at line 104 of file comstack.h.
#define CS_FLAGS_BLOCKING 1 |
Definition at line 165 of file comstack.h.
#define CS_FLAGS_DNS_NO_BLOCK 4 |
Definition at line 167 of file comstack.h.
#define CS_FLAGS_NUMERICHOST 2 |
Definition at line 166 of file comstack.h.
#define cs_get | ( | handle, | |
buf, | |||
size | |||
) | ((*(handle)->f_get)(handle, buf, size)) |
Definition at line 91 of file comstack.h.
#define cs_getproto | ( | handle | ) | ((handle)->protocol) |
Definition at line 107 of file comstack.h.
#define cs_getstate | ( | handle | ) | ((handle)->getstate) |
Definition at line 105 of file comstack.h.
#define CS_LISTEN 3 |
Definition at line 68 of file comstack.h.
#define cs_listen | ( | handle, | |
ap, | |||
al | |||
) | ((*(handle)->f_listen)(handle, ap, al, 0, 0)) |
Definition at line 96 of file comstack.h.
#define cs_listen_check | ( | handle, | |
ap, | |||
al, | |||
cf, | |||
cd | |||
) | ((*(handle)->f_listen)(handle, ap, al, cf, cd)) |
Definition at line 97 of file comstack.h.
#define cs_more | ( | handle | ) | ((*(handle)->f_more)(handle)) |
Definition at line 92 of file comstack.h.
#define CS_NONE 0 |
Definition at line 65 of file comstack.h.
#define cs_put | ( | handle, | |
buf, | |||
size | |||
) | ((*(handle)->f_put)(handle, buf, size)) |
Definition at line 90 of file comstack.h.
#define cs_rcvconnect | ( | handle | ) | ((*(handle)->f_rcvconnect)(handle)) |
Definition at line 94 of file comstack.h.
#define CS_SERVER 1 |
Definition at line 78 of file comstack.h.
#define cs_set_blocking | ( | handle, | |
blocking | |||
) | ((handle)->f_set_blocking(handle, blocking)) |
Definition at line 112 of file comstack.h.
#define CS_ST_ACCEPT 5 |
Definition at line 59 of file comstack.h.
#define CS_ST_CONNECTING 6 |
Definition at line 60 of file comstack.h.
#define CS_ST_DATAXFER 4 |
Definition at line 58 of file comstack.h.
#define CS_ST_IDLE 1 |
Definition at line 55 of file comstack.h.
#define CS_ST_INCON 2 |
Definition at line 56 of file comstack.h.
#define CS_ST_OUTCON 3 |
Definition at line 57 of file comstack.h.
#define CS_ST_UNBND 0 |
Definition at line 54 of file comstack.h.
#define cs_straddr | ( | handle, | |
str | |||
) | ((*(handle)->f_straddr)(handle, str)) |
Definition at line 109 of file comstack.h.
#define cs_type | ( | handle | ) | ((handle)->type) |
Definition at line 103 of file comstack.h.
#define cs_want_read | ( | handle | ) | ((handle)->io_pending & CS_WANT_READ) |
Definition at line 110 of file comstack.h.
#define CS_WANT_READ 1 |
Definition at line 114 of file comstack.h.
#define cs_want_write | ( | handle | ) | ((handle)->io_pending & CS_WANT_WRITE) |
Definition at line 111 of file comstack.h.
#define CS_WANT_WRITE 2 |
Definition at line 115 of file comstack.h.
#define CSBUFSIZE 7 |
Definition at line 162 of file comstack.h.
#define CSDENY 5 |
Definition at line 160 of file comstack.h.
#define CSERRORSSL 6 |
Definition at line 161 of file comstack.h.
#define CSLASTERROR CSBUFSIZE /* must be the value of last CS error */ |
Definition at line 163 of file comstack.h.
#define CSNODATA 3 |
Definition at line 158 of file comstack.h.
#define CSNONE 0 |
Definition at line 155 of file comstack.h.
#define CSOUTSTATE 2 |
Definition at line 157 of file comstack.h.
#define CSWRONGBUF 4 |
Definition at line 159 of file comstack.h.
#define CSYSERR 1 |
Definition at line 156 of file comstack.h.
Definition at line 43 of file comstack.h.
typedef COMSTACK(* CS_TYPE) (int s, int flags, int protocol, void *vp) |
Definition at line 44 of file comstack.h.
int cs_complete_auto | ( | const char * | buf, |
int | len | ||
) |
Definition at line 466 of file comstack.c.
References cs_complete_auto_x().
Referenced by cs_set_head_only(), tcpip_rcvconnect(), tcpip_state_create(), and unix_type().
int cs_complete_auto_head | ( | const char * | buf, |
int | len | ||
) |
Definition at line 471 of file comstack.c.
References cs_complete_auto_x().
Referenced by cs_set_head_only(), and tcpip_rcvconnect().
COMSTACK cs_create_host | ( | const char * | type_and_host, |
int | blocking, | ||
void ** | vp | ||
) |
Definition at line 167 of file comstack.c.
References cs_create_host_proxy().
Referenced by add_listener().
COMSTACK cs_create_host2 | ( | const char * | vhost, |
int | blocking, | ||
void ** | vp, | ||
const char * | proxy_host, | ||
int * | proxy_mode | ||
) |
Definition at line 179 of file comstack.c.
References cs_close, cs_create, cs_parse_host(), cs_straddr, PROTO_HTTP, PROTO_Z3950, ssl_type(), tcpip_type(), xfree, xstrdup, yaz_ssl_create(), and yaz_tcpip_create3().
Referenced by cs_create_host_proxy(), do_connect_host(), and yaz_url_exec().
COMSTACK cs_create_host_proxy | ( | const char * | vhost, |
int | blocking, | ||
void ** | vp, | ||
const char * | proxy_host | ||
) |
Definition at line 172 of file comstack.c.
References cs_create_host2().
Referenced by cs_create_host().
const char* cs_errmsg | ( | int | n | ) |
Definition at line 36 of file comstack.c.
References cs_errlist, CSLASTERROR, and CSNONE.
Referenced by cs_strerror(), and ir_read().
void cs_get_host_args | ( | const char * | type_and_host, |
const char ** | args | ||
) |
Definition at line 48 of file comstack.c.
Referenced by yaz_check_location(), and ZOOM_connection_get_databases().
int cs_get_peer_certificate_x509 | ( | COMSTACK | cs, |
char ** | buf, | ||
int * | len | ||
) |
Definition at line 1563 of file tcpip.c.
References tcpip_state::buf, comstack::cprivate, ssl_type(), comstack::type, and xstrdup.
Referenced by get_cert().
int cs_look | ( | COMSTACK | cs | ) |
Definition at line 257 of file comstack.c.
References comstack::event.
Referenced by ZOOM_connection_do_io().
int cs_parse_host | ( | const char * | uri, |
const char ** | host, | ||
CS_TYPE * | t, | ||
enum oid_proto * | proto, | ||
char ** | connect_host | ||
) |
Definition at line 76 of file comstack.c.
References PROTO_HTTP, PROTO_Z3950, ssl_type(), tcpip_type(), unix_type(), xfree, and xmalloc.
Referenced by cs_create_host2().
void cs_print_session_info | ( | COMSTACK | cs | ) |
Definition at line 1489 of file tcpip.c.
References comstack::cprivate, ssl_type(), and comstack::type.
int cs_set_head_only | ( | COMSTACK | cs, |
int | head_only | ||
) |
Definition at line 1602 of file tcpip.c.
References comstack::cerrno, tcpip_state::complete, comstack::cprivate, cs_complete_auto(), cs_complete_auto_head(), CS_ST_INCON, ssl_type(), tcpip_type(), and comstack::type.
Referenced by yaz_url_exec().
void cs_set_max_recv_bytes | ( | COMSTACK | cs, |
int | max_recv_bytes | ||
) |
Definition at line 476 of file comstack.c.
References comstack::max_recv_bytes.
Referenced by control_association().
int cs_set_ssl_certificate_file | ( | COMSTACK | cs, |
const char * | fname | ||
) |
Definition at line 1549 of file tcpip.c.
References comstack::cprivate, ssl_type(), and comstack::type.
Referenced by add_listener().
int cs_set_ssl_ctx | ( | COMSTACK | cs, |
void * | ctx | ||
) |
Definition at line 1537 of file tcpip.c.
References ssl_type(), and comstack::type.
const char* cs_strerror | ( | COMSTACK | h | ) |
Definition at line 43 of file comstack.c.
References comstack::cerrno, and cs_errmsg().
Referenced by add_listener().