Install Perl 5.8.8
[msysgit.git] / mingw / html / lib / Net / Config.html
blob8f5f5286f7811189f3e3a22fc20f4cf61069c7f9
1 <?xml version="1.0" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <title>Net::Config - Local configuration data for libnet</title>
6 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7 <link rev="made" href="mailto:" />
8 </head>
10 <body style="background-color: white">
11 <table border="0" width="100%" cellspacing="0" cellpadding="3">
12 <tr><td class="block" style="background-color: #cccccc" valign="middle">
13 <big><strong><span class="block">&nbsp;Net::Config - Local configuration data for libnet</span></strong></big>
14 </td></tr>
15 </table>
17 <p><a name="__index__"></a></p>
18 <!-- INDEX BEGIN -->
20 <ul>
22 <li><a href="#name">NAME</a></li>
23 <li><a href="#synopsys">SYNOPSYS</a></li>
24 <li><a href="#description">DESCRIPTION</a></li>
25 <li><a href="#methods">METHODS</a></li>
26 <li><a href="#netconfig_values">NetConfig VALUES</a></li>
27 </ul>
28 <!-- INDEX END -->
30 <hr />
31 <p>
32 </p>
33 <h1><a name="name">NAME</a></h1>
34 <p>Net::Config - Local configuration data for libnet</p>
35 <p>
36 </p>
37 <hr />
38 <h1><a name="synopsys">SYNOPSYS</a></h1>
39 <pre>
40 use Net::Config qw(%NetConfig);</pre>
41 <p>
42 </p>
43 <hr />
44 <h1><a name="description">DESCRIPTION</a></h1>
45 <p><code>Net::Config</code> holds configuration data for the modules in the libnet
46 distribuion. During installation you will be asked for these values.</p>
47 <p>The configuration data is held globally in a file in the perl installation
48 tree, but a user may override any of these values by providing their own. This
49 can be done by having a <code>.libnetrc</code> file in their home directory. This file
50 should return a reference to a HASH containing the keys described below.
51 For example</p>
52 <pre>
53 # .libnetrc
55 nntp_hosts =&gt; [ &quot;my_prefered_host&quot; ],
56 ph_hosts =&gt; [ &quot;my_ph_server&quot; ],
58 __END__</pre>
59 <p>
60 </p>
61 <hr />
62 <h1><a name="methods">METHODS</a></h1>
63 <p><code>Net::Config</code> defines the following methods. They are methods as they are
64 invoked as class methods. This is because <code>Net::Config</code> inherits from
65 <code>Net::LocalCfg</code> so you can override these methods if you want.</p>
66 <dl>
67 <dt><strong><a name="item_requires_firewall">requires_firewall HOST</a></strong>
69 <dd>
70 <p>Attempts to determine if a given host is outside your firewall. Possible
71 return values are.</p>
72 </dd>
73 <dd>
74 <pre>
75 -1 Cannot lookup hostname
76 0 Host is inside firewall (or there is no ftp_firewall entry)
77 1 Host is outside the firewall</pre>
78 </dd>
79 <dd>
80 <p>This is done by using hostname lookup and the <a href="#item_local_netmask"><code>local_netmask</code></a> entry in
81 the configuration data.</p>
82 </dd>
83 </li>
84 </dl>
85 <p>
86 </p>
87 <hr />
88 <h1><a name="netconfig_values">NetConfig VALUES</a></h1>
89 <dl>
90 <dt><strong><a name="item_nntp_hosts">nntp_hosts</a></strong>
92 <dt><strong><a name="item_snpp_hosts">snpp_hosts</a></strong>
94 <dt><strong><a name="item_pop3_hosts">pop3_hosts</a></strong>
96 <dt><strong><a name="item_smtp_hosts">smtp_hosts</a></strong>
98 <dt><strong><a name="item_ph_hosts">ph_hosts</a></strong>
100 <dt><strong><a name="item_daytime_hosts">daytime_hosts</a></strong>
102 <dt><strong><a name="item_time_hosts">time_hosts</a></strong>
104 <dd>
105 <p>Each is a reference to an array of hostnames (in order of preference),
106 which should be used for the given protocol</p>
107 </dd>
108 </li>
109 <dt><strong><a name="item_inet_domain">inet_domain</a></strong>
111 <dd>
112 <p>Your internet domain name</p>
113 </dd>
114 </li>
115 <dt><strong><a name="item_ftp_firewall">ftp_firewall</a></strong>
117 <dd>
118 <p>If you have an FTP proxy firewall (<strong>NOT</strong> an HTTP or SOCKS firewall)
119 then this value should be set to the firewall hostname. If your firewall
120 does not listen to port 21, then this value should be set to
121 <code>&quot;hostname:port&quot;</code> (eg <code>&quot;hostname:99&quot;</code>)</p>
122 </dd>
123 </li>
124 <dt><strong><a name="item_ftp_firewall_type">ftp_firewall_type</a></strong>
126 <dd>
127 <p>There are many different ftp firewall products available. But unfortunately
128 there is no standard for how to traverse a firewall. The list below shows the
129 sequence of commands that Net::FTP will use</p>
130 </dd>
131 <dd>
132 <pre>
133 user Username for remote host
134 pass Password for remote host
135 fwuser Username for firewall
136 fwpass Password for firewall
137 remote.host The hostname of the remote ftp server</pre>
138 </dd>
139 <ol>
140 <li>
141 <p>There is no firewall</p>
142 </li>
143 <li>
144 <pre>
145 USER user@remote.host
146 PASS pass</pre>
147 <li>
148 <pre>
149 USER fwuser
150 PASS fwpass
151 USER user@remote.host
152 PASS pass</pre>
153 <li>
154 <pre>
155 USER fwuser
156 PASS fwpass
157 SITE remote.site
158 USER user
159 PASS pass</pre>
160 <li>
161 <pre>
162 USER fwuser
163 PASS fwpass
164 OPEN remote.site
165 USER user
166 PASS pass</pre>
167 <li>
168 <pre>
169 USER user@fwuser@remote.site
170 PASS pass@fwpass</pre>
171 <li>
172 <pre>
173 USER fwuser@remote.site
174 PASS fwpass
175 USER user
176 PASS pass</pre>
177 <li>
178 <pre>
179 USER user@remote.host
180 PASS pass
181 AUTH fwuser
182 RESP fwpass</pre>
183 </ol>
184 <dt><strong><a name="item_ftp_ext_passive">ftp_ext_passive</a></strong>
186 <dt><strong><a name="item_ftp_int_pasive">ftp_int_pasive</a></strong>
188 <dd>
189 <p>FTP servers normally work on a non-passive mode. That is when you want to
190 transfer data you have to tell the server the address and port to
191 connect to.</p>
192 </dd>
193 <dd>
194 <p>With some firewalls this does not work as the server cannot
195 connect to your machine (because you are behind a firewall) and the firewall
196 does not re-write the command. In this case you should set <a href="#item_ftp_ext_passive"><code>ftp_ext_passive</code></a>
197 to a <em>true</em> value.</p>
198 </dd>
199 <dd>
200 <p>Some servers are configured to only work in passive mode. If you have
201 one of these you can force <code>Net::FTP</code> to always transfer in passive
202 mode; when not going via a firewall, by setting <code>ftp_int_passive</code> to
203 a <em>true</em> value.</p>
204 </dd>
205 </li>
206 <dt><strong><a name="item_local_netmask">local_netmask</a></strong>
208 <dd>
209 <p>A reference to a list of netmask strings in the form <code>&quot;134.99.4.0/24&quot;</code>.
210 These are used by the <a href="#item_requires_firewall"><code>requires_firewall</code></a> function to determine if a given
211 host is inside or outside your firewall.</p>
212 </dd>
213 </li>
214 </dl>
215 <p>The following entries are used during installation &amp; testing on the
216 libnet package</p>
217 <dl>
218 <dt><strong><a name="item_test_hosts">test_hosts</a></strong>
220 <dd>
221 <p>If true then <code>make test</code> may attempt to connect to hosts given in the
222 configuration.</p>
223 </dd>
224 </li>
225 <dt><strong><a name="item_test_exists">test_exists</a></strong>
227 <dd>
228 <p>If true then <code>Configure</code> will check each hostname given that it exists</p>
229 </dd>
230 </li>
231 </dl>
232 <hr><p><em>$Id: //depot/libnet/Net/Config.pm#17 $</em></p>
233 <table border="0" width="100%" cellspacing="0" cellpadding="3">
234 <tr><td class="block" style="background-color: #cccccc" valign="middle">
235 <big><strong><span class="block">&nbsp;Net::Config - Local configuration data for libnet</span></strong></big>
236 </td></tr>
237 </table>
239 </body>
241 </html>