1Net::Config(3pm)       Perl Programmers Reference Guide       Net::Config(3pm)
2
3
4

NAME

6       Net::Config - Local configuration data for libnet
7

SYNOPSYS

9           use Net::Config qw(%NetConfig);
10

DESCRIPTION

12       "Net::Config" holds configuration data for the modules in the libnet
13       distribuion. During installation you will be asked for these values.
14
15       The configuration data is held globally in a file in the perl installa‐
16       tion tree, but a user may override any of these values by providing
17       their own. This can be done by having a ".libnetrc" file in their home
18       directory. This file should return a reference to a HASH containing the
19       keys described below.  For example
20
21           # .libnetrc
22           {
23               nntp_hosts => [ "my_prefered_host" ],
24               ph_hosts   => [ "my_ph_server" ],
25           }
26           __END__
27

METHODS

29       "Net::Config" defines the following methods. They are methods as they
30       are invoked as class methods. This is because "Net::Config" inherits
31       from "Net::LocalCfg" so you can override these methods if you want.
32
33       requires_firewall HOST
34           Attempts to determine if a given host is outside your firewall.
35           Possible return values are.
36
37             -1  Cannot lookup hostname
38              0  Host is inside firewall (or there is no ftp_firewall entry)
39              1  Host is outside the firewall
40
41           This is done by using hostname lookup and the "local_netmask" entry
42           in the configuration data.
43

NetConfig VALUES

45       nntp_hosts
46       snpp_hosts
47       pop3_hosts
48       smtp_hosts
49       ph_hosts
50       daytime_hosts
51       time_hosts
52           Each is a reference to an array of hostnames (in order of prefer‐
53           ence), which should be used for the given protocol
54
55       inet_domain
56           Your internet domain name
57
58       ftp_firewall
59           If you have an FTP proxy firewall (NOT an HTTP or SOCKS firewall)
60           then this value should be set to the firewall hostname. If your
61           firewall does not listen to port 21, then this value should be set
62           to "hostname:port" (eg "hostname:99")
63
64       ftp_firewall_type
65           There are many different ftp firewall products available. But
66           unfortunately there is no standard for how to traverse a firewall.
67           The list below shows the sequence of commands that Net::FTP will
68           use
69
70             user        Username for remote host
71             pass        Password for remote host
72             fwuser      Username for firewall
73             fwpass      Password for firewall
74             remote.host The hostname of the remote ftp server
75
76           0   There is no firewall
77
78           1
79                    USER user@remote.host
80                    PASS pass
81
82           2
83                    USER fwuser
84                    PASS fwpass
85                    USER user@remote.host
86                    PASS pass
87
88           3
89                    USER fwuser
90                    PASS fwpass
91                    SITE remote.site
92                    USER user
93                    PASS pass
94
95           4
96                    USER fwuser
97                    PASS fwpass
98                    OPEN remote.site
99                    USER user
100                    PASS pass
101
102           5
103                    USER user@fwuser@remote.site
104                    PASS pass@fwpass
105
106           6
107                    USER fwuser@remote.site
108                    PASS fwpass
109                    USER user
110                    PASS pass
111
112           7
113                    USER user@remote.host
114                    PASS pass
115                    AUTH fwuser
116                    RESP fwpass
117
118       ftp_ext_passive
119       ftp_int_pasive
120           FTP servers normally work on a non-passive mode. That is when you
121           want to transfer data you have to tell the server the address and
122           port to connect to.
123
124           With some firewalls this does not work as the server cannot connect
125           to your machine (because you are behind a firewall) and the fire‐
126           wall does not re-write the command. In this case you should set
127           "ftp_ext_passive" to a true value.
128
129           Some servers are configured to only work in passive mode. If you
130           have one of these you can force "Net::FTP" to always transfer in
131           passive mode; when not going via a firewall, by setting
132           "ftp_int_passive" to a true value.
133
134       local_netmask
135           A reference to a list of netmask strings in the form
136           "134.99.4.0/24".  These are used by the "requires_firewall" func‐
137           tion to determine if a given host is inside or outside your fire‐
138           wall.
139
140       The following entries are used during installation & testing on the
141       libnet package
142
143       test_hosts
144           If true then "make test" may attempt to connect to hosts given in
145           the configuration.
146
147       test_exists
148           If true then "Configure" will check each hostname given that it
149           exists
150
151       $Id: //depot/libnet/Net/Config.pm#17 $
152
153
154
155perl v5.8.8                       2001-09-21                  Net::Config(3pm)
Impressum