| 1 | .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 |
| 2 | .\" |
| 3 | .\" Standard preamble: |
| 4 | .\" ======================================================================== |
| 5 | .de Sh \" Subsection heading |
| 6 | .br |
| 7 | .if t .Sp |
| 8 | .ne 5 |
| 9 | .PP |
| 10 | \fB\\$1\fR |
| 11 | .PP |
| 12 | .. |
| 13 | .de Sp \" Vertical space (when we can't use .PP) |
| 14 | .if t .sp .5v |
| 15 | .if n .sp |
| 16 | .. |
| 17 | .de Vb \" Begin verbatim text |
| 18 | .ft CW |
| 19 | .nf |
| 20 | .ne \\$1 |
| 21 | .. |
| 22 | .de Ve \" End verbatim text |
| 23 | .ft R |
| 24 | .fi |
| 25 | .. |
| 26 | .\" Set up some character translations and predefined strings. \*(-- will |
| 27 | .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left |
| 28 | .\" double quote, and \*(R" will give a right double quote. | will give a |
| 29 | .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to |
| 30 | .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' |
| 31 | .\" expand to `' in nroff, nothing in troff, for use with C<>. |
| 32 | .tr \(*W-|\(bv\*(Tr |
| 33 | .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' |
| 34 | .ie n \{\ |
| 35 | . ds -- \(*W- |
| 36 | . ds PI pi |
| 37 | . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch |
| 38 | . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch |
| 39 | . ds L" "" |
| 40 | . ds R" "" |
| 41 | . ds C` "" |
| 42 | . ds C' "" |
| 43 | 'br\} |
| 44 | .el\{\ |
| 45 | . ds -- \|\(em\| |
| 46 | . ds PI \(*p |
| 47 | . ds L" `` |
| 48 | . ds R" '' |
| 49 | 'br\} |
| 50 | .\" |
| 51 | .\" If the F register is turned on, we'll generate index entries on stderr for |
| 52 | .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index |
| 53 | .\" entries marked with X<> in POD. Of course, you'll have to process the |
| 54 | .\" output yourself in some meaningful fashion. |
| 55 | .if \nF \{\ |
| 56 | . de IX |
| 57 | . tm Index:\\$1\t\\n%\t"\\$2" |
| 58 | .. |
| 59 | . nr % 0 |
| 60 | . rr F |
| 61 | .\} |
| 62 | .\" |
| 63 | .\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 64 | .\" way too many mistakes in technical documents. |
| 65 | .hy 0 |
| 66 | .if n .na |
| 67 | .\" |
| 68 | .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). |
| 69 | .\" Fear. Run. Save yourself. No user-serviceable parts. |
| 70 | . \" fudge factors for nroff and troff |
| 71 | .if n \{\ |
| 72 | . ds #H 0 |
| 73 | . ds #V .8m |
| 74 | . ds #F .3m |
| 75 | . ds #[ \f1 |
| 76 | . ds #] \fP |
| 77 | .\} |
| 78 | .if t \{\ |
| 79 | . ds #H ((1u-(\\\\n(.fu%2u))*.13m) |
| 80 | . ds #V .6m |
| 81 | . ds #F 0 |
| 82 | . ds #[ \& |
| 83 | . ds #] \& |
| 84 | .\} |
| 85 | . \" simple accents for nroff and troff |
| 86 | .if n \{\ |
| 87 | . ds ' \& |
| 88 | . ds ` \& |
| 89 | . ds ^ \& |
| 90 | . ds , \& |
| 91 | . ds ~ ~ |
| 92 | . ds / |
| 93 | .\} |
| 94 | .if t \{\ |
| 95 | . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" |
| 96 | . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' |
| 97 | . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' |
| 98 | . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' |
| 99 | . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' |
| 100 | . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' |
| 101 | .\} |
| 102 | . \" troff and (daisy-wheel) nroff accents |
| 103 | .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' |
| 104 | .ds 8 \h'\*(#H'\(*b\h'-\*(#H' |
| 105 | .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] |
| 106 | .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' |
| 107 | .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' |
| 108 | .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] |
| 109 | .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] |
| 110 | .ds ae a\h'-(\w'a'u*4/10)'e |
| 111 | .ds Ae A\h'-(\w'A'u*4/10)'E |
| 112 | . \" corrections for vroff |
| 113 | .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' |
| 114 | .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' |
| 115 | . \" for low resolution devices (crt and lpr) |
| 116 | .if \n(.H>23 .if \n(.V>19 \ |
| 117 | \{\ |
| 118 | . ds : e |
| 119 | . ds 8 ss |
| 120 | . ds o a |
| 121 | . ds d- d\h'-1'\(ga |
| 122 | . ds D- D\h'-1'\(hy |
| 123 | . ds th \o'bp' |
| 124 | . ds Th \o'LP' |
| 125 | . ds ae ae |
| 126 | . ds Ae AE |
| 127 | .\} |
| 128 | .rm #[ #] #H #V #F C |
| 129 | .\" ======================================================================== |
| 130 | .\" |
| 131 | .IX Title "Net::Config 3" |
| 132 | .TH Net::Config 3 "2002-06-01" "perl v5.8.0" "Perl Programmers Reference Guide" |
| 133 | .SH "NAME" |
| 134 | Net::Config \- Local configuration data for libnet |
| 135 | .SH "SYNOPSYS" |
| 136 | .IX Header "SYNOPSYS" |
| 137 | .Vb 1 |
| 138 | \& use Net::Config qw(%NetConfig); |
| 139 | .Ve |
| 140 | .SH "DESCRIPTION" |
| 141 | .IX Header "DESCRIPTION" |
| 142 | \&\f(CW\*(C`Net::Config\*(C'\fR holds configuration data for the modules in the libnet |
| 143 | distribuion. During installation you will be asked for these values. |
| 144 | .PP |
| 145 | The configuration data is held globally in a file in the perl installation |
| 146 | tree, but a user may override any of these values by providing their own. This |
| 147 | can be done by having a \f(CW\*(C`.libnetrc\*(C'\fR file in their home directory. This file |
| 148 | should return a reference to a \s-1HASH\s0 containing the keys described below. |
| 149 | For example |
| 150 | .PP |
| 151 | .Vb 6 |
| 152 | \& # .libnetrc |
| 153 | \& { |
| 154 | \& nntp_hosts => [ "my_prefered_host" ], |
| 155 | \& ph_hosts => [ "my_ph_server" ], |
| 156 | \& } |
| 157 | \& __END__ |
| 158 | .Ve |
| 159 | .SH "METHODS" |
| 160 | .IX Header "METHODS" |
| 161 | \&\f(CW\*(C`Net::Config\*(C'\fR defines the following methods. They are methods as they are |
| 162 | invoked as class methods. This is because \f(CW\*(C`Net::Config\*(C'\fR inherits from |
| 163 | \&\f(CW\*(C`Net::LocalCfg\*(C'\fR so you can override these methods if you want. |
| 164 | .IP "requires_firewall \s-1HOST\s0" 4 |
| 165 | .IX Item "requires_firewall HOST" |
| 166 | Attempts to determine if a given host is outside your firewall. Possible |
| 167 | return values are. |
| 168 | .Sp |
| 169 | .Vb 3 |
| 170 | \& -1 Cannot lookup hostname |
| 171 | \& 0 Host is inside firewall (or there is no ftp_firewall entry) |
| 172 | \& 1 Host is outside the firewall |
| 173 | .Ve |
| 174 | .Sp |
| 175 | This is done by using hostname lookup and the \f(CW\*(C`local_netmask\*(C'\fR entry in |
| 176 | the configuration data. |
| 177 | .SH "NetConfig VALUES" |
| 178 | .IX Header "NetConfig VALUES" |
| 179 | .IP "nntp_hosts" 4 |
| 180 | .IX Item "nntp_hosts" |
| 181 | .PD 0 |
| 182 | .IP "snpp_hosts" 4 |
| 183 | .IX Item "snpp_hosts" |
| 184 | .IP "pop3_hosts" 4 |
| 185 | .IX Item "pop3_hosts" |
| 186 | .IP "smtp_hosts" 4 |
| 187 | .IX Item "smtp_hosts" |
| 188 | .IP "ph_hosts" 4 |
| 189 | .IX Item "ph_hosts" |
| 190 | .IP "daytime_hosts" 4 |
| 191 | .IX Item "daytime_hosts" |
| 192 | .IP "time_hosts" 4 |
| 193 | .IX Item "time_hosts" |
| 194 | .PD |
| 195 | Each is a reference to an array of hostnames (in order of preference), |
| 196 | which should be used for the given protocol |
| 197 | .IP "inet_domain" 4 |
| 198 | .IX Item "inet_domain" |
| 199 | Your internet domain name |
| 200 | .IP "ftp_firewall" 4 |
| 201 | .IX Item "ftp_firewall" |
| 202 | If you have an \s-1FTP\s0 proxy firewall (\fB\s-1NOT\s0\fR an \s-1HTTP\s0 or \s-1SOCKS\s0 firewall) |
| 203 | then this value should be set to the firewall hostname. If your firewall |
| 204 | does not listen to port 21, then this value should be set to |
| 205 | \&\f(CW"hostname:port"\fR (eg \f(CW"hostname:99"\fR) |
| 206 | .IP "ftp_firewall_type" 4 |
| 207 | .IX Item "ftp_firewall_type" |
| 208 | There are many different ftp firewall products available. But unfortunately |
| 209 | there is no standard for how to traverse a firewall. The list below shows the |
| 210 | sequence of commands that Net::FTP will use |
| 211 | .Sp |
| 212 | .Vb 5 |
| 213 | \& user Username for remote host |
| 214 | \& pass Password for remote host |
| 215 | \& fwuser Username for firewall |
| 216 | \& fwpass Password for firewall |
| 217 | \& remote.host The hostname of the remote ftp server |
| 218 | .Ve |
| 219 | .RS 4 |
| 220 | .IP "\(bu" 4 |
| 221 | There is no firewall |
| 222 | .IP "1" 4 |
| 223 | .IX Item "1" |
| 224 | .Vb 2 |
| 225 | \& USER user@remote.host |
| 226 | \& PASS pass |
| 227 | .Ve |
| 228 | .IP "2" 4 |
| 229 | .IX Item "2" |
| 230 | .Vb 4 |
| 231 | \& USER fwuser |
| 232 | \& PASS fwpass |
| 233 | \& USER user@remote.host |
| 234 | \& PASS pass |
| 235 | .Ve |
| 236 | .IP "3" 4 |
| 237 | .IX Item "3" |
| 238 | .Vb 5 |
| 239 | \& USER fwuser |
| 240 | \& PASS fwpass |
| 241 | \& SITE remote.site |
| 242 | \& USER user |
| 243 | \& PASS pass |
| 244 | .Ve |
| 245 | .IP "4" 4 |
| 246 | .IX Item "4" |
| 247 | .Vb 5 |
| 248 | \& USER fwuser |
| 249 | \& PASS fwpass |
| 250 | \& OPEN remote.site |
| 251 | \& USER user |
| 252 | \& PASS pass |
| 253 | .Ve |
| 254 | .IP "5" 4 |
| 255 | .IX Item "5" |
| 256 | .Vb 2 |
| 257 | \& USER user@fwuser@remote.site |
| 258 | \& PASS pass@fwpass |
| 259 | .Ve |
| 260 | .IP "6" 4 |
| 261 | .IX Item "6" |
| 262 | .Vb 4 |
| 263 | \& USER fwuser@remote.site |
| 264 | \& PASS fwpass |
| 265 | \& USER user |
| 266 | \& PASS pass |
| 267 | .Ve |
| 268 | .IP "7" 4 |
| 269 | .IX Item "7" |
| 270 | .Vb 4 |
| 271 | \& USER user@remote.host |
| 272 | \& PASS pass |
| 273 | \& AUTH fwuser |
| 274 | \& RESP fwpass |
| 275 | .Ve |
| 276 | .RE |
| 277 | .RS 4 |
| 278 | .RE |
| 279 | .IP "ftp_ext_passive" 4 |
| 280 | .IX Item "ftp_ext_passive" |
| 281 | .PD 0 |
| 282 | .IP "ftp_int_pasive" 4 |
| 283 | .IX Item "ftp_int_pasive" |
| 284 | .PD |
| 285 | \&\s-1FTP\s0 servers normally work on a non-passive mode. That is when you want to |
| 286 | transfer data you have to tell the server the address and port to |
| 287 | connect to. |
| 288 | .Sp |
| 289 | With some firewalls this does not work as the server cannot |
| 290 | connect to your machine (because you are behind a firewall) and the firewall |
| 291 | does not re-write the command. In this case you should set \f(CW\*(C`ftp_ext_passive\*(C'\fR |
| 292 | to a \fItrue\fR value. |
| 293 | .Sp |
| 294 | Some servers are configured to only work in passive mode. If you have |
| 295 | one of these you can force \f(CW\*(C`Net::FTP\*(C'\fR to always transfer in passive |
| 296 | mode; when not going via a firewall, by setting \f(CW\*(C`ftp_int_passive\*(C'\fR to |
| 297 | a \fItrue\fR value. |
| 298 | .IP "local_netmask" 4 |
| 299 | .IX Item "local_netmask" |
| 300 | A reference to a list of netmask strings in the form \f(CW"134.99.4.0/24"\fR. |
| 301 | These are used by the \f(CW\*(C`requires_firewall\*(C'\fR function to determine if a given |
| 302 | host is inside or outside your firewall. |
| 303 | .PP |
| 304 | The following entries are used during installation & testing on the |
| 305 | libnet package |
| 306 | .IP "test_hosts" 4 |
| 307 | .IX Item "test_hosts" |
| 308 | If true then \f(CW\*(C`make test\*(C'\fR may attempt to connect to hosts given in the |
| 309 | configuration. |
| 310 | .IP "test_exists" 4 |
| 311 | .IX Item "test_exists" |
| 312 | If true then \f(CW\*(C`Configure\*(C'\fR will check each hostname given that it exists |
| 313 | .PP |
| 314 | \&\fI$Id: //depot/libnet/Net/Config.pm#17 $\fR |