|
YAZ
4.2.57
|
Header for COMSTACK. More...
Go to the source code of this file.
Data Structures | |
| struct | comstack |
Macros | |
| #define | COMSTACK_DEFAULT_TIMEOUT -1 /* not used yet */ |
| #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_SR PROTO_SR |
| #define | CS_Z3950 PROTO_Z3950 |
| #define | CS_FLAGS_BLOCKING 1 |
| #define | CS_FLAGS_NUMERICHOST 2 |
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) |
| 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) |
| int | completeWAIS (const char *buf, int len) |
| void | cs_print_session_info (COMSTACK cs) |
Header for COMSTACK.
Definition in file comstack.h.
| #define COMSTACK_DEFAULT_TIMEOUT -1 /* not used yet */ |
Definition at line 42 of file comstack.h.
Referenced by tcpip_type(), and unix_type().
| #define cs_accept | ( | handle | ) | ((*(handle)->f_accept)(handle)) |
Definition at line 101 of file comstack.h.
Referenced by ir_session(), and listener().
| #define cs_addrstr | ( | handle | ) | ((*(handle)->f_addrstr)(handle)) |
Definition at line 111 of file comstack.h.
Referenced by assoc_init_reset(), inetd_connection(), listener(), and new_session().
| #define cs_bind | ( | handle, | |
| ad, | |||
| mo | |||
| ) | ((*(handle)->f_bind)(handle, ad, mo)) |
Definition at line 98 of file comstack.h.
Referenced by add_listener().
| #define CS_CLIENT 0 |
Definition at line 80 of file comstack.h.
| #define cs_close | ( | handle | ) | ((*(handle)->f_close)(handle)) |
Definition at line 102 of file comstack.h.
Referenced by add_listener(), cs_create_host_proxy(), do_connect_host(), ir_read(), ir_session(), listener(), tcpip_accept(), yaz_url_exec(), and ZOOM_connection_destroy().
| #define CS_CONNECT 1 |
Definition at line 69 of file comstack.h.
Referenced by tcpip_connect(), unix_connect(), and ZOOM_connection_do_io().
| #define cs_connect | ( | handle, | |
| address | |||
| ) | ((*(handle)->f_connect)(handle, address)) |
Definition at line 96 of file comstack.h.
Referenced by do_connect_host(), and yaz_url_exec().
Definition at line 103 of file comstack.h.
Referenced by cs_create_host_proxy().
Definition at line 104 of file comstack.h.
Referenced by inetd_connection().
| #define CS_DATA 4 |
Definition at line 72 of file comstack.h.
Referenced by tcpip_accept(), tcpip_put(), tcpip_rcvconnect(), unix_accept(), unix_put(), and unix_rcvconnect().
| #define CS_DISCON 2 |
Definition at line 70 of file comstack.h.
| #define cs_errno | ( | handle | ) | ((handle)->cerrno) |
Definition at line 109 of file comstack.h.
Referenced by add_listener(), and ir_read().
| #define cs_fileno | ( | handle | ) | ((handle)->iofile) |
Definition at line 107 of file comstack.h.
Referenced by add_listener(), inetd_connection(), and new_session().
| #define CS_FLAGS_BLOCKING 1 |
Definition at line 159 of file comstack.h.
Referenced by tcpip_set_blocking(), unix_accept(), unix_set_blocking(), and unix_type().
| #define CS_FLAGS_NUMERICHOST 2 |
Definition at line 160 of file comstack.h.
Referenced by tcpip_addrstr().
| #define cs_get | ( | handle, | |
| buf, | |||
| size | |||
| ) | ((*(handle)->f_get)(handle, buf, size)) |
Definition at line 94 of file comstack.h.
Referenced by do_read(), ir_read(), and yaz_url_exec().
| #define cs_getproto | ( | handle | ) | ((handle)->protocol) |
Definition at line 110 of file comstack.h.
Referenced by create_association().
| #define cs_getstate | ( | handle | ) | ((handle)->getstate) |
Definition at line 108 of file comstack.h.
| #define CS_LISTEN 3 |
Definition at line 71 of file comstack.h.
Referenced by tcpip_bind(), and unix_bind().
| #define cs_listen | ( | handle, | |
| ap, | |||
| al | |||
| ) | ((*(handle)->f_listen)(handle, ap, al, 0, 0)) |
Definition at line 99 of file comstack.h.
| #define cs_listen_check | ( | handle, | |
| ap, | |||
| al, | |||
| cf, | |||
| cd | |||
| ) | ((*(handle)->f_listen)(handle, ap, al, cf, cd)) |
Definition at line 100 of file comstack.h.
Referenced by listener().
| #define cs_more | ( | handle | ) | ((*(handle)->f_more)(handle)) |
Definition at line 95 of file comstack.h.
| #define CS_NONE 0 |
Definition at line 68 of file comstack.h.
Referenced by tcpip_type(), unix_accept(), unix_type(), and ZOOM_connection_do_io().
| #define cs_put | ( | handle, | |
| buf, | |||
| size | |||
| ) | ((*(handle)->f_put)(handle, buf, size)) |
Definition at line 93 of file comstack.h.
Referenced by do_write_ex(), ir_session(), and yaz_url_exec().
| #define cs_rcvconnect | ( | handle | ) | ((*(handle)->f_rcvconnect)(handle)) |
Definition at line 97 of file comstack.h.
Referenced by ZOOM_connection_do_io().
| #define CS_SERVER 1 |
Definition at line 81 of file comstack.h.
Referenced by add_listener(), tcpip_bind(), and unix_bind().
| #define cs_set_blocking | ( | handle, | |
| blocking | |||
| ) | ((handle)->f_set_blocking(handle, blocking)) |
Definition at line 115 of file comstack.h.
| #define CS_SR PROTO_SR |
Definition at line 156 of file comstack.h.
| #define CS_ST_ACCEPT 5 |
Definition at line 62 of file comstack.h.
Referenced by tcpip_accept(), and unix_accept().
| #define CS_ST_CONNECTING 6 |
Definition at line 63 of file comstack.h.
Referenced by tcpip_connect(), tcpip_rcvconnect(), unix_connect(), and unix_rcvconnect().
| #define CS_ST_DATAXFER 4 |
Definition at line 61 of file comstack.h.
Referenced by tcpip_accept(), tcpip_rcvconnect(), unix_accept(), and unix_rcvconnect().
| #define CS_ST_IDLE 1 |
Definition at line 58 of file comstack.h.
Referenced by tcpip_accept(), tcpip_bind(), tcpip_listen(), tcpip_type(), unix_accept(), unix_bind(), unix_listen(), and unix_type().
| #define CS_ST_INCON 2 |
Definition at line 59 of file comstack.h.
Referenced by tcpip_accept(), tcpip_listen(), unix_accept(), and unix_listen().
| #define CS_ST_OUTCON 3 |
Definition at line 60 of file comstack.h.
| #define CS_ST_UNBND 0 |
Definition at line 57 of file comstack.h.
Referenced by tcpip_connect(), tcpip_straddr(), tcpip_type(), unix_connect(), and unix_type().
| #define cs_straddr | ( | handle, | |
| str | |||
| ) | ((*(handle)->f_straddr)(handle, str)) |
Definition at line 112 of file comstack.h.
Referenced by cs_create_host_proxy().
| #define cs_type | ( | handle | ) | ((handle)->type) |
Definition at line 106 of file comstack.h.
| #define cs_want_read | ( | handle | ) | ((handle)->io_pending & CS_WANT_READ) |
Definition at line 113 of file comstack.h.
| #define CS_WANT_READ 1 |
Definition at line 117 of file comstack.h.
Referenced by do_connect_host(), do_write_ex(), ir_session(), new_session(), tcpip_connect(), tcpip_get(), unix_get(), and ZOOM_connection_do_io().
| #define cs_want_write | ( | handle | ) | ((handle)->io_pending & CS_WANT_WRITE) |
Definition at line 114 of file comstack.h.
| #define CS_WANT_WRITE 2 |
Definition at line 118 of file comstack.h.
Referenced by do_connect_host(), do_write_ex(), ir_read(), ir_session(), new_session(), tcpip_connect(), tcpip_put(), unix_connect(), unix_put(), and ZOOM_connection_do_io().
| #define CS_Z3950 PROTO_Z3950 |
Definition at line 157 of file comstack.h.
| #define CSBUFSIZE 7 |
Definition at line 152 of file comstack.h.
Referenced by ir_read(), and tcpip_get().
| #define CSDENY 5 |
Definition at line 150 of file comstack.h.
Referenced by tcpip_listen().
| #define CSERRORSSL 6 |
Definition at line 151 of file comstack.h.
Referenced by tcpip_bind(), and tcpip_rcvconnect().
| #define CSLASTERROR CSBUFSIZE /* must be the value of last CS error */ |
Definition at line 153 of file comstack.h.
Referenced by cs_errmsg().
| #define CSNODATA 3 |
Definition at line 148 of file comstack.h.
Referenced by tcpip_listen(), and unix_listen().
| #define CSNONE 0 |
Definition at line 145 of file comstack.h.
| #define CSOUTSTATE 2 |
Definition at line 147 of file comstack.h.
Referenced by tcpip_accept(), tcpip_connect(), tcpip_listen(), tcpip_rcvconnect(), unix_accept(), unix_connect(), unix_listen(), and unix_rcvconnect().
| #define CSWRONGBUF 4 |
Definition at line 149 of file comstack.h.
Referenced by tcpip_put(), and unix_put().
| #define CSYSERR 1 |
Definition at line 146 of file comstack.h.
Referenced by add_listener(), cs_errmsg(), tcpip_accept(), tcpip_addrstr(), tcpip_bind(), tcpip_connect(), tcpip_get(), tcpip_listen(), tcpip_put(), unix_accept(), unix_bind(), unix_connect(), unix_listen(), and unix_put().
Definition at line 45 of file comstack.h.
| typedef COMSTACK(* CS_TYPE)(int s, int flags, int protocol, void *vp) |
Definition at line 46 of file comstack.h.
| int completeWAIS | ( | const char * | buf, |
| int | len | ||
| ) |
Definition at line 18 of file waislen.c.
Referenced by tcpip_type(), and unix_type().
| int cs_complete_auto | ( | const char * | buf, |
| int | len | ||
| ) |
Definition at line 435 of file comstack.c.
References cs_complete_auto_x().
Referenced by tcpip_get_connect(), tcpip_type(), and unix_type().
| int cs_complete_auto_head | ( | const char * | buf, |
| int | len | ||
| ) |
Definition at line 440 of file comstack.c.
References cs_complete_auto_x().
Referenced by yaz_tcpip_create().
| COMSTACK cs_create_host | ( | const char * | type_and_host, |
| int | blocking, | ||
| void ** | vp | ||
| ) |
Definition at line 178 of file comstack.c.
References cs_create_host_proxy().
Referenced by add_listener().
| COMSTACK cs_create_host_proxy | ( | const char * | vhost, |
| int | blocking, | ||
| void ** | vp, | ||
| const char * | proxy_host | ||
| ) |
Definition at line 183 of file comstack.c.
References cs_close, cs_create, cs_parse_host(), cs_straddr, PROTO_Z3950, tcpip_type(), xfree, and yaz_tcpip_create().
Referenced by cs_create_host(), do_connect_host(), and yaz_url_exec().
| const char* cs_errmsg | ( | int | n | ) |
Definition at line 47 of file comstack.c.
References cs_errlist, CSLASTERROR, and CSYSERR.
Referenced by cs_strerror(), and ir_read().
| void cs_get_host_args | ( | const char * | type_and_host, |
| const char ** | args | ||
| ) |
Definition at line 67 of file comstack.c.
Referenced by ZOOM_connection_get_databases().
| int cs_get_peer_certificate_x509 | ( | COMSTACK | cs, |
| char ** | buf, | ||
| int * | len | ||
| ) |
Definition at line 1710 of file tcpip.c.
References cs_get_ssl(), and xmalloc.
Referenced by get_cert().
| void* cs_get_ssl | ( | COMSTACK | cs | ) |
Definition at line 1667 of file tcpip.c.
References comstack::cprivate, ssl_type(), and comstack::type.
Referenced by cs_get_peer_certificate_x509().
| int cs_look | ( | COMSTACK | ) |
Definition at line 230 of file comstack.c.
References comstack::event.
Referenced by ZOOM_connection_do_io().
| void cs_print_session_info | ( | COMSTACK | cs | ) |
Definition at line 1598 of file tcpip.c.
References comstack::cprivate, ssl_type(), and comstack::type.
| void cs_set_max_recv_bytes | ( | COMSTACK | cs, |
| int | max_recv_bytes | ||
| ) |
Definition at line 445 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 1696 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 1679 of file tcpip.c.
References comstack::cprivate, ssl_type(), and comstack::type.
| const char* cs_strerror | ( | COMSTACK | h | ) |
Definition at line 62 of file comstack.c.
References comstack::cerrno, and cs_errmsg().
Referenced by add_listener().
1.8.1.2