diff options
Diffstat (limited to 'src/lib/libcrypto/bio/bss_rtcp.c')
-rw-r--r-- | src/lib/libcrypto/bio/bss_rtcp.c | 56 |
1 files changed, 26 insertions, 30 deletions
diff --git a/src/lib/libcrypto/bio/bss_rtcp.c b/src/lib/libcrypto/bio/bss_rtcp.c index 6eb434dee8..2ef040057e 100644 --- a/src/lib/libcrypto/bio/bss_rtcp.c +++ b/src/lib/libcrypto/bio/bss_rtcp.c | |||
@@ -58,6 +58,7 @@ | |||
58 | 58 | ||
59 | /* Written by David L. Jones <jonesd@kcgl1.eng.ohio-state.edu> | 59 | /* Written by David L. Jones <jonesd@kcgl1.eng.ohio-state.edu> |
60 | * Date: 22-JUL-1996 | 60 | * Date: 22-JUL-1996 |
61 | * Revised: 25-SEP-1997 Update for 0.8.1, BIO_CTRL_SET -> BIO_C_SET_FD | ||
61 | */ | 62 | */ |
62 | /* VMS */ | 63 | /* VMS */ |
63 | #include <stdio.h> | 64 | #include <stdio.h> |
@@ -65,10 +66,11 @@ | |||
65 | #include <string.h> | 66 | #include <string.h> |
66 | #include <errno.h> | 67 | #include <errno.h> |
67 | #include "cryptlib.h" | 68 | #include "cryptlib.h" |
68 | #include "bio.h" | 69 | #include <openssl/bio.h> |
69 | 70 | ||
70 | #include <iodef.h> /* VMS IO$_ definitions */ | 71 | #include <iodef.h> /* VMS IO$_ definitions */ |
71 | extern int SYS$QIOW(); | 72 | #include <starlet.h> |
73 | |||
72 | typedef unsigned short io_channel; | 74 | typedef unsigned short io_channel; |
73 | /*************************************************************************/ | 75 | /*************************************************************************/ |
74 | struct io_status { short status, count; long flags; }; | 76 | struct io_status { short status, count; long flags; }; |
@@ -107,18 +109,24 @@ static BIO_METHOD rtcp_method= | |||
107 | rtcp_free, | 109 | rtcp_free, |
108 | }; | 110 | }; |
109 | 111 | ||
110 | BIO_METHOD *BIO_s_rtcp() | 112 | BIO_METHOD *BIO_s_rtcp(void) |
111 | { | 113 | { |
112 | return(&rtcp_method); | 114 | return(&rtcp_method); |
113 | } | 115 | } |
114 | /*****************************************************************************/ | 116 | /*****************************************************************************/ |
115 | /* Decnet I/O routines. | 117 | /* Decnet I/O routines. |
116 | */ | 118 | */ |
119 | |||
120 | #ifdef __DECC | ||
121 | #pragma message save | ||
122 | #pragma message disable DOLLARID | ||
123 | #endif | ||
124 | |||
117 | static int get ( io_channel chan, char *buffer, int maxlen, int *length ) | 125 | static int get ( io_channel chan, char *buffer, int maxlen, int *length ) |
118 | { | 126 | { |
119 | int status; | 127 | int status; |
120 | struct io_status iosb; | 128 | struct io_status iosb; |
121 | status = SYS$QIOW ( 0, chan, IO$_READVBLK, &iosb, 0, 0, | 129 | status = sys$qiow ( 0, chan, IO$_READVBLK, &iosb, 0, 0, |
122 | buffer, maxlen, 0, 0, 0, 0 ); | 130 | buffer, maxlen, 0, 0, 0, 0 ); |
123 | if ( (status&1) == 1 ) status = iosb.status; | 131 | if ( (status&1) == 1 ) status = iosb.status; |
124 | if ( (status&1) == 1 ) *length = iosb.count; | 132 | if ( (status&1) == 1 ) *length = iosb.count; |
@@ -129,15 +137,19 @@ static int put ( io_channel chan, char *buffer, int length ) | |||
129 | { | 137 | { |
130 | int status; | 138 | int status; |
131 | struct io_status iosb; | 139 | struct io_status iosb; |
132 | status = SYS$QIOW ( 0, chan, IO$_WRITEVBLK, &iosb, 0, 0, | 140 | status = sys$qiow ( 0, chan, IO$_WRITEVBLK, &iosb, 0, 0, |
133 | buffer, length, 0, 0, 0, 0 ); | 141 | buffer, length, 0, 0, 0, 0 ); |
134 | if ( (status&1) == 1 ) status = iosb.status; | 142 | if ( (status&1) == 1 ) status = iosb.status; |
135 | return status; | 143 | return status; |
136 | } | 144 | } |
145 | |||
146 | #ifdef __DECC | ||
147 | #pragma message restore | ||
148 | #endif | ||
149 | |||
137 | /***************************************************************************/ | 150 | /***************************************************************************/ |
138 | 151 | ||
139 | static int rtcp_new(bi) | 152 | static int rtcp_new(BIO *bi) |
140 | BIO *bi; | ||
141 | { | 153 | { |
142 | struct rpc_ctx *ctx; | 154 | struct rpc_ctx *ctx; |
143 | bi->init=1; | 155 | bi->init=1; |
@@ -150,8 +162,7 @@ BIO *bi; | |||
150 | return(1); | 162 | return(1); |
151 | } | 163 | } |
152 | 164 | ||
153 | static int rtcp_free(a) | 165 | static int rtcp_free(BIO *a) |
154 | BIO *a; | ||
155 | { | 166 | { |
156 | if (a == NULL) return(0); | 167 | if (a == NULL) return(0); |
157 | if ( a->ptr ) Free ( a->ptr ); | 168 | if ( a->ptr ) Free ( a->ptr ); |
@@ -159,10 +170,7 @@ BIO *a; | |||
159 | return(1); | 170 | return(1); |
160 | } | 171 | } |
161 | 172 | ||
162 | static int rtcp_read(b,out,outl) | 173 | static int rtcp_read(BIO *b, char *out, int outl) |
163 | BIO *b; | ||
164 | char *out; | ||
165 | int outl; | ||
166 | { | 174 | { |
167 | int status, length; | 175 | int status, length; |
168 | struct rpc_ctx *ctx; | 176 | struct rpc_ctx *ctx; |
@@ -209,10 +217,7 @@ int outl; | |||
209 | return length; | 217 | return length; |
210 | } | 218 | } |
211 | 219 | ||
212 | static int rtcp_write(b,in,inl) | 220 | static int rtcp_write(BIO *b, char *in, int inl) |
213 | BIO *b; | ||
214 | char *in; | ||
215 | int inl; | ||
216 | { | 221 | { |
217 | int status, i, segment, length; | 222 | int status, i, segment, length; |
218 | struct rpc_ctx *ctx; | 223 | struct rpc_ctx *ctx; |
@@ -241,11 +246,7 @@ int inl; | |||
241 | return(i); | 246 | return(i); |
242 | } | 247 | } |
243 | 248 | ||
244 | static long rtcp_ctrl(b,cmd,num,ptr) | 249 | static long rtcp_ctrl(BIO *b, int cmd, long num, char *ptr) |
245 | BIO *b; | ||
246 | int cmd; | ||
247 | long num; | ||
248 | char *ptr; | ||
249 | { | 250 | { |
250 | long ret=1; | 251 | long ret=1; |
251 | 252 | ||
@@ -255,7 +256,7 @@ char *ptr; | |||
255 | case BIO_CTRL_EOF: | 256 | case BIO_CTRL_EOF: |
256 | ret = 1; | 257 | ret = 1; |
257 | break; | 258 | break; |
258 | case BIO_CTRL_SET: | 259 | case BIO_C_SET_FD: |
259 | b->num = num; | 260 | b->num = num; |
260 | ret = 1; | 261 | ret = 1; |
261 | break; | 262 | break; |
@@ -276,17 +277,12 @@ char *ptr; | |||
276 | return(ret); | 277 | return(ret); |
277 | } | 278 | } |
278 | 279 | ||
279 | static int rtcp_gets(bp,buf,size) | 280 | static int rtcp_gets(BIO *bp, char *buf, int size) |
280 | BIO *bp; | ||
281 | char *buf; | ||
282 | int size; | ||
283 | { | 281 | { |
284 | return(0); | 282 | return(0); |
285 | } | 283 | } |
286 | 284 | ||
287 | static int rtcp_puts(bp,str) | 285 | static int rtcp_puts(BIO *bp, char *str) |
288 | BIO *bp; | ||
289 | char *str; | ||
290 | { | 286 | { |
291 | int length; | 287 | int length; |
292 | if (str == NULL) return(0); | 288 | if (str == NULL) return(0); |