summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bio/bss_rtcp.c
diff options
context:
space:
mode:
authorbeck <>1999-09-29 04:37:45 +0000
committerbeck <>1999-09-29 04:37:45 +0000
commitde8f24ea083384bb66b32ec105dc4743c5663cdf (patch)
tree1412176ae62a3cab2cf2b0b92150fcbceaac6092 /src/lib/libcrypto/bio/bss_rtcp.c
parentcb929d29896bcb87c2a97417fbd03e50078fc178 (diff)
downloadopenbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.gz
openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.bz2
openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.zip
OpenSSL 0.9.4 merge
Diffstat (limited to 'src/lib/libcrypto/bio/bss_rtcp.c')
-rw-r--r--src/lib/libcrypto/bio/bss_rtcp.c56
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 */
71extern int SYS$QIOW(); 72#include <starlet.h>
73
72typedef unsigned short io_channel; 74typedef unsigned short io_channel;
73/*************************************************************************/ 75/*************************************************************************/
74struct io_status { short status, count; long flags; }; 76struct 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
110BIO_METHOD *BIO_s_rtcp() 112BIO_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
117static int get ( io_channel chan, char *buffer, int maxlen, int *length ) 125static 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
139static int rtcp_new(bi) 152static int rtcp_new(BIO *bi)
140BIO *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
153static int rtcp_free(a) 165static int rtcp_free(BIO *a)
154BIO *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
162static int rtcp_read(b,out,outl) 173static int rtcp_read(BIO *b, char *out, int outl)
163BIO *b;
164char *out;
165int 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
212static int rtcp_write(b,in,inl) 220static int rtcp_write(BIO *b, char *in, int inl)
213BIO *b;
214char *in;
215int 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
244static long rtcp_ctrl(b,cmd,num,ptr) 249static long rtcp_ctrl(BIO *b, int cmd, long num, char *ptr)
245BIO *b;
246int cmd;
247long num;
248char *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
279static int rtcp_gets(bp,buf,size) 280static int rtcp_gets(BIO *bp, char *buf, int size)
280BIO *bp;
281char *buf;
282int size;
283 { 281 {
284 return(0); 282 return(0);
285 } 283 }
286 284
287static int rtcp_puts(bp,str) 285static int rtcp_puts(BIO *bp, char *str)
288BIO *bp;
289char *str;
290{ 286{
291 int length; 287 int length;
292 if (str == NULL) return(0); 288 if (str == NULL) return(0);