YAZ
5.34.0
|
Implements Generic COMSTACK functions. More...
#include <string.h>
#include <errno.h>
#include <yaz/yaz-iconv.h>
#include <yaz/log.h>
#include <yaz/comstack.h>
#include <yaz/tcpip.h>
#include <yaz/unix.h>
#include <yaz/odr.h>
#include <yaz/matchstr.h>
Go to the source code of this file.
Macros | |
#define | CHUNK_DEBUG 0 |
Functions | |
const char * | cs_errmsg (int n) |
const char * | cs_strerror (COMSTACK h) |
void | cs_get_host_args (const char *type_and_host, const char **args) |
int | cs_parse_host (const char *uri, const char **host, CS_TYPE *t, enum oid_proto *proto, char **connect_host) |
COMSTACK | cs_create_host (const char *vhost, 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) |
int | cs_look (COMSTACK cs) |
static int | skip_crlf (const char *buf, int len, int *i) |
static int | cs_read_chunk (const char *buf, int i, int len) |
static int | cs_complete_http (const char *buf, int len, int head_only) |
static int | cs_complete_auto_x (const char *buf, int len, int head_only) |
int | cs_complete_auto (const char *buf, int len) |
int | cs_complete_auto_head (const char *buf, int len) |
void | cs_set_max_recv_bytes (COMSTACK cs, int max_recv_bytes) |
Variables | |
static const char * | cs_errlist [] |
Implements Generic COMSTACK functions.
Definition in file comstack.c.
#define CHUNK_DEBUG 0 |
Definition at line 280 of file comstack.c.
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().
|
static |
Definition at line 453 of file comstack.c.
References completeBER(), and cs_complete_http().
Referenced by cs_complete_auto(), and cs_complete_auto_head().
|
static |
Definition at line 358 of file comstack.c.
References cs_read_chunk(), skip_crlf(), yaz_isdigit, and yaz_strncasecmp().
Referenced by cs_complete_auto_x().
COMSTACK cs_create_host | ( | const char * | vhost, |
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_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().
|
static |
Definition at line 282 of file comstack.c.
References skip_crlf(), yaz_isdigit, yaz_islower, and yaz_isupper.
Referenced by cs_complete_http().
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().
const char* cs_strerror | ( | COMSTACK | h | ) |
Definition at line 43 of file comstack.c.
References comstack::cerrno, and cs_errmsg().
Referenced by add_listener().
|
static |
Definition at line 262 of file comstack.c.
Referenced by cs_complete_http(), and cs_read_chunk().
|
static |
Definition at line 24 of file comstack.c.
Referenced by cs_errmsg().