diff options
Diffstat (limited to 'src/lib/libcrypto/bio/bio.h')
-rw-r--r-- | src/lib/libcrypto/bio/bio.h | 70 |
1 files changed, 69 insertions, 1 deletions
diff --git a/src/lib/libcrypto/bio/bio.h b/src/lib/libcrypto/bio/bio.h index ab47abcf14..05699ab212 100644 --- a/src/lib/libcrypto/bio/bio.h +++ b/src/lib/libcrypto/bio/bio.h | |||
@@ -68,6 +68,14 @@ | |||
68 | 68 | ||
69 | #include <openssl/crypto.h> | 69 | #include <openssl/crypto.h> |
70 | 70 | ||
71 | #ifndef OPENSSL_NO_SCTP | ||
72 | # ifndef OPENSSL_SYS_VMS | ||
73 | # include <stdint.h> | ||
74 | # else | ||
75 | # include <inttypes.h> | ||
76 | # endif | ||
77 | #endif | ||
78 | |||
71 | #ifdef __cplusplus | 79 | #ifdef __cplusplus |
72 | extern "C" { | 80 | extern "C" { |
73 | #endif | 81 | #endif |
@@ -95,6 +103,9 @@ extern "C" { | |||
95 | #define BIO_TYPE_BIO (19|0x0400) /* (half a) BIO pair */ | 103 | #define BIO_TYPE_BIO (19|0x0400) /* (half a) BIO pair */ |
96 | #define BIO_TYPE_LINEBUFFER (20|0x0200) /* filter */ | 104 | #define BIO_TYPE_LINEBUFFER (20|0x0200) /* filter */ |
97 | #define BIO_TYPE_DGRAM (21|0x0400|0x0100) | 105 | #define BIO_TYPE_DGRAM (21|0x0400|0x0100) |
106 | #ifndef OPENSSL_NO_SCTP | ||
107 | #define BIO_TYPE_DGRAM_SCTP (24|0x0400|0x0100) | ||
108 | #endif | ||
98 | #define BIO_TYPE_ASN1 (22|0x0200) /* filter */ | 109 | #define BIO_TYPE_ASN1 (22|0x0200) /* filter */ |
99 | #define BIO_TYPE_COMP (23|0x0200) /* filter */ | 110 | #define BIO_TYPE_COMP (23|0x0200) /* filter */ |
100 | 111 | ||
@@ -146,6 +157,7 @@ extern "C" { | |||
146 | /* #endif */ | 157 | /* #endif */ |
147 | 158 | ||
148 | #define BIO_CTRL_DGRAM_QUERY_MTU 40 /* as kernel for current MTU */ | 159 | #define BIO_CTRL_DGRAM_QUERY_MTU 40 /* as kernel for current MTU */ |
160 | #define BIO_CTRL_DGRAM_GET_FALLBACK_MTU 47 | ||
149 | #define BIO_CTRL_DGRAM_GET_MTU 41 /* get cached value for MTU */ | 161 | #define BIO_CTRL_DGRAM_GET_MTU 41 /* get cached value for MTU */ |
150 | #define BIO_CTRL_DGRAM_SET_MTU 42 /* set cached value for | 162 | #define BIO_CTRL_DGRAM_SET_MTU 42 /* set cached value for |
151 | * MTU. want to use this | 163 | * MTU. want to use this |
@@ -161,7 +173,22 @@ extern "C" { | |||
161 | #define BIO_CTRL_DGRAM_SET_PEER 44 /* Destination for the data */ | 173 | #define BIO_CTRL_DGRAM_SET_PEER 44 /* Destination for the data */ |
162 | 174 | ||
163 | #define BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT 45 /* Next DTLS handshake timeout to | 175 | #define BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT 45 /* Next DTLS handshake timeout to |
164 | * adjust socket timeouts */ | 176 | * adjust socket timeouts */ |
177 | |||
178 | #ifndef OPENSSL_NO_SCTP | ||
179 | /* SCTP stuff */ | ||
180 | #define BIO_CTRL_DGRAM_SCTP_SET_IN_HANDSHAKE 50 | ||
181 | #define BIO_CTRL_DGRAM_SCTP_ADD_AUTH_KEY 51 | ||
182 | #define BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY 52 | ||
183 | #define BIO_CTRL_DGRAM_SCTP_AUTH_CCS_RCVD 53 | ||
184 | #define BIO_CTRL_DGRAM_SCTP_GET_SNDINFO 60 | ||
185 | #define BIO_CTRL_DGRAM_SCTP_SET_SNDINFO 61 | ||
186 | #define BIO_CTRL_DGRAM_SCTP_GET_RCVINFO 62 | ||
187 | #define BIO_CTRL_DGRAM_SCTP_SET_RCVINFO 63 | ||
188 | #define BIO_CTRL_DGRAM_SCTP_GET_PRINFO 64 | ||
189 | #define BIO_CTRL_DGRAM_SCTP_SET_PRINFO 65 | ||
190 | #define BIO_CTRL_DGRAM_SCTP_SAVE_SHUTDOWN 70 | ||
191 | #endif | ||
165 | 192 | ||
166 | /* modifiers */ | 193 | /* modifiers */ |
167 | #define BIO_FP_READ 0x02 | 194 | #define BIO_FP_READ 0x02 |
@@ -331,6 +358,34 @@ typedef struct bio_f_buffer_ctx_struct | |||
331 | /* Prefix and suffix callback in ASN1 BIO */ | 358 | /* Prefix and suffix callback in ASN1 BIO */ |
332 | typedef int asn1_ps_func(BIO *b, unsigned char **pbuf, int *plen, void *parg); | 359 | typedef int asn1_ps_func(BIO *b, unsigned char **pbuf, int *plen, void *parg); |
333 | 360 | ||
361 | #ifndef OPENSSL_NO_SCTP | ||
362 | /* SCTP parameter structs */ | ||
363 | struct bio_dgram_sctp_sndinfo | ||
364 | { | ||
365 | uint16_t snd_sid; | ||
366 | uint16_t snd_flags; | ||
367 | uint32_t snd_ppid; | ||
368 | uint32_t snd_context; | ||
369 | }; | ||
370 | |||
371 | struct bio_dgram_sctp_rcvinfo | ||
372 | { | ||
373 | uint16_t rcv_sid; | ||
374 | uint16_t rcv_ssn; | ||
375 | uint16_t rcv_flags; | ||
376 | uint32_t rcv_ppid; | ||
377 | uint32_t rcv_tsn; | ||
378 | uint32_t rcv_cumtsn; | ||
379 | uint32_t rcv_context; | ||
380 | }; | ||
381 | |||
382 | struct bio_dgram_sctp_prinfo | ||
383 | { | ||
384 | uint16_t pr_policy; | ||
385 | uint32_t pr_value; | ||
386 | }; | ||
387 | #endif | ||
388 | |||
334 | /* connect BIO stuff */ | 389 | /* connect BIO stuff */ |
335 | #define BIO_CONN_S_BEFORE 1 | 390 | #define BIO_CONN_S_BEFORE 1 |
336 | #define BIO_CONN_S_GET_IP 2 | 391 | #define BIO_CONN_S_GET_IP 2 |
@@ -628,6 +683,9 @@ BIO_METHOD *BIO_f_linebuffer(void); | |||
628 | BIO_METHOD *BIO_f_nbio_test(void); | 683 | BIO_METHOD *BIO_f_nbio_test(void); |
629 | #ifndef OPENSSL_NO_DGRAM | 684 | #ifndef OPENSSL_NO_DGRAM |
630 | BIO_METHOD *BIO_s_datagram(void); | 685 | BIO_METHOD *BIO_s_datagram(void); |
686 | #ifndef OPENSSL_NO_SCTP | ||
687 | BIO_METHOD *BIO_s_datagram_sctp(void); | ||
688 | #endif | ||
631 | #endif | 689 | #endif |
632 | 690 | ||
633 | /* BIO_METHOD *BIO_f_ber(void); */ | 691 | /* BIO_METHOD *BIO_f_ber(void); */ |
@@ -670,6 +728,15 @@ int BIO_set_tcp_ndelay(int sock,int turn_on); | |||
670 | 728 | ||
671 | BIO *BIO_new_socket(int sock, int close_flag); | 729 | BIO *BIO_new_socket(int sock, int close_flag); |
672 | BIO *BIO_new_dgram(int fd, int close_flag); | 730 | BIO *BIO_new_dgram(int fd, int close_flag); |
731 | #ifndef OPENSSL_NO_SCTP | ||
732 | BIO *BIO_new_dgram_sctp(int fd, int close_flag); | ||
733 | int BIO_dgram_is_sctp(BIO *bio); | ||
734 | int BIO_dgram_sctp_notification_cb(BIO *b, | ||
735 | void (*handle_notifications)(BIO *bio, void *context, void *buf), | ||
736 | void *context); | ||
737 | int BIO_dgram_sctp_wait_for_dry(BIO *b); | ||
738 | int BIO_dgram_sctp_msg_waiting(BIO *b); | ||
739 | #endif | ||
673 | BIO *BIO_new_fd(int fd, int close_flag); | 740 | BIO *BIO_new_fd(int fd, int close_flag); |
674 | BIO *BIO_new_connect(char *host_port); | 741 | BIO *BIO_new_connect(char *host_port); |
675 | BIO *BIO_new_accept(char *host_port); | 742 | BIO *BIO_new_accept(char *host_port); |
@@ -734,6 +801,7 @@ void ERR_load_BIO_strings(void); | |||
734 | #define BIO_F_BUFFER_CTRL 114 | 801 | #define BIO_F_BUFFER_CTRL 114 |
735 | #define BIO_F_CONN_CTRL 127 | 802 | #define BIO_F_CONN_CTRL 127 |
736 | #define BIO_F_CONN_STATE 115 | 803 | #define BIO_F_CONN_STATE 115 |
804 | #define BIO_F_DGRAM_SCTP_READ 132 | ||
737 | #define BIO_F_FILE_CTRL 116 | 805 | #define BIO_F_FILE_CTRL 116 |
738 | #define BIO_F_FILE_READ 130 | 806 | #define BIO_F_FILE_READ 130 |
739 | #define BIO_F_LINEBUFFER_CTRL 129 | 807 | #define BIO_F_LINEBUFFER_CTRL 129 |