More tweaks for comments due indent issues
[openssl.git] / crypto / bio / bio.h
index 60573c624fafd6605adffa06f63e6f829e6215c4..3ea44ab263468661505855da5d876ec7356781b3 100644 (file)
 #include <openssl/crypto.h>
 
 #ifndef OPENSSL_NO_SCTP
-#include <stdint.h>
+# ifndef OPENSSL_SYS_VMS
+# include <stdint.h>
+# else
+# include <inttypes.h>
+# endif
 #endif
 
 #ifdef  __cplusplus
@@ -153,6 +157,7 @@ extern "C" {
 /* #endif */
 
 #define BIO_CTRL_DGRAM_QUERY_MTU          40 /* as kernel for current MTU */
+#define BIO_CTRL_DGRAM_GET_FALLBACK_MTU   47
 #define BIO_CTRL_DGRAM_GET_MTU            41 /* get cached value for MTU */
 #define BIO_CTRL_DGRAM_SET_MTU            42 /* set cached value for
                                              * MTU. want to use this
@@ -169,6 +174,9 @@ extern "C" {
 
 #define BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT   45 /* Next DTLS handshake timeout to
                                               * adjust socket timeouts */
+#define BIO_CTRL_DGRAM_SET_DONT_FRAG      48
+
+#define BIO_CTRL_DGRAM_GET_MTU_OVERHEAD   49
 
 #ifndef OPENSSL_NO_SCTP
 /* SCTP stuff */
@@ -210,7 +218,8 @@ extern "C" {
 #define BIO_GHBN_CTRL_FLUSH            5
 
 /* Mostly used in the SSL BIO */
-/* Not used anymore
+/*-
+ * Not used anymore
  * #define BIO_FLAGS_PROTOCOL_DELAYED_READ 0x10
  * #define BIO_FLAGS_PROTOCOL_DELAYED_WRITE 0x20
  * #define BIO_FLAGS_PROTOCOL_STARTUP  0x40
@@ -328,7 +337,8 @@ DECLARE_STACK_OF(BIO)
 
 typedef struct bio_f_buffer_ctx_struct
        {
-       /* Buffers are setup like this:
+       /*-
+        * Buffers are setup like this:
         *
         * <---------------------- size ----------------------->
         * +---------------------------------------------------+
@@ -602,6 +612,8 @@ int BIO_ctrl_reset_read_request(BIO *b);
          (int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_PEER, 0, (char *)peer)
 #define BIO_dgram_set_peer(b,peer) \
          (int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_PEER, 0, (char *)peer)
+#define BIO_dgram_get_mtu_overhead(b) \
+         (unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_MTU_OVERHEAD, 0, NULL)
 
 /* These two aren't currently implemented */
 /* int BIO_get_ex_num(BIO *bio); */
@@ -701,8 +713,12 @@ int BIO_dump_indent(BIO *b,const char *bytes,int len,int indent);
 int BIO_dump_fp(FILE *fp, const char *s, int len);
 int BIO_dump_indent_fp(FILE *fp, const char *s, int len, int indent);
 #endif
+int BIO_hex_string(BIO *out, int indent, int width, unsigned char *data,
+                  int datalen);
+
 struct hostent *BIO_gethostbyname(const char *name);
-/* We might want a thread-safe interface too:
+/*-
+ * We might want a thread-safe interface too:
  * struct hostent *BIO_gethostbyname_r(const char *name,
  *     struct hostent *result, void *buffer, size_t buflen);
  * or something similar (caller allocates a struct hostent,
@@ -733,8 +749,8 @@ int BIO_dgram_sctp_wait_for_dry(BIO *b);
 int BIO_dgram_sctp_msg_waiting(BIO *b);
 #endif
 BIO *BIO_new_fd(int fd, int close_flag);
-BIO *BIO_new_connect(char *host_port);
-BIO *BIO_new_accept(char *host_port);
+BIO *BIO_new_connect(const char *host_port);
+BIO *BIO_new_accept(const char *host_port);
 
 int BIO_new_bio_pair(BIO **bio1, size_t writebuf1,
        BIO **bio2, size_t writebuf2);