#define WSAAPI
#endif
-#if 0
-static unsigned long BIO_ghbn_hits = 0L;
-static unsigned long BIO_ghbn_miss = 0L;
-
-#define GHBN_NUM 4
-static struct ghbn_cache_st {
- char name[129];
- struct hostent *ent;
- unsigned long order;
-} ghbn_cache[GHBN_NUM];
-#endif
-
static int get_ip(const char *str, unsigned char *ip);
-#if 0
-static void ghbn_free(struct hostent *a);
-static struct hostent *ghbn_dup(struct hostent *a);
-#endif
int
BIO_get_host_ip(const char *str, unsigned char *ip)
*port_ptr = 21;
else if (strcmp(str, "gopher") == 0)
*port_ptr = 70;
-#if 0
- else if (strcmp(str, "wais") == 0)
- *port_ptr = 21;
-#endif
else {
SYSerr(SYS_F_GETSERVBYNAME, errno);
ERR_add_error_data(3, "service='", str, "'");
int j, i;
int size;
-#if defined(OPENSSL_SYS_BEOS_R5)
- return 0;
-#endif
-
size = sizeof(int);
/* Note: under Windows the third parameter is of type (char *)
* whereas under other systems it is (void *) if you don't have
{
int i;
-#ifdef __DJGPP__
- i = ioctl(fd, type, (char *)arg);
-#else
# define ARG arg
i = ioctl(fd, type, ARG);
-#endif /* __DJGPP__ */
if (i < 0)
SYSerr(SYS_F_IOCTLSOCKET, errno);
return (i);
r = BIO_write(b->next_bio,
&(ctx->obuf[ctx->obuf_off]),
ctx->obuf_len);
-#if 0
- fprintf(stderr, "FLUSH [%3d] %3d -> %3d\n", ctx->obuf_off, ctx->obuf_len, r);
-#endif
BIO_copy_next_retry(b);
if (r <= 0)
return ((long)r);
}
}
-#if 0
- BIO_write(b->next_bio, "<*<", 3);
-#endif
i = BIO_write(b->next_bio, ctx->obuf, ctx->obuf_len);
if (i <= 0) {
ctx->obuf_len = orig_olen;
BIO_copy_next_retry(b);
-#if 0
- BIO_write(b->next_bio, ">*>", 3);
-#endif
if (i < 0)
return ((num > 0) ? num : i);
if (i == 0)
return (num);
}
-#if 0
- BIO_write(b->next_bio, ">*>", 3);
-#endif
if (i < ctx->obuf_len)
memmove(ctx->obuf, ctx->obuf + i,
ctx->obuf_len - i);
/* Now that the save buffer is emptied, let's write the input
buffer if a NL was found and there is anything to write. */
if ((foundnl || p - in > ctx->obuf_size) && p - in > 0) {
-#if 0
- BIO_write(b->next_bio, "<*<", 3);
-#endif
i = BIO_write(b->next_bio, in, p - in);
if (i <= 0) {
BIO_copy_next_retry(b);
-#if 0
- BIO_write(b->next_bio, ">*>", 3);
-#endif
if (i < 0)
return ((num > 0) ? num : i);
if (i == 0)
return (num);
}
-#if 0
- BIO_write(b->next_bio, ">*>", 3);
-#endif
num += i;
in += i;
inl -= i;
if (ctx->obuf_len > 0) {
r = BIO_write(b->next_bio,
ctx->obuf, ctx->obuf_len);
-#if 0
- fprintf(stderr, "FLUSH %3d -> %3d\n", ctx->obuf_len, r);
-#endif
BIO_copy_next_retry(b);
if (r <= 0)
return ((long)r);
BIO_set_retry_write(b);
data->_errno = errno;
-
-#if 0 /* higher layers are responsible for querying MTU, if necessary */
- if (data->_errno == EMSGSIZE)
- /* retrieve the new MTU */
- BIO_ctrl(b, BIO_CTRL_DGRAM_QUERY_MTU, 0, NULL);
-#endif
+ /*
+ * higher layers are responsible for querying MTU,
+ * if necessary
+ */
}
}
return (ret);
break;
case BIO_CTRL_DGRAM_CONNECT:
to = (struct sockaddr *)ptr;
-#if 0
- if (connect(b->num, to, sizeof(struct sockaddr)) < 0) {
- perror("connect");
- ret = 0;
- } else {
-#endif
- switch (to->sa_family) {
- case AF_INET:
- memcpy(&data->peer, to, sizeof(data->peer.sa_in));
- break;
+ switch (to->sa_family) {
+ case AF_INET:
+ memcpy(&data->peer, to, sizeof(data->peer.sa_in));
+ break;
#if OPENSSL_USE_IPV6
- case AF_INET6:
- memcpy(&data->peer, to, sizeof(data->peer.sa_in6));
- break;
+ case AF_INET6:
+ memcpy(&data->peer, to, sizeof(data->peer.sa_in6));
+ break;
#endif
- default:
- memcpy(&data->peer, to, sizeof(data->peer.sa));
- break;
- }
-#if 0
+ default:
+ memcpy(&data->peer, to, sizeof(data->peer.sa));
+ break;
}
-#endif
break;
/* (Linux)kernel sets DF bit on outgoing IP packets */
case BIO_CTRL_DGRAM_MTU_DISCOVER:
#define WSAAPI
#endif
-#if 0
-static unsigned long BIO_ghbn_hits = 0L;
-static unsigned long BIO_ghbn_miss = 0L;
-
-#define GHBN_NUM 4
-static struct ghbn_cache_st {
- char name[129];
- struct hostent *ent;
- unsigned long order;
-} ghbn_cache[GHBN_NUM];
-#endif
-
static int get_ip(const char *str, unsigned char *ip);
-#if 0
-static void ghbn_free(struct hostent *a);
-static struct hostent *ghbn_dup(struct hostent *a);
-#endif
int
BIO_get_host_ip(const char *str, unsigned char *ip)
*port_ptr = 21;
else if (strcmp(str, "gopher") == 0)
*port_ptr = 70;
-#if 0
- else if (strcmp(str, "wais") == 0)
- *port_ptr = 21;
-#endif
else {
SYSerr(SYS_F_GETSERVBYNAME, errno);
ERR_add_error_data(3, "service='", str, "'");
int j, i;
int size;
-#if defined(OPENSSL_SYS_BEOS_R5)
- return 0;
-#endif
-
size = sizeof(int);
/* Note: under Windows the third parameter is of type (char *)
* whereas under other systems it is (void *) if you don't have
{
int i;
-#ifdef __DJGPP__
- i = ioctl(fd, type, (char *)arg);
-#else
# define ARG arg
i = ioctl(fd, type, ARG);
-#endif /* __DJGPP__ */
if (i < 0)
SYSerr(SYS_F_IOCTLSOCKET, errno);
return (i);
r = BIO_write(b->next_bio,
&(ctx->obuf[ctx->obuf_off]),
ctx->obuf_len);
-#if 0
- fprintf(stderr, "FLUSH [%3d] %3d -> %3d\n", ctx->obuf_off, ctx->obuf_len, r);
-#endif
BIO_copy_next_retry(b);
if (r <= 0)
return ((long)r);
}
}
-#if 0
- BIO_write(b->next_bio, "<*<", 3);
-#endif
i = BIO_write(b->next_bio, ctx->obuf, ctx->obuf_len);
if (i <= 0) {
ctx->obuf_len = orig_olen;
BIO_copy_next_retry(b);
-#if 0
- BIO_write(b->next_bio, ">*>", 3);
-#endif
if (i < 0)
return ((num > 0) ? num : i);
if (i == 0)
return (num);
}
-#if 0
- BIO_write(b->next_bio, ">*>", 3);
-#endif
if (i < ctx->obuf_len)
memmove(ctx->obuf, ctx->obuf + i,
ctx->obuf_len - i);
/* Now that the save buffer is emptied, let's write the input
buffer if a NL was found and there is anything to write. */
if ((foundnl || p - in > ctx->obuf_size) && p - in > 0) {
-#if 0
- BIO_write(b->next_bio, "<*<", 3);
-#endif
i = BIO_write(b->next_bio, in, p - in);
if (i <= 0) {
BIO_copy_next_retry(b);
-#if 0
- BIO_write(b->next_bio, ">*>", 3);
-#endif
if (i < 0)
return ((num > 0) ? num : i);
if (i == 0)
return (num);
}
-#if 0
- BIO_write(b->next_bio, ">*>", 3);
-#endif
num += i;
in += i;
inl -= i;
if (ctx->obuf_len > 0) {
r = BIO_write(b->next_bio,
ctx->obuf, ctx->obuf_len);
-#if 0
- fprintf(stderr, "FLUSH %3d -> %3d\n", ctx->obuf_len, r);
-#endif
BIO_copy_next_retry(b);
if (r <= 0)
return ((long)r);
BIO_set_retry_write(b);
data->_errno = errno;
-
-#if 0 /* higher layers are responsible for querying MTU, if necessary */
- if (data->_errno == EMSGSIZE)
- /* retrieve the new MTU */
- BIO_ctrl(b, BIO_CTRL_DGRAM_QUERY_MTU, 0, NULL);
-#endif
+ /*
+ * higher layers are responsible for querying MTU,
+ * if necessary
+ */
}
}
return (ret);
break;
case BIO_CTRL_DGRAM_CONNECT:
to = (struct sockaddr *)ptr;
-#if 0
- if (connect(b->num, to, sizeof(struct sockaddr)) < 0) {
- perror("connect");
- ret = 0;
- } else {
-#endif
- switch (to->sa_family) {
- case AF_INET:
- memcpy(&data->peer, to, sizeof(data->peer.sa_in));
- break;
+ switch (to->sa_family) {
+ case AF_INET:
+ memcpy(&data->peer, to, sizeof(data->peer.sa_in));
+ break;
#if OPENSSL_USE_IPV6
- case AF_INET6:
- memcpy(&data->peer, to, sizeof(data->peer.sa_in6));
- break;
+ case AF_INET6:
+ memcpy(&data->peer, to, sizeof(data->peer.sa_in6));
+ break;
#endif
- default:
- memcpy(&data->peer, to, sizeof(data->peer.sa));
- break;
- }
-#if 0
+ default:
+ memcpy(&data->peer, to, sizeof(data->peer.sa));
+ break;
}
-#endif
break;
/* (Linux)kernel sets DF bit on outgoing IP packets */
case BIO_CTRL_DGRAM_MTU_DISCOVER: