annotate src/c-client/tcp.h @ 0:ada5e610ab86

imap-2007e
author yuuji@gentei.org
date Mon, 14 Sep 2009 15:17:45 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
1 /* ========================================================================
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
2 * Copyright 1988-2007 University of Washington
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
3 *
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
4 * Licensed under the Apache License, Version 2.0 (the "License");
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
5 * you may not use this file except in compliance with the License.
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
6 * You may obtain a copy of the License at
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
7 *
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
8 * http://www.apache.org/licenses/LICENSE-2.0
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
9 *
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
10 *
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
11 * ========================================================================
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
12 */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
13
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
14 /*
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
15 * Program: TCP/IP routines
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
16 *
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
17 * Author: Mark Crispin
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
18 * Networks and Distributed Computing
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
19 * Computing & Communications
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
20 * University of Washington
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
21 * Administration Building, AG-44
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
22 * Seattle, WA 98195
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
23 * Internet: MRC@CAC.Washington.EDU
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
24 *
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
25 * Date: 1 August 1988
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
26 * Last Edited: 31 January 2007
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
27 */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
28
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
29
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
30 /* Dummy definition overridden by TCP routines */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
31
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
32 #ifndef TCPSTREAM
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
33 #define TCPSTREAM void
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
34 #endif
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
35
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
36
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
37 /* Function prototypes */
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
38
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
39 void *tcp_parameters (long function,void *value);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
40 TCPSTREAM *tcp_open (char *host,char *service,unsigned long port);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
41 TCPSTREAM *tcp_aopen (NETMBX *mb,char *service,char *usrbuf);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
42 char *tcp_getline (TCPSTREAM *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
43 long tcp_getbuffer (TCPSTREAM *stream,unsigned long size,char *buffer);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
44 long tcp_getdata (TCPSTREAM *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
45 long tcp_soutr (TCPSTREAM *stream,char *string);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
46 long tcp_sout (TCPSTREAM *stream,char *string,unsigned long size);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
47 void tcp_close (TCPSTREAM *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
48 char *tcp_host (TCPSTREAM *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
49 char *tcp_remotehost (TCPSTREAM *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
50 unsigned long tcp_port (TCPSTREAM *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
51 char *tcp_localhost (TCPSTREAM *stream);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
52 char *tcp_clientaddr (void);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
53 char *tcp_clienthost (void);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
54 long tcp_clientport (void);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
55 char *tcp_serveraddr (void);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
56 char *tcp_serverhost (void);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
57 long tcp_serverport (void);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
58 char *tcp_canonical (char *name);
ada5e610ab86 imap-2007e
yuuji@gentei.org
parents:
diff changeset
59 long tcp_isclienthost (char *host);

yatex.org