"Fossies" - the Fresh Open Source Software Archive 
Member "tin-2.6.2/include/tnntp.h" (9 Dec 2022, 3894 Bytes) of package /linux/misc/tin-2.6.2.tar.xz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "tnntp.h" see the
Fossies "Dox" file reference documentation and the latest
Fossies "Diffs" side-by-side code changes report:
2.6.1_vs_2.6.2.
1 /*
2 * Project : tin - a Usenet reader
3 * Module : tnntp.h
4 * Author : Thomas Dickey <dickey@invisible-island.net>
5 * Created : 1997-03-05
6 * Updated : 2022-09-19
7 * Notes : #include files, #defines & struct's
8 *
9 * Copyright (c) 1997-2023 Thomas Dickey <dickey@invisible-island.net>
10 * All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 *
16 * 1. Redistributions of source code must retain the above copyright notice,
17 * this list of conditions and the following disclaimer.
18 *
19 * 2. Redistributions in binary form must reproduce the above copyright
20 * notice, this list of conditions and the following disclaimer in the
21 * documentation and/or other materials provided with the distribution.
22 *
23 * 3. Neither the name of the copyright holder nor the names of its
24 * contributors may be used to endorse or promote products derived from
25 * this software without specific prior written permission.
26 *
27 * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
28 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
31 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
35 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37 * POSSIBILITY OF SUCH DAMAGE.
38 */
39
40
41 #ifndef TNNTP_H
42 #define TNNTP_H 1
43
44 #if defined(NNTP_ABLE) || defined(HAVE_GETHOSTBYNAME)
45 # ifdef HAVE_NETDB_H
46 # include <netdb.h>
47 # endif /* HAVE_NETDB_H */
48 # define IPPORT_NNTP ((unsigned short) 119)
49 # define IPPORT_NNTPS ((unsigned short) 563)
50 # ifdef TLI
51 # ifdef HAVE_FCNTL_H
52 # include <fcntl.h>
53 # endif /* HAVE_FCNTL_H */
54 # include <tiuser.h>
55 # ifdef HAVE_STROPTS_H
56 # include <stropts.h>
57 # endif /* HAVE_STROPTS_H */
58 # ifdef HAVE_SYS_SOCKET_H
59 # include <sys/socket.h>
60 # else
61 # ifdef HAVE_SOCKET_H
62 # include <socket.h>
63 # endif /* HAVE_SOCKET_H */
64 # endif /* HAVE_SYS_SOCKET_H */
65 # ifdef HAVE_NETINET_IN_H
66 # include <netinet/in.h>
67 # endif /* HAVE_NETINET_IN_H */
68 # else
69 # ifdef HAVE_SYS_SOCKET_H
70 # include <sys/socket.h>
71 # else
72 # ifdef HAVE_SOCKET_H
73 # include <socket.h>
74 # endif /* HAVE_SOCKET_H */
75 # endif /* HAVE_SYS_SOCKET_H */
76 # ifdef HAVE_NETINET_IN_H
77 # include <netinet/in.h>
78 # endif /* HAVE_NETINET_IN_H */
79 # ifdef HAVE_NETLIB_H
80 # include <netlib.h>
81 # endif /* HAVE_NETLIB_H */
82 # ifdef HAVE_ARPA_INET_H
83 # include <arpa/inet.h>
84 # endif /* HAVE_ARPA_INET_H */
85 # endif /* TLI */
86
87 # ifdef EXCELAN
88 extern int connect (int, struct sockaddr *);
89 extern unsigned short htons (unsigned short);
90 extern unsigned long rhost (char **);
91 extern int rresvport (int);
92 extern int socket (int, struct sockproto *, struct sockaddr_in *, int);
93 # endif /* EXCELAN */
94
95 # ifdef DECNET
96 # include <netdnet/dn.h>
97 # include <netdnet/dnetdb.h>
98 # endif /* DECNET */
99
100 #endif /* NNTP_ABLE || HAVE_GETHOSTBYNAME */
101
102 #if defined(HOST_NAME_MAX) && !defined(MAXHOSTNAMELEN)
103 # define MAXHOSTNAMELEN HOST_NAME_MAX
104 #endif /* HOST_NAME_MAX && !MAXHOSTNAMELEN */
105 #ifndef MAXHOSTNAMELEN
106 # define MAXHOSTNAMELEN 255
107 #endif /* !MAXHOSTNAMELEN */
108
109 #ifndef SOCKS
110 # ifdef DECL_CONNECT
111 extern int connect(int sockfd, struct sockaddr *serv_addr, int addrlen);
112 # endif /* DECL_CONNECT */
113 #endif /* !SOCKS */
114
115 #ifdef DECL_INET_NTOA
116 extern char *inet_ntoa (struct in_addr);
117 #endif /* DECL_INET_NTOA */
118
119 #endif /* TNNTP_H */