imapext-2007

diff 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 diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/osdep/vms/tcp_vmsn.c	Mon Sep 14 15:17:45 2009 +0900
     1.3 @@ -0,0 +1,222 @@
     1.4 +/* ========================================================================
     1.5 + * Copyright 1988-2006 University of Washington
     1.6 + *
     1.7 + * Licensed under the Apache License, Version 2.0 (the "License");
     1.8 + * you may not use this file except in compliance with the License.
     1.9 + * You may obtain a copy of the License at
    1.10 + *
    1.11 + *     http://www.apache.org/licenses/LICENSE-2.0
    1.12 + *
    1.13 + * 
    1.14 + * ========================================================================
    1.15 + */
    1.16 +
    1.17 +/*
    1.18 + * Program:	Dummy VMS TCP/IP routines for non-TCP/IP systems
    1.19 + *
    1.20 + * Author:	Mark Crispin
    1.21 + *		Networks and Distributed Computing
    1.22 + *		Computing & Communications
    1.23 + *		University of Washington
    1.24 + *		Administration Building, AG-44
    1.25 + *		Seattle, WA  98195
    1.26 + *		Internet: MRC@CAC.Washington.EDU
    1.27 + *
    1.28 + * Date:	2 August 1994
    1.29 + * Last Edited:	30 August 2006
    1.30 + */
    1.31 + 
    1.32 +/* TCP/IP manipulate parameters
    1.33 + * Accepts: function code
    1.34 + *	    function-dependent value
    1.35 + * Returns: function-dependent return value
    1.36 + */
    1.37 +
    1.38 +void *tcp_parameters (long function,void *value)
    1.39 +{
    1.40 +  return NIL;
    1.41 +}
    1.42 +
    1.43 +
    1.44 +/* TCP/IP open
    1.45 + * Accepts: host name
    1.46 + *	    contact service name
    1.47 + *	    contact port number
    1.48 + * Returns: TCP/IP stream if success else NIL
    1.49 + */
    1.50 +
    1.51 +TCPSTREAM *tcp_open (char *host,char *service,unsigned long port)
    1.52 +{
    1.53 +  char tmp[MAILTMPLEN];
    1.54 +  port &= 0xffff;		/* erase flags */
    1.55 +  if (port) sprintf (tmp,"Can't connect to %.80s,%d: no TCP",host,port);
    1.56 +  else sprintf (tmp,"Can't connect to %.80s,%s: no TCP",host,service);
    1.57 +  mm_log (tmp,ERROR);
    1.58 +  return NIL;
    1.59 +}
    1.60 +
    1.61 +
    1.62 +/* TCP/IP authenticated open
    1.63 + * Accepts: NETMBX specifier
    1.64 + *	    service name
    1.65 + *	    returned user name buffer
    1.66 + * Returns: TCP/IP stream if success else NIL
    1.67 + */
    1.68 +
    1.69 +TCPSTREAM *tcp_aopen (NETMBX *mb,char *service,char *usrbuf)
    1.70 +{
    1.71 +  return NIL;
    1.72 +}
    1.73 +
    1.74 +/* TCP/IP receive line
    1.75 + * Accepts: TCP/IP stream
    1.76 + * Returns: text line string or NIL if failure
    1.77 + */
    1.78 +
    1.79 +char *tcp_getline (TCPSTREAM *stream)
    1.80 +{
    1.81 +  return NIL;
    1.82 +}
    1.83 +
    1.84 +
    1.85 +/* TCP/IP receive buffer
    1.86 + * Accepts: TCP/IP stream
    1.87 + *	    size in bytes
    1.88 + *	    buffer to read into
    1.89 + * Returns: T if success, NIL otherwise
    1.90 + */
    1.91 +
    1.92 +long tcp_getbuffer (TCPSTREAM *stream,unsigned long size,char *buffer)
    1.93 +{
    1.94 +  return NIL;
    1.95 +}
    1.96 +
    1.97 +
    1.98 +/* TCP/IP receive data
    1.99 + * Accepts: TCP/IP stream
   1.100 + * Returns: T if success, NIL otherwise
   1.101 + */
   1.102 +
   1.103 +long tcp_getdata (TCPSTREAM *stream)
   1.104 +{
   1.105 +  return NIL;
   1.106 +}
   1.107 +
   1.108 +/* TCP/IP send string as record
   1.109 + * Accepts: TCP/IP stream
   1.110 + *	    string pointer
   1.111 + * Returns: T if success else NIL
   1.112 + */
   1.113 +
   1.114 +long tcp_soutr (TCPSTREAM *stream,char *string)
   1.115 +{
   1.116 +  return NIL;
   1.117 +}
   1.118 +
   1.119 +
   1.120 +/* TCP/IP send string
   1.121 + * Accepts: TCP/IP stream
   1.122 + *	    string pointer
   1.123 + *	    byte count
   1.124 + * Returns: T if success else NIL
   1.125 + */
   1.126 +
   1.127 +long tcp_sout (TCPSTREAM *stream,char *string,unsigned long size)
   1.128 +{
   1.129 +  return NIL;
   1.130 +}
   1.131 +
   1.132 +
   1.133 +/* TCP/IP close
   1.134 + * Accepts: TCP/IP stream
   1.135 + */
   1.136 +
   1.137 +void tcp_close (TCPSTREAM *stream)
   1.138 +{
   1.139 +}
   1.140 +
   1.141 +
   1.142 +/* TCP/IP abort stream
   1.143 + * Accepts: TCP/IP stream
   1.144 + * Returns: NIL always
   1.145 + */
   1.146 +
   1.147 +long tcp_abort (TCPSTREAM *stream)
   1.148 +{
   1.149 +  return NIL;
   1.150 +}
   1.151 +
   1.152 +/* TCP/IP get host name
   1.153 + * Accepts: TCP/IP stream
   1.154 + * Returns: host name for this stream
   1.155 + */
   1.156 +
   1.157 +char *tcp_host (TCPSTREAM *stream)
   1.158 +{
   1.159 +  return NIL;
   1.160 +}
   1.161 +
   1.162 +
   1.163 +/* TCP/IP get remote host name
   1.164 + * Accepts: TCP/IP stream
   1.165 + * Returns: host name for this stream
   1.166 + */
   1.167 +
   1.168 +char *tcp_remotehost (TCPSTREAM *stream)
   1.169 +{
   1.170 +  return NIL;
   1.171 +}
   1.172 +
   1.173 +
   1.174 +/* TCP/IP get local host name
   1.175 + * Accepts: TCP/IP stream
   1.176 + * Returns: local host name
   1.177 + */
   1.178 +
   1.179 +char *tcp_localhost (TCPSTREAM *stream)
   1.180 +{
   1.181 +  return NIL;
   1.182 +}
   1.183 +
   1.184 +
   1.185 +/* TCP/IP return port for this stream
   1.186 + * Accepts: TCP/IP stream
   1.187 + * Returns: port number for this stream
   1.188 + */
   1.189 +
   1.190 +unsigned long tcp_port (TCPSTREAM *stream)
   1.191 +{
   1.192 +  return 0xffffffff;		/* return port number */
   1.193 +}
   1.194 +
   1.195 +
   1.196 +/* Return my local host name
   1.197 + * Returns: my local host name
   1.198 + */
   1.199 +
   1.200 +char *mylocalhost ()
   1.201 +{
   1.202 +				/* have local host yet? */
   1.203 +  if (!myLocalHost) myLocalHost = cpystr (getenv ("SYS$NODE"));
   1.204 +  return myLocalHost;
   1.205 +}
   1.206 +
   1.207 +/* TCP/IP return canonical form of host name
   1.208 + * Accepts: host name
   1.209 + * Returns: canonical form of host name
   1.210 + */
   1.211 +
   1.212 +char *tcp_canonical (char *name)
   1.213 +{
   1.214 +  return name;
   1.215 +}
   1.216 +
   1.217 +
   1.218 +/* TCP/IP get client host name (server calls only)
   1.219 + * Returns: client host name
   1.220 + */
   1.221 +
   1.222 +char *tcp_clienthost ()
   1.223 +{
   1.224 +  return "UNKNOWN";
   1.225 +}

UW-IMAP'd extensions by yuuji