imapext-2007

view src/osdep/vms/tcp_vmsn.c @ 0:ada5e610ab86

imap-2007e
author yuuji@gentei.org
date Mon, 14 Sep 2009 15:17:45 +0900
parents
children
line source
1 /* ========================================================================
2 * Copyright 1988-2006 University of Washington
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 *
11 * ========================================================================
12 */
14 /*
15 * Program: Dummy VMS TCP/IP routines for non-TCP/IP systems
16 *
17 * Author: Mark Crispin
18 * Networks and Distributed Computing
19 * Computing & Communications
20 * University of Washington
21 * Administration Building, AG-44
22 * Seattle, WA 98195
23 * Internet: MRC@CAC.Washington.EDU
24 *
25 * Date: 2 August 1994
26 * Last Edited: 30 August 2006
27 */
29 /* TCP/IP manipulate parameters
30 * Accepts: function code
31 * function-dependent value
32 * Returns: function-dependent return value
33 */
35 void *tcp_parameters (long function,void *value)
36 {
37 return NIL;
38 }
41 /* TCP/IP open
42 * Accepts: host name
43 * contact service name
44 * contact port number
45 * Returns: TCP/IP stream if success else NIL
46 */
48 TCPSTREAM *tcp_open (char *host,char *service,unsigned long port)
49 {
50 char tmp[MAILTMPLEN];
51 port &= 0xffff; /* erase flags */
52 if (port) sprintf (tmp,"Can't connect to %.80s,%d: no TCP",host,port);
53 else sprintf (tmp,"Can't connect to %.80s,%s: no TCP",host,service);
54 mm_log (tmp,ERROR);
55 return NIL;
56 }
59 /* TCP/IP authenticated open
60 * Accepts: NETMBX specifier
61 * service name
62 * returned user name buffer
63 * Returns: TCP/IP stream if success else NIL
64 */
66 TCPSTREAM *tcp_aopen (NETMBX *mb,char *service,char *usrbuf)
67 {
68 return NIL;
69 }
71 /* TCP/IP receive line
72 * Accepts: TCP/IP stream
73 * Returns: text line string or NIL if failure
74 */
76 char *tcp_getline (TCPSTREAM *stream)
77 {
78 return NIL;
79 }
82 /* TCP/IP receive buffer
83 * Accepts: TCP/IP stream
84 * size in bytes
85 * buffer to read into
86 * Returns: T if success, NIL otherwise
87 */
89 long tcp_getbuffer (TCPSTREAM *stream,unsigned long size,char *buffer)
90 {
91 return NIL;
92 }
95 /* TCP/IP receive data
96 * Accepts: TCP/IP stream
97 * Returns: T if success, NIL otherwise
98 */
100 long tcp_getdata (TCPSTREAM *stream)
101 {
102 return NIL;
103 }
105 /* TCP/IP send string as record
106 * Accepts: TCP/IP stream
107 * string pointer
108 * Returns: T if success else NIL
109 */
111 long tcp_soutr (TCPSTREAM *stream,char *string)
112 {
113 return NIL;
114 }
117 /* TCP/IP send string
118 * Accepts: TCP/IP stream
119 * string pointer
120 * byte count
121 * Returns: T if success else NIL
122 */
124 long tcp_sout (TCPSTREAM *stream,char *string,unsigned long size)
125 {
126 return NIL;
127 }
130 /* TCP/IP close
131 * Accepts: TCP/IP stream
132 */
134 void tcp_close (TCPSTREAM *stream)
135 {
136 }
139 /* TCP/IP abort stream
140 * Accepts: TCP/IP stream
141 * Returns: NIL always
142 */
144 long tcp_abort (TCPSTREAM *stream)
145 {
146 return NIL;
147 }
149 /* TCP/IP get host name
150 * Accepts: TCP/IP stream
151 * Returns: host name for this stream
152 */
154 char *tcp_host (TCPSTREAM *stream)
155 {
156 return NIL;
157 }
160 /* TCP/IP get remote host name
161 * Accepts: TCP/IP stream
162 * Returns: host name for this stream
163 */
165 char *tcp_remotehost (TCPSTREAM *stream)
166 {
167 return NIL;
168 }
171 /* TCP/IP get local host name
172 * Accepts: TCP/IP stream
173 * Returns: local host name
174 */
176 char *tcp_localhost (TCPSTREAM *stream)
177 {
178 return NIL;
179 }
182 /* TCP/IP return port for this stream
183 * Accepts: TCP/IP stream
184 * Returns: port number for this stream
185 */
187 unsigned long tcp_port (TCPSTREAM *stream)
188 {
189 return 0xffffffff; /* return port number */
190 }
193 /* Return my local host name
194 * Returns: my local host name
195 */
197 char *mylocalhost ()
198 {
199 /* have local host yet? */
200 if (!myLocalHost) myLocalHost = cpystr (getenv ("SYS$NODE"));
201 return myLocalHost;
202 }
204 /* TCP/IP return canonical form of host name
205 * Accepts: host name
206 * Returns: canonical form of host name
207 */
209 char *tcp_canonical (char *name)
210 {
211 return name;
212 }
215 /* TCP/IP get client host name (server calls only)
216 * Returns: client host name
217 */
219 char *tcp_clienthost ()
220 {
221 return "UNKNOWN";
222 }

UW-IMAP'd extensions by yuuji