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">
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:" />
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"> Net::Config - Local configuration data for libnet
</span></strong></big>
17 <p><a name=
"__index__"></a></p>
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>
33 <h1><a name=
"name">NAME
</a></h1>
34 <p>Net::Config - Local configuration data for libnet
</p>
38 <h1><a name=
"synopsys">SYNOPSYS
</a></h1>
40 use Net::Config qw(%NetConfig);
</pre>
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.
55 nntp_hosts =
> [
"my_prefered_host
" ],
56 ph_hosts =
> [
"my_ph_server
" ],
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>
67 <dt><strong><a name=
"item_requires_firewall">requires_firewall HOST
</a></strong>
70 <p>Attempts to determine if a given host is outside your firewall. Possible
71 return values are.
</p>
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>
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>
88 <h1><a name=
"netconfig_values">NetConfig VALUES
</a></h1>
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>
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>
109 <dt><strong><a name=
"item_inet_domain">inet_domain
</a></strong>
112 <p>Your internet domain name
</p>
115 <dt><strong><a name=
"item_ftp_firewall">ftp_firewall
</a></strong>
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>"hostname:port
"</code> (eg
<code>"hostname:
99"</code>)
</p>
124 <dt><strong><a name=
"item_ftp_firewall_type">ftp_firewall_type
</a></strong>
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>
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>
141 <p>There is no firewall
</p>
145 USER user@remote.host
151 USER user@remote.host
169 USER user@fwuser@remote.site
170 PASS pass@fwpass
</pre>
173 USER fwuser@remote.site
179 USER user@remote.host
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>
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
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>
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>
206 <dt><strong><a name=
"item_local_netmask">local_netmask
</a></strong>
209 <p>A reference to a list of netmask strings in the form
<code>"134.99.4.0/
24"</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>
215 <p>The following entries are used during installation
& testing on the
218 <dt><strong><a name=
"item_test_hosts">test_hosts
</a></strong>
221 <p>If true then
<code>make test
</code> may attempt to connect to hosts given in the
225 <dt><strong><a name=
"item_test_exists">test_exists
</a></strong>
228 <p>If true then
<code>Configure
</code> will check each hostname given that it exists
</p>
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"> Net::Config - Local configuration data for libnet
</span></strong></big>