Annotation of libwww/Library/src/HTTCP.html, revision 2.5

2.2       timbl       1: <HEADER>
                      2: <TITLE>/Net/dxcern/userd/timbl/hypertext/WWW/Library/src/HTTCP.html</TITLE></HEADER>
                      3: <BODY>
                      4: <H1>Generic TCP/IP Communication</H1>This module has the common code for
                      5: handling TCP/IP connections etc.
                      6: <PRE>#ifndef HTTCP_H
                      7: #define HTTCP_H
                      8: 
                      9: #include "HTUtils.h"
                     10: 
2.1       timbl      11: #include "tcp.h"
                     12: 
                     13: #ifdef SHORT_NAMES
                     14: #define HTInetStatus           HTInStat
                     15: #define HTInetString           HTInStri
                     16: #define HTParseInet            HTPaInet
                     17: #endif
                     18: 
                     19: 
                     20: /*     Produce a string for an internet address
                     21: **     ---------------------------------------
                     22: **
                     23: ** On exit:
                     24: **          returns a pointer to a static string which must be copied if
                     25: **               it is to be kept.
                     26: */
                     27: #ifdef __STDC__
                     28:        extern const char * HTInetString(struct sockaddr_in* sin);
                     29: #else
                     30:        extern char * HTInetString();
                     31: #endif
                     32: 
                     33: 
                     34: /*     Encode INET status (as in sys/errno.h)                    inet_status()
                     35: **     ------------------
                     36: **
                     37: ** On entry:
                     38: **             where gives a description of what caused the error
                     39: **     global errno gives the error number in the unix way.
                     40: **
                     41: ** On return:
                     42: **     returns a negative status in the unix way.
                     43: */
                     44: #ifdef __STDC__
                     45:        extern int HTInetStatus(char *where);
                     46: #else
                     47:        extern int HTInetStatus();
                     48: #endif
                     49: 
                     50: /*     Publicly accessible variables
                     51: */
                     52: /* extern struct sockaddr_in HTHostAddress; */
                     53:                        /* The internet address of the host */
                     54:                        /* Valid after call to HTHostName() */
                     55: 
                     56: 
                     57: /*     Parse a cardinal value                                 parse_cardinal()
                     58: **     ----------------------
                     59: **
                     60: ** On entry:
                     61: **     *pp points to first character to be interpreted, terminated by
                     62: **     non 0..9 character.
                     63: **     *pstatus points to status already valid,
                     64: **     maxvalue gives the largest allowable value.
                     65: **
                     66: ** On exit:
                     67: **     *pp points to first unread character,
                     68: **     *pstatus points to status updated iff bad
                     69: */
2.2       timbl      70: 
                     71: extern unsigned int HTCardinal PARAMS((int *pstatus,
                     72:                char            **pp,
                     73:                unsigned int    max_value));
                     74: 
2.1       timbl      75: 
                     76: /*     Parse an internet node address and port
                     77: **     ---------------------------------------
                     78: **
                     79: ** On entry:
                     80: **              str points to a string with a node name or number,
                     81: **              with optional trailing colon and port number.
                     82: **              sin points to the binary internet or decnet address field.
                     83: **
                     84: ** On exit:
                     85: **              *sin is filled in. If no port is specified in str, that
                     86: **              field is left unchanged in *sin.
                     87: */
                     88: #ifdef __STDC__
                     89:        extern int HTParseInet(struct sockaddr_in * sin, CONST char * str);
                     90:        /*!! had to change this to get it to compile. CTB */
                     91: #else
                     92:        extern int HTParseInet();
                     93: #endif
                     94: 
                     95: /*     Get Name of This Machine
                     96: **     ------------------------
                     97: **
                     98: */
2.2       timbl      99: 
                    100: extern CONST char * HTHostName NOPARAMS;
                    101: 
                    102: #endif   /* HTTCP_H */
                    103: </PRE>End.</BODY>

Webmaster