1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
|
/***************************************
$Header: /home/amb/wwwoffle/RCS/proto.c 1.8 1998/06/08 17:53:03 amb Exp $
WWWOFFLE - World Wide Web Offline Explorer - Version 2.2.
Information about the protocols that wwwoffle supports.
******************/ /******************
Written by Andrew M. Bishop
This file Copyright 1997,98 Andrew M. Bishop
It may be distributed under the GNU Public License, version 2, or
any higher version. See section COPYING of the GNU Public license
for conditions under which this file may be redistributed.
***************************************/
#include <stdlib.h>
#include "misc.h"
#include "proto.h"
/* Allow this file to be compiled without including all of the protocol
specific functions in the files http.c, ftp.c, finger.c etc.
- Requires no Protocol entries to be defined. */
#ifdef NO_PROTOCOLS
/*+ The list of protocols. +*/
Protocol Protocols[1];
/*+ The number of protocols. +*/
int NProtocols=0;
#else /* NO_PROTOCOLS */
/*+ The list of protocols. +*/
Protocol Protocols[]={
{
Protocol_HTTP, /* number */
"http", /* name */
80, /* defport */
1, /* proxyable */
HTTP_Open, /* open */
HTTP_Request, /* request */
HTTP_ReadHead, /* readhead */
HTTP_ReadBody, /* readbody */
HTTP_Close /* close */
},
{
Protocol_FTP, /* number */
"ftp", /* name */
21, /* defport */
1, /* proxyable */
FTP_Open, /* open */
FTP_Request, /* request */
FTP_ReadHead, /* readhead */
FTP_ReadBody, /* readbody */
FTP_Close /* close */
},
{
Protocol_Finger, /* number */
"finger", /* name */
79, /* defport */
0, /* proxyable */
Finger_Open, /* open */
Finger_Request, /* request */
Finger_ReadHead, /* readhead */
Finger_ReadBody, /* readbody */
Finger_Close /* close */
}
};
/*+ The number of protocols. +*/
int NProtocols=sizeof(Protocols)/sizeof(Protocol);
#endif /* NO_PROTOCOLS */
|