home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: SHell self-extracting ARchive
(archive/shar).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| SHell self-extracting ARchive (archive/shar)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/329 Shell Archive Format
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 23 52 65 74 75 72 6e 2d | 50 61 74 68 3a 20 70 68 |#Return-|Path: ph|
|00000010| 69 6c 40 64 67 62 74 2e | 64 6f 63 2e 63 61 0a 23 |il@dgbt.|doc.ca.#|
|00000020| 52 65 63 65 69 76 65 64 | 3a 20 62 79 20 63 6f 67 |Received|: by cog|
|00000030| 6e 69 74 69 6f 6e 2e 70 | 61 2e 64 65 63 2e 63 6f |nition.p|a.dec.co|
|00000040| 6d 3b 20 69 64 20 41 41 | 31 33 33 39 36 3b 20 53 |m; id AA|13396; S|
|00000050| 75 6e 2c 20 32 35 20 41 | 70 72 20 39 33 20 32 31 |un, 25 A|pr 93 21|
|00000060| 3a 30 39 3a 34 35 20 2d | 30 37 30 30 0a 23 52 65 |:09:45 -|0700.#Re|
|00000070| 63 65 69 76 65 64 3a 20 | 62 79 20 69 6e 65 74 2d |ceived: |by inet-|
|00000080| 67 77 2d 31 2e 70 61 2e | 64 65 63 2e 63 6f 6d 3b |gw-1.pa.|dec.com;|
|00000090| 20 69 64 20 41 41 30 32 | 35 37 33 3b 20 53 75 6e | id AA02|573; Sun|
|000000a0| 2c 20 32 35 20 41 70 72 | 20 39 33 20 32 31 3a 30 |, 25 Apr| 93 21:0|
|000000b0| 39 3a 33 39 20 2d 30 37 | 30 30 0a 23 52 65 63 65 |9:39 -07|00.#Rece|
|000000c0| 69 76 65 64 3a 20 62 79 | 20 64 67 62 74 2e 64 6f |ived: by| dgbt.do|
|000000d0| 63 2e 63 61 20 28 34 2e | 31 2f 73 6d 61 69 6c 32 |c.ca (4.|1/smail2|
|000000e0| 2e 35 2f 31 32 2d 30 32 | 2d 38 38 29 0a 23 09 69 |.5/12-02|-88).#.i|
|000000f0| 64 20 41 41 32 38 32 33 | 33 3b 20 4d 6f 6e 2c 20 |d AA2823|3; Mon, |
|00000100| 32 36 20 41 70 72 20 39 | 33 20 30 30 3a 30 38 3a |26 Apr 9|3 00:08:|
|00000110| 31 39 20 45 44 54 0a 23 | 4d 65 73 73 61 67 65 2d |19 EDT.#|Message-|
|00000120| 49 64 3a 20 3c 39 33 30 | 34 32 36 30 34 30 38 2e |Id: <930|4260408.|
|00000130| 41 41 32 38 32 33 33 40 | 64 67 62 74 2e 64 6f 63 |AA28233@|dgbt.doc|
|00000140| 2e 63 61 3e 0a 23 46 72 | 6f 6d 3a 20 70 68 69 6c |.ca>.#Fr|om: phil|
|00000150| 40 64 67 62 74 2e 64 6f | 63 2e 63 61 20 28 50 68 |@dgbt.do|c.ca (Ph|
|00000160| 69 6c 20 42 6c 61 6e 63 | 68 66 69 65 6c 64 29 0a |il Blanc|hfield).|
|00000170| 23 44 61 74 65 3a 20 4d | 6f 6e 2c 20 32 36 20 41 |#Date: M|on, 26 A|
|00000180| 70 72 20 39 33 20 30 30 | 3a 30 38 3a 31 39 20 45 |pr 93 00|:08:19 E|
|00000190| 44 54 0a 23 49 6e 2d 52 | 65 70 6c 79 2d 54 6f 3a |DT.#In-R|eply-To:|
|000001a0| 20 50 61 75 6c 20 41 20 | 56 69 78 69 65 20 3c 76 | Paul A |Vixie <v|
|000001b0| 69 78 69 65 40 70 61 2e | 64 65 63 2e 63 6f 6d 3e |ixie@pa.|dec.com>|
|000001c0| 0a 23 20 20 20 20 20 20 | 20 22 73 65 6e 64 20 6d |.# | "send m|
|000001d0| 65 20 79 6f 75 72 20 74 | 6f 6f 6c 73 22 20 28 41 |e your t|ools" (A|
|000001e0| 70 72 20 32 35 2c 20 31 | 32 3a 32 38 70 6d 29 0a |pr 25, 1|2:28pm).|
|000001f0| 23 52 65 70 6c 79 2d 54 | 6f 3a 20 70 68 69 6c 40 |#Reply-T|o: phil@|
|00000200| 64 67 62 74 2e 64 6f 63 | 2e 63 61 0a 23 58 2d 4d |dgbt.doc|.ca.#X-M|
|00000210| 61 69 6c 65 72 3a 20 4d | 61 69 6c 20 55 73 65 72 |ailer: M|ail User|
|00000220| 27 73 20 53 68 65 6c 6c | 20 28 36 2e 35 20 34 2f |'s Shell| (6.5 4/|
|00000230| 31 37 2f 38 39 29 0a 23 | 54 6f 3a 20 50 61 75 6c |17/89).#|To: Paul|
|00000240| 20 41 20 56 69 78 69 65 | 20 3c 76 69 78 69 65 3e | A Vixie| <vixie>|
|00000250| 0a 23 53 75 62 6a 65 63 | 74 3a 20 52 65 3a 20 73 |.#Subjec|t: Re: s|
|00000260| 65 6e 64 20 6d 65 20 79 | 6f 75 72 20 74 6f 6f 6c |end me y|our tool|
|00000270| 73 0a 23 0a 23 4f 6e 20 | 41 70 72 20 32 35 2c 20 |s.#.#On |Apr 25, |
|00000280| 31 32 3a 32 38 70 6d 2c | 20 50 61 75 6c 20 41 20 |12:28pm,| Paul A |
|00000290| 56 69 78 69 65 20 77 72 | 6f 74 65 3a 0a 23 7d 20 |Vixie wr|ote:.#} |
|000002a0| 53 75 62 6a 65 63 74 3a | 20 73 65 6e 64 20 6d 65 |Subject:| send me|
|000002b0| 20 79 6f 75 72 20 74 6f | 6f 6c 73 0a 23 3e 20 0a | your to|ols.#> .|
|000002c0| 23 3e 20 66 6f 72 20 74 | 68 65 20 66 69 6e 61 6c |#> for t|he final|
|000002d0| 20 34 2e 39 20 72 65 6c | 65 61 73 65 20 69 20 77 | 4.9 rel|ease i w|
|000002e0| 6f 75 6c 64 20 6c 69 6b | 65 20 74 6f 20 69 6e 63 |ould lik|e to inc|
|000002f0| 6c 75 64 65 20 61 20 22 | 63 6f 6e 74 72 69 62 22 |lude a "|contrib"|
|00000300| 20 64 69 72 65 63 74 6f | 72 79 20 69 6e 0a 23 3e | directo|ry in.#>|
|00000310| 20 77 68 69 63 68 20 61 | 20 77 68 6f 6c 65 20 70 | which a| whole p|
|00000320| 69 6c 65 20 6f 66 20 63 | 6f 6e 74 72 69 62 75 74 |ile of c|ontribut|
|00000330| 65 64 20 73 63 72 69 70 | 74 73 20 61 6e 64 20 63 |ed scrip|ts and c|
|00000340| 6f 6e 76 65 72 74 65 72 | 73 20 61 6e 64 20 63 68 |onverter|s and ch|
|00000350| 65 63 6b 65 72 73 20 63 | 61 6e 0a 23 3e 20 6c 69 |eckers c|an.#> li|
|00000360| 76 65 2e 20 20 69 66 20 | 79 6f 75 20 68 61 76 65 |ve. if |you have|
|00000370| 20 73 6f 6d 65 74 68 69 | 6e 67 20 77 68 69 63 68 | somethi|ng which|
|00000380| 20 63 6f 6e 76 65 72 74 | 73 20 74 6f 2f 66 72 6f | convert|s to/fro|
|00000390| 6d 20 2f 65 74 63 2f 68 | 6f 73 74 73 20 74 6f 2f |m /etc/h|osts to/|
|000003a0| 66 72 6f 6d 0a 23 3e 20 | 68 6f 73 74 73 2e 74 78 |from.#> |hosts.tx|
|000003b0| 74 20 74 6f 2f 66 72 6f | 6d 20 7a 6f 6e 65 20 66 |t to/fro|m zone f|
|000003c0| 69 6c 65 73 2c 20 6f 72 | 20 77 68 69 63 68 20 73 |iles, or| which s|
|000003d0| 63 61 6e 73 20 61 6e 79 | 20 6f 66 20 74 68 6f 73 |cans any| of thos|
|000003e0| 65 20 66 69 6c 65 73 20 | 66 6f 72 20 73 79 6e 74 |e files |for synt|
|000003f0| 61 78 0a 23 3e 20 65 72 | 72 6f 72 73 2c 20 6f 72 |ax.#> er|rors, or|
|00000400| 20 77 68 69 63 68 20 63 | 68 65 63 6b 73 20 64 6f | which c|hecks do|
|00000410| 6d 61 69 6e 73 20 66 6f | 72 20 63 6f 6e 73 69 73 |mains fo|r consis|
|00000420| 74 65 6e 63 79 2c 20 6f | 72 20 77 68 69 63 68 20 |tency, o|r which |
|00000430| 64 6f 65 73 20 73 6f 6d | 65 74 68 69 6e 67 0a 23 |does som|ething.#|
|00000440| 3e 20 65 6c 73 65 20 74 | 68 61 74 20 79 6f 75 20 |> else t|hat you |
|00000450| 74 68 69 6e 6b 20 6f 74 | 68 65 72 20 42 49 4e 44 |think ot|her BIND|
|00000460| 20 75 73 65 72 73 20 77 | 6f 75 6c 64 20 77 61 6e | users w|ould wan|
|00000470| 74 2c 20 70 6c 65 61 73 | 65 20 73 65 6e 64 20 69 |t, pleas|e send i|
|00000480| 74 20 74 6f 20 6d 65 20 | 6e 6f 77 2e 0a 23 3e 20 |t to me |now..#> |
|00000490| 0a 23 3e 20 69 74 20 64 | 6f 65 73 6e 27 74 20 68 |.#> it d|oesn't h|
|000004a0| 61 76 65 20 74 6f 20 62 | 65 20 70 72 65 74 74 79 |ave to b|e pretty|
|000004b0| 2c 20 6f 72 20 77 65 6c | 6c 2d 64 6f 63 75 6d 65 |, or wel|l-docume|
|000004c0| 6e 74 65 64 2c 20 74 68 | 6f 75 67 68 20 69 74 20 |nted, th|ough it |
|000004d0| 77 6f 75 6c 64 20 62 65 | 20 6e 69 63 65 2e 0a 23 |would be| nice..#|
|000004e0| 0a 23 54 68 69 73 20 69 | 73 20 28 65 6d 62 61 72 |.#This i|s (embar|
|000004f0| 72 61 73 73 69 6e 67 6c | 79 29 20 73 69 6d 70 6c |rassingl|y) simpl|
|00000500| 65 20 62 75 74 20 68 65 | 63 6b 20 49 20 75 73 65 |e but he|ck I use|
|00000510| 20 69 74 20 61 6c 6c 20 | 74 68 65 20 74 69 6d 65 | it all |the time|
|00000520| 2e 20 49 74 20 73 69 6d | 70 6c 79 0a 23 70 72 69 |. It sim|ply.#pri|
|00000530| 6e 74 73 20 6f 75 74 20 | 74 68 65 20 22 68 6f 73 |nts out |the "hos|
|00000540| 74 65 6e 74 22 20 73 74 | 72 75 63 74 75 72 65 20 |tent" st|ructure |
|00000550| 75 73 69 6e 67 20 67 65 | 74 68 6f 73 74 62 79 6e |using ge|thostbyn|
|00000560| 61 6d 65 28 33 29 20 6f | 72 20 67 65 74 68 6f 73 |ame(3) o|r gethos|
|00000570| 74 62 79 61 64 64 72 28 | 33 29 2e 0a 0a 23 21 20 |tbyaddr(|3)...#! |
|00000580| 2f 62 69 6e 2f 73 68 0a | 23 20 54 68 69 73 20 69 |/bin/sh.|# This i|
|00000590| 73 20 61 20 73 68 65 6c | 6c 20 61 72 63 68 69 76 |s a shel|l archiv|
|000005a0| 65 2e 20 20 52 65 6d 6f | 76 65 20 61 6e 79 74 68 |e. Remo|ve anyth|
|000005b0| 69 6e 67 20 62 65 66 6f | 72 65 20 74 68 69 73 20 |ing befo|re this |
|000005c0| 6c 69 6e 65 2c 20 74 68 | 65 6e 20 75 6e 70 61 63 |line, th|en unpac|
|000005d0| 6b 0a 23 20 69 74 20 62 | 79 20 73 61 76 69 6e 67 |k.# it b|y saving|
|000005e0| 20 69 74 20 69 6e 74 6f | 20 61 20 66 69 6c 65 20 | it into| a file |
|000005f0| 61 6e 64 20 74 79 70 69 | 6e 67 20 22 73 68 20 66 |and typi|ng "sh f|
|00000600| 69 6c 65 22 2e 20 20 54 | 6f 20 6f 76 65 72 77 72 |ile". T|o overwr|
|00000610| 69 74 65 20 65 78 69 73 | 74 69 6e 67 0a 23 20 66 |ite exis|ting.# f|
|00000620| 69 6c 65 73 2c 20 74 79 | 70 65 20 22 73 68 20 66 |iles, ty|pe "sh f|
|00000630| 69 6c 65 20 2d 63 22 2e | 20 20 59 6f 75 20 63 61 |ile -c".| You ca|
|00000640| 6e 20 61 6c 73 6f 20 66 | 65 65 64 20 74 68 69 73 |n also f|eed this|
|00000650| 20 61 73 20 73 74 61 6e | 64 61 72 64 20 69 6e 70 | as stan|dard inp|
|00000660| 75 74 20 76 69 61 0a 23 | 20 75 6e 73 68 61 72 2c |ut via.#| unshar,|
|00000670| 20 6f 72 20 62 79 20 74 | 79 70 69 6e 67 20 22 73 | or by t|yping "s|
|00000680| 68 20 3c 66 69 6c 65 22 | 2c 20 65 2e 67 2e 2e 20 |h <file"|, e.g.. |
|00000690| 20 49 66 20 74 68 69 73 | 20 61 72 63 68 69 76 65 | If this| archive|
|000006a0| 20 69 73 20 63 6f 6d 70 | 6c 65 74 65 2c 20 79 6f | is comp|lete, yo|
|000006b0| 75 0a 23 20 77 69 6c 6c | 20 73 65 65 20 74 68 65 |u.# will| see the|
|000006c0| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 6d 65 73 73 61 | followi|ng messa|
|000006d0| 67 65 20 61 74 20 74 68 | 65 20 65 6e 64 3a 0a 23 |ge at th|e end:.#|
|000006e0| 09 09 22 45 6e 64 20 6f | 66 20 73 68 65 6c 6c 20 |.."End o|f shell |
|000006f0| 61 72 63 68 69 76 65 2e | 22 0a 23 20 43 6f 6e 74 |archive.|".# Cont|
|00000700| 65 6e 74 73 3a 20 20 68 | 6f 73 74 65 6e 74 2e 31 |ents: h|ostent.1|
|00000710| 20 68 6f 73 74 65 6e 74 | 2e 63 20 4d 61 6b 65 66 | hostent|.c Makef|
|00000720| 69 6c 65 0a 23 20 57 72 | 61 70 70 65 64 20 62 79 |ile.# Wr|apped by|
|00000730| 20 70 68 69 6c 40 64 67 | 62 74 2e 64 6f 63 2e 63 | phil@dg|bt.doc.c|
|00000740| 61 20 6f 6e 20 4d 6f 6e | 20 41 70 72 20 32 36 20 |a on Mon| Apr 26 |
|00000750| 30 30 3a 30 36 3a 35 31 | 20 31 39 39 33 0a 50 41 |00:06:51| 1993.PA|
|00000760| 54 48 3d 2f 62 69 6e 3a | 2f 75 73 72 2f 62 69 6e |TH=/bin:|/usr/bin|
|00000770| 3a 2f 75 73 72 2f 75 63 | 62 20 3b 20 65 78 70 6f |:/usr/uc|b ; expo|
|00000780| 72 74 20 50 41 54 48 0a | 69 66 20 74 65 73 74 20 |rt PATH.|if test |
|00000790| 2d 66 20 27 68 6f 73 74 | 65 6e 74 2e 31 27 20 2d |-f 'host|ent.1' -|
|000007a0| 61 20 22 24 7b 31 7d 22 | 20 21 3d 20 22 2d 63 22 |a "${1}"| != "-c"|
|000007b0| 20 3b 20 74 68 65 6e 20 | 0a 20 20 65 63 68 6f 20 | ; then |. echo |
|000007c0| 73 68 61 72 3a 20 57 69 | 6c 6c 20 6e 6f 74 20 63 |shar: Wi|ll not c|
|000007d0| 6c 6f 62 62 65 72 20 65 | 78 69 73 74 69 6e 67 20 |lobber e|xisting |
|000007e0| 66 69 6c 65 20 5c 22 27 | 68 6f 73 74 65 6e 74 2e |file \"'|hostent.|
|000007f0| 31 27 5c 22 0a 65 6c 73 | 65 0a 65 63 68 6f 20 73 |1'\".els|e.echo s|
|00000800| 68 61 72 3a 20 45 78 74 | 72 61 63 74 69 6e 67 20 |har: Ext|racting |
|00000810| 5c 22 27 68 6f 73 74 65 | 6e 74 2e 31 27 5c 22 20 |\"'hoste|nt.1'\" |
|00000820| 5c 28 31 34 32 31 20 63 | 68 61 72 61 63 74 65 72 |\(1421 c|haracter|
|00000830| 73 5c 29 0a 73 65 64 20 | 22 73 2f 5e 58 2f 2f 22 |s\).sed |"s/^X//"|
|00000840| 20 3e 27 68 6f 73 74 65 | 6e 74 2e 31 27 20 3c 3c | >'hoste|nt.1' <<|
|00000850| 27 45 4e 44 5f 4f 46 5f | 46 49 4c 45 27 0a 58 2e |'END_OF_|FILE'.X.|
|00000860| 54 48 20 48 4f 53 54 45 | 4e 54 20 31 20 22 33 31 |TH HOSTE|NT 1 "31|
|00000870| 20 4a 75 6c 79 20 31 39 | 39 32 22 0a 58 2e 53 48 | July 19|92".X.SH|
|00000880| 20 4e 41 4d 45 0a 58 68 | 6f 73 74 65 6e 74 20 5c | NAME.Xh|ostent \|
|00000890| 2d 20 44 69 73 70 6c 61 | 79 73 20 74 68 65 20 68 |- Displa|ys the h|
|000008a0| 6f 73 74 65 6e 74 20 73 | 74 72 75 63 74 75 72 65 |ostent s|tructure|
|000008b0| 20 66 6f 72 20 61 20 67 | 69 76 65 6e 20 68 6f 73 | for a g|iven hos|
|000008c0| 74 6e 61 6d 65 0a 58 2e | 53 48 20 53 59 4e 4f 50 |tname.X.|SH SYNOP|
|000008d0| 53 49 53 0a 58 2e 42 20 | 68 6f 73 74 65 6e 74 20 |SIS.X.B |hostent |
|000008e0| 7b 68 6f 73 74 6e 61 6d | 65 20 7c 20 61 64 64 72 |{hostnam|e | addr|
|000008f0| 65 73 73 7d 0a 58 0a 58 | 2e 53 48 20 44 45 53 43 |ess}.X.X|.SH DESC|
|00000900| 52 49 50 54 49 4f 4e 0a | 58 2e 4c 50 0a 58 2e 42 |RIPTION.|X.LP.X.B|
|00000910| 20 68 6f 73 74 65 6e 74 | 0a 58 64 69 73 70 6c 61 | hostent|.Xdispla|
|00000920| 79 73 20 74 68 65 0a 58 | 2e 49 20 68 6f 73 74 65 |ys the.X|.I hoste|
|00000930| 6e 74 0a 58 73 79 73 74 | 65 6d 20 73 74 72 75 63 |nt.Xsyst|em struc|
|00000940| 74 75 72 65 20 66 6f 72 | 20 74 68 65 20 67 69 76 |ture for| the giv|
|00000950| 65 6e 20 68 6f 73 74 6e | 61 6d 65 20 6f 72 20 64 |en hostn|ame or d|
|00000960| 6f 74 74 65 64 20 71 75 | 61 64 20 49 50 20 6e 75 |otted qu|ad IP nu|
|00000970| 6d 62 65 72 2e 0a 58 49 | 74 20 75 73 65 73 20 74 |mber..XI|t uses t|
|00000980| 68 65 20 73 79 73 74 65 | 6d 20 63 61 6c 6c 20 67 |he syste|m call g|
|00000990| 65 74 68 6f 73 74 62 79 | 6e 61 6d 65 28 33 29 20 |ethostby|name(3) |
|000009a0| 6f 72 20 67 65 74 68 6f | 73 74 62 79 61 64 64 72 |or getho|stbyaddr|
|000009b0| 28 33 29 20 74 6f 0a 58 | 66 69 6c 6c 20 74 68 65 |(3) to.X|fill the|
|000009c0| 20 68 6f 73 74 65 6e 74 | 20 73 74 72 75 63 74 75 | hostent| structu|
|000009d0| 72 65 2e 20 48 6f 73 74 | 65 6e 74 20 77 61 73 20 |re. Host|ent was |
|000009e0| 77 72 69 74 74 65 6e 20 | 74 6f 20 62 65 20 75 73 |written |to be us|
|000009f0| 65 64 20 61 73 20 61 20 | 74 6f 6f 6c 0a 58 74 6f |ed as a |tool.Xto|
|00000a00| 20 68 65 6c 70 20 64 65 | 62 75 67 20 6e 61 6d 65 | help de|bug name|
|00000a10| 20 72 65 73 6f 6c 76 69 | 6e 67 20 69 73 73 75 65 | resolvi|ng issue|
|00000a20| 73 2e 20 54 68 65 20 69 | 6e 74 65 72 66 61 63 65 |s. The i|nterface|
|00000a30| 20 74 68 61 74 20 68 6f | 73 74 65 6e 74 20 75 73 | that ho|stent us|
|00000a40| 65 73 0a 58 69 73 20 65 | 78 61 63 74 6c 79 20 74 |es.Xis e|xactly t|
|00000a50| 68 65 20 73 61 6d 65 20 | 69 6e 74 65 72 66 61 63 |he same |interfac|
|00000a60| 65 20 74 68 61 74 20 75 | 74 69 6c 69 74 69 65 73 |e that u|tilities|
|00000a70| 20 73 75 63 68 20 61 73 | 0a 58 2e 49 20 74 65 6c | such as|.X.I tel|
|00000a80| 6e 65 74 0a 58 61 6e 64 | 0a 58 2e 49 20 66 74 70 |net.Xand|.X.I ftp|
|00000a90| 0a 58 75 73 65 20 74 6f | 20 72 65 73 6f 6c 76 65 |.Xuse to| resolve|
|00000aa0| 20 49 50 20 6e 75 6d 62 | 65 72 73 20 61 6e 64 20 | IP numb|ers and |
|00000ab0| 6e 61 6d 65 73 2e 20 49 | 74 20 69 73 20 65 73 70 |names. I|t is esp|
|00000ac0| 65 63 69 61 6c 6c 79 20 | 75 73 65 66 75 6c 20 69 |ecially |useful i|
|00000ad0| 66 20 79 6f 75 72 0a 58 | 73 79 73 74 65 6d 20 75 |f your.X|system u|
|00000ae0| 73 65 73 20 6d 75 6c 74 | 69 2d 74 69 65 72 20 72 |ses mult|i-tier r|
|00000af0| 65 73 6f 6c 76 69 6e 67 | 20 28 4e 49 53 2c 20 2f |esolving| (NIS, /|
|00000b00| 65 74 63 2f 68 6f 73 74 | 73 2c 20 42 49 4e 44 29 |etc/host|s, BIND)|
|00000b10| 2e 0a 58 72 65 73 6f 6c | 76 69 6e 67 20 0a 58 2e |..Xresol|ving .X.|
|00000b20| 53 48 20 45 58 41 4d 50 | 4c 45 53 0a 58 2e 52 53 |SH EXAMP|LES.X.RS|
|00000b30| 20 0a 58 2e 6e 66 0a 58 | 2e 66 74 20 42 0a 58 65 | .X.nf.X|.ft B.Xe|
|00000b40| 78 61 6d 70 6c 65 25 20 | 68 6f 73 74 65 6e 74 20 |xample% |hostent |
|00000b50| 75 63 62 76 61 78 2e 62 | 65 72 6b 65 6c 65 79 2e |ucbvax.b|erkeley.|
|00000b60| 65 64 75 0a 58 43 61 6e | 6e 6f 6e 69 63 61 6c 20 |edu.XCan|nonical |
|00000b70| 28 4f 66 66 69 63 69 61 | 6c 29 20 68 6f 73 74 6e |(Officia|l) hostn|
|00000b80| 61 6d 65 20 3d 20 75 63 | 62 76 61 78 2e 62 65 72 |ame = uc|bvax.ber|
|00000b90| 6b 65 6c 65 79 2e 65 64 | 75 0a 58 0a 58 4c 69 73 |keley.ed|u.X.XLis|
|00000ba0| 74 20 6f 66 20 61 6c 69 | 61 73 65 73 3a 20 3c 4e |t of ali|ases: <N|
|00000bb0| 4f 4e 45 20 45 58 49 53 | 54 3e 0a 58 0a 58 0a 58 |ONE EXIS|T>.X.X.X|
|00000bc0| 4c 69 73 74 20 6f 66 20 | 49 50 20 61 64 64 72 65 |List of |IP addre|
|00000bd0| 73 73 65 73 3a 0a 58 0a | 58 61 64 64 72 65 73 73 |sses:.X.|Xaddress|
|00000be0| 23 20 30 20 20 3d 20 31 | 32 38 2e 33 32 2e 31 33 |# 0 = 1|28.32.13|
|00000bf0| 33 2e 31 0a 58 61 64 64 | 72 65 73 73 23 20 31 20 |3.1.Xadd|ress# 1 |
|00000c00| 20 3d 20 31 32 38 2e 33 | 32 2e 31 33 30 2e 31 32 | = 128.3|2.130.12|
|00000c10| 0a 58 61 64 64 72 65 73 | 73 23 20 32 20 20 3d 20 |.Xaddres|s# 2 = |
|00000c20| 31 32 38 2e 33 32 2e 31 | 34 39 2e 33 36 0a 58 2e |128.32.1|49.36.X.|
|00000c30| 44 54 20 0a 58 2e 66 74 | 20 50 0a 58 2e 66 69 20 |DT .X.ft| P.X.fi |
|00000c40| 0a 58 2e 52 45 0a 58 2e | 4c 50 0a 58 64 69 73 70 |.X.RE.X.|LP.Xdisp|
|00000c50| 6c 61 79 73 20 74 68 65 | 20 63 6f 6e 74 65 6e 74 |lays the| content|
|00000c60| 73 20 6f 66 20 74 68 65 | 20 68 6f 73 74 65 6e 74 |s of the| hostent|
|00000c70| 20 73 74 72 75 63 74 75 | 72 65 20 66 6f 72 0a 58 | structu|re for.X|
|00000c80| 2e 42 20 75 63 62 76 61 | 78 2e 62 65 72 6b 65 6c |.B ucbva|x.berkel|
|00000c90| 65 79 2e 65 64 75 0a 58 | 6f 6e 20 74 68 65 20 73 |ey.edu.X|on the s|
|00000ca0| 74 61 6e 64 61 72 64 20 | 6f 75 74 70 75 74 2e 0a |tandard |output..|
|00000cb0| 58 2e 4c 50 0a 58 2e 52 | 53 20 0a 58 2e 6e 66 0a |X.LP.X.R|S .X.nf.|
|00000cc0| 58 2e 66 74 20 42 0a 58 | 65 78 61 6d 70 6c 65 25 |X.ft B.X|example%|
|00000cd0| 20 68 6f 73 74 65 6e 74 | 20 31 32 38 2e 33 32 2e | hostent| 128.32.|
|00000ce0| 31 33 33 2e 31 0a 58 43 | 61 6e 6e 6f 6e 69 63 61 |133.1.XC|annonica|
|00000cf0| 6c 20 28 4f 66 66 69 63 | 69 61 6c 29 20 68 6f 73 |l (Offic|ial) hos|
|00000d00| 74 6e 61 6d 65 20 3d 20 | 75 63 62 76 61 78 2e 42 |tname = |ucbvax.B|
|00000d10| 65 72 6b 65 6c 65 79 2e | 45 44 55 0a 58 0a 58 4c |erkeley.|EDU.X.XL|
|00000d20| 69 73 74 20 6f 66 20 61 | 6c 69 61 73 65 73 3a 20 |ist of a|liases: |
|00000d30| 3c 4e 4f 4e 45 20 45 58 | 49 53 54 3e 0a 58 0a 58 |<NONE EX|IST>.X.X|
|00000d40| 0a 58 4c 69 73 74 20 6f | 66 20 49 50 20 61 64 64 |.XList o|f IP add|
|00000d50| 72 65 73 73 65 73 3a 0a | 58 0a 58 61 64 64 72 65 |resses:.|X.Xaddre|
|00000d60| 73 73 23 20 30 20 20 3d | 20 31 32 38 2e 33 32 2e |ss# 0 =| 128.32.|
|00000d70| 31 33 33 2e 31 0a 58 61 | 64 64 72 65 73 73 23 20 |133.1.Xa|ddress# |
|00000d80| 31 20 20 3d 20 31 32 38 | 2e 33 32 2e 31 33 30 2e |1 = 128|.32.130.|
|00000d90| 31 32 0a 58 61 64 64 72 | 65 73 73 23 20 32 20 20 |12.Xaddr|ess# 2 |
|00000da0| 3d 20 31 32 38 2e 33 32 | 2e 31 34 39 2e 33 36 0a |= 128.32|.149.36.|
|00000db0| 58 2e 44 54 20 0a 58 2e | 66 74 20 50 0a 58 2e 66 |X.DT .X.|ft P.X.f|
|00000dc0| 69 20 0a 58 2e 52 45 0a | 58 2e 4c 50 0a 58 64 6f |i .X.RE.|X.LP.Xdo|
|00000dd0| 65 73 20 74 68 65 20 73 | 61 6d 65 20 69 6e 20 72 |es the s|ame in r|
|00000de0| 65 76 65 72 73 65 2e 0a | 58 2e 53 48 20 22 53 45 |everse..|X.SH "SE|
|00000df0| 45 20 41 4c 53 4f 22 0a | 58 2e 42 52 20 67 65 74 |E ALSO".|X.BR get|
|00000e00| 68 6f 73 74 65 6e 74 20 | 28 33 29 0a 58 2e 53 48 |hostent |(3).X.SH|
|00000e10| 20 41 55 54 48 4f 52 0a | 58 50 68 69 6c 20 42 6c | AUTHOR.|XPhil Bl|
|00000e20| 61 6e 63 68 66 69 65 6c | 64 20 43 2e 52 2e 43 2e |anchfiel|d C.R.C.|
|00000e30| 0a 45 4e 44 5f 4f 46 5f | 46 49 4c 45 0a 69 66 20 |.END_OF_|FILE.if |
|00000e40| 74 65 73 74 20 31 34 32 | 31 20 2d 6e 65 20 60 77 |test 142|1 -ne `w|
|00000e50| 63 20 2d 63 20 3c 27 68 | 6f 73 74 65 6e 74 2e 31 |c -c <'h|ostent.1|
|00000e60| 27 60 3b 20 74 68 65 6e | 0a 20 20 20 20 65 63 68 |'`; then|. ech|
|00000e70| 6f 20 73 68 61 72 3a 20 | 5c 22 27 68 6f 73 74 65 |o shar: |\"'hoste|
|00000e80| 6e 74 2e 31 27 5c 22 20 | 75 6e 70 61 63 6b 65 64 |nt.1'\" |unpacked|
|00000e90| 20 77 69 74 68 20 77 72 | 6f 6e 67 20 73 69 7a 65 | with wr|ong size|
|00000ea0| 21 0a 66 69 0a 23 20 65 | 6e 64 20 6f 66 20 27 68 |!.fi.# e|nd of 'h|
|00000eb0| 6f 73 74 65 6e 74 2e 31 | 27 0a 66 69 0a 69 66 20 |ostent.1|'.fi.if |
|00000ec0| 74 65 73 74 20 2d 66 20 | 27 68 6f 73 74 65 6e 74 |test -f |'hostent|
|00000ed0| 2e 63 27 20 2d 61 20 22 | 24 7b 31 7d 22 20 21 3d |.c' -a "|${1}" !=|
|00000ee0| 20 22 2d 63 22 20 3b 20 | 74 68 65 6e 20 0a 20 20 | "-c" ; |then . |
|00000ef0| 65 63 68 6f 20 73 68 61 | 72 3a 20 57 69 6c 6c 20 |echo sha|r: Will |
|00000f00| 6e 6f 74 20 63 6c 6f 62 | 62 65 72 20 65 78 69 73 |not clob|ber exis|
|00000f10| 74 69 6e 67 20 66 69 6c | 65 20 5c 22 27 68 6f 73 |ting fil|e \"'hos|
|00000f20| 74 65 6e 74 2e 63 27 5c | 22 0a 65 6c 73 65 0a 65 |tent.c'\|".else.e|
|00000f30| 63 68 6f 20 73 68 61 72 | 3a 20 45 78 74 72 61 63 |cho shar|: Extrac|
|00000f40| 74 69 6e 67 20 5c 22 27 | 68 6f 73 74 65 6e 74 2e |ting \"'|hostent.|
|00000f50| 63 27 5c 22 20 5c 28 32 | 31 33 30 20 63 68 61 72 |c'\" \(2|130 char|
|00000f60| 61 63 74 65 72 73 5c 29 | 0a 73 65 64 20 22 73 2f |acters\)|.sed "s/|
|00000f70| 5e 58 2f 2f 22 20 3e 27 | 68 6f 73 74 65 6e 74 2e |^X//" >'|hostent.|
|00000f80| 63 27 20 3c 3c 27 45 4e | 44 5f 4f 46 5f 46 49 4c |c' <<'EN|D_OF_FIL|
|00000f90| 45 27 0a 58 2f 2a 0a 58 | 20 2a 09 68 6f 73 74 65 |E'.X/*.X| *.hoste|
|00000fa0| 6e 74 2e 63 0a 58 20 2a | 0a 58 20 2a 09 50 72 6f |nt.c.X *|.X *.Pro|
|00000fb0| 67 72 61 6d 20 74 6f 20 | 70 72 69 6e 74 20 6f 75 |gram to |print ou|
|00000fc0| 74 20 61 20 22 68 6f 73 | 74 65 6e 74 22 20 73 74 |t a "hos|tent" st|
|00000fd0| 72 75 63 74 75 72 65 20 | 67 69 76 65 6e 20 61 20 |ructure |given a |
|00000fe0| 68 6f 73 74 6e 61 6d 65 | 20 6f 72 0a 58 20 2a 09 |hostname| or.X *.|
|00000ff0| 22 64 6f 74 74 65 64 20 | 71 75 61 64 22 20 61 64 |"dotted |quad" ad|
|00001000| 64 72 65 73 73 2e 20 54 | 68 65 72 65 66 6f 72 65 |dress. T|herefore|
|00001010| 20 74 68 69 73 20 69 73 | 20 65 78 61 63 74 6c 79 | this is| exactly|
|00001020| 20 77 68 61 74 20 46 54 | 50 20 54 65 6c 6e 65 74 | what FT|P Telnet|
|00001030| 0a 58 20 2a 09 6f 72 20 | 61 6e 79 20 75 74 69 6c |.X *.or |any util|
|00001040| 69 74 79 20 74 68 61 74 | 20 75 73 65 73 20 67 65 |ity that| uses ge|
|00001050| 74 68 6f 73 74 62 79 6e | 61 6d 65 28 33 29 20 73 |thostbyn|ame(3) s|
|00001060| 65 65 73 2e 0a 58 20 2a | 0a 58 20 2a 09 55 73 69 |ees..X *|.X *.Usi|
|00001070| 6e 67 20 6e 73 6c 6f 6f | 6b 75 70 20 61 6c 6f 6e |ng nsloo|kup alon|
|00001080| 65 20 63 61 6e 20 6f 66 | 74 65 6e 20 67 69 76 65 |e can of|ten give|
|00001090| 20 79 6f 75 20 61 20 66 | 61 6c 73 65 20 73 65 6e | you a f|alse sen|
|000010a0| 73 65 20 6f 66 20 73 65 | 63 75 72 69 74 79 2e 0a |se of se|curity..|
|000010b0| 58 20 2a 0a 58 20 2a 09 | 55 73 61 67 65 3a 20 68 |X *.X *.|Usage: h|
|000010c0| 6f 73 74 65 6e 74 20 7b | 68 6f 73 74 6e 61 6d 65 |ostent {|hostname|
|000010d0| 20 7c 20 61 64 64 72 65 | 73 73 7d 0a 58 20 2a 0a | | addre|ss}.X *.|
|000010e0| 58 20 2a 09 50 2e 20 42 | 6c 61 6e 63 68 66 69 65 |X *.P. B|lanchfie|
|000010f0| 6c 64 20 3c 70 68 69 6c | 40 64 67 62 74 2e 64 6f |ld <phil|@dgbt.do|
|00001100| 63 2e 63 61 3e 0a 58 20 | 2a 09 54 68 65 20 43 6f |c.ca>.X |*.The Co|
|00001110| 6d 6d 75 6e 69 63 61 74 | 69 6f 6e 73 20 52 65 73 |mmunicat|ions Res|
|00001120| 65 61 72 63 68 20 43 65 | 6e 74 72 65 0a 58 20 2a |earch Ce|ntre.X *|
|00001130| 2f 0a 58 0a 58 23 69 6e | 63 6c 75 64 65 20 3c 73 |/.X.X#in|clude <s|
|00001140| 74 64 69 6f 2e 68 3e 0a | 58 23 69 6e 63 6c 75 64 |tdio.h>.|X#includ|
|00001150| 65 20 3c 73 79 73 2f 74 | 79 70 65 73 2e 68 3e 0a |e <sys/t|ypes.h>.|
|00001160| 58 23 69 6e 63 6c 75 64 | 65 20 3c 73 79 73 2f 73 |X#includ|e <sys/s|
|00001170| 6f 63 6b 65 74 2e 68 3e | 0a 58 23 69 6e 63 6c 75 |ocket.h>|.X#inclu|
|00001180| 64 65 20 3c 6e 65 74 64 | 62 2e 68 3e 0a 58 0a 58 |de <netd|b.h>.X.X|
|00001190| 6d 61 69 6e 28 61 72 67 | 63 2c 61 72 67 76 29 0a |main(arg|c,argv).|
|000011a0| 58 63 68 61 72 20 2a 2a | 61 72 67 76 3b 0a 58 7b |Xchar **|argv;.X{|
|000011b0| 0a 58 09 73 74 72 75 63 | 74 20 68 6f 73 74 65 6e |.X.struc|t hosten|
|000011c0| 74 20 2a 67 65 74 68 6f | 73 74 62 79 61 64 64 72 |t *getho|stbyaddr|
|000011d0| 28 29 2c 20 2a 67 65 74 | 68 6f 73 74 62 79 6e 61 |(), *get|hostbyna|
|000011e0| 6d 65 28 29 2c 20 2a 70 | 32 68 6f 73 74 65 6e 74 |me(), *p|2hostent|
|000011f0| 3b 0a 58 09 69 6e 74 20 | 69 61 64 64 72 5b 34 5d |;.X.int |iaddr[4]|
|00001200| 3b 09 2f 2a 20 73 63 61 | 6e 66 20 63 61 6e 20 6f |;./* sca|nf can o|
|00001210| 6e 6c 79 20 63 6f 6e 76 | 65 72 74 20 69 6e 74 65 |nly conv|ert inte|
|00001220| 67 65 72 73 20 2a 2f 0a | 58 09 63 68 61 72 20 61 |gers */.|X.char a|
|00001230| 64 64 72 5b 34 5d 3b 09 | 2f 2a 20 62 75 74 20 77 |ddr[4];.|/* but w|
|00001240| 65 20 77 69 6c 6c 20 6e | 65 65 64 20 74 68 65 6d |e will n|eed them|
|00001250| 20 61 73 20 62 79 74 65 | 73 20 2a 2f 0a 58 09 69 | as byte|s */.X.i|
|00001260| 6e 74 20 6c 65 6e 3b 0a | 58 0a 58 20 09 69 66 28 |nt len;.|X.X .if(|
|00001270| 20 61 72 67 63 20 21 3d | 20 32 20 29 0a 58 09 7b | argc !=| 2 ).X.{|
|00001280| 0a 58 09 20 66 70 72 69 | 6e 74 66 28 73 74 64 65 |.X. fpri|ntf(stde|
|00001290| 72 72 2c 22 55 73 61 67 | 65 3a 20 25 73 20 7b 68 |rr,"Usag|e: %s {h|
|000012a0| 6f 73 74 6e 61 6d 65 20 | 7c 20 61 64 64 72 65 73 |ostname || addres|
|000012b0| 73 7d 5c 6e 22 2c 61 72 | 67 76 5b 30 5d 29 3b 0a |s}\n",ar|gv[0]);.|
|000012c0| 58 09 20 65 78 69 74 28 | 31 29 3b 0a 58 09 7d 0a |X. exit(|1);.X.}.|
|000012d0| 58 0a 58 09 69 66 28 20 | 28 2a 61 72 67 76 5b 31 |X.X.if( |(*argv[1|
|000012e0| 5d 20 3e 20 27 30 27 29 | 20 26 26 20 28 2a 61 72 |] > '0')| && (*ar|
|000012f0| 67 76 5b 31 5d 20 3c 20 | 27 39 27 29 20 29 09 2f |gv[1] < |'9') )./|
|00001300| 2a 20 6e 61 6d 65 20 6f | 72 20 6e 75 6d 62 65 72 |* name o|r number|
|00001310| 3f 20 2a 2f 0a 58 09 7b | 20 2f 2a 20 6e 75 6d 62 |? */.X.{| /* numb|
|00001320| 65 72 20 2a 2f 0a 58 09 | 20 20 73 73 63 61 6e 66 |er */.X.| sscanf|
|00001330| 28 61 72 67 76 5b 31 5d | 2c 22 25 64 2e 25 64 2e |(argv[1]|,"%d.%d.|
|00001340| 25 64 2e 25 64 22 2c 26 | 69 61 64 64 72 5b 30 5d |%d.%d",&|iaddr[0]|
|00001350| 2c 26 69 61 64 64 72 5b | 31 5d 2c 26 69 61 64 64 |,&iaddr[|1],&iadd|
|00001360| 72 5b 32 5d 2c 26 69 61 | 64 64 72 5b 33 5d 29 3b |r[2],&ia|ddr[3]);|
|00001370| 0a 58 09 20 20 61 64 64 | 72 5b 30 5d 20 3d 20 28 |.X. add|r[0] = (|
|00001380| 63 68 61 72 29 20 69 61 | 64 64 72 5b 30 5d 3b 0a |char) ia|ddr[0];.|
|00001390| 58 09 20 20 61 64 64 72 | 5b 31 5d 20 3d 20 28 63 |X. addr|[1] = (c|
|000013a0| 68 61 72 29 20 69 61 64 | 64 72 5b 31 5d 3b 0a 58 |har) iad|dr[1];.X|
|000013b0| 09 20 20 61 64 64 72 5b | 32 5d 20 3d 20 28 63 68 |. addr[|2] = (ch|
|000013c0| 61 72 29 20 69 61 64 64 | 72 5b 32 5d 3b 0a 58 09 |ar) iadd|r[2];.X.|
|000013d0| 20 20 61 64 64 72 5b 33 | 5d 20 3d 20 28 63 68 61 | addr[3|] = (cha|
|000013e0| 72 29 20 69 61 64 64 72 | 5b 33 5d 3b 0a 58 09 20 |r) iaddr|[3];.X. |
|000013f0| 20 70 32 68 6f 73 74 65 | 6e 74 20 3d 20 67 65 74 | p2hoste|nt = get|
|00001400| 68 6f 73 74 62 79 61 64 | 64 72 28 61 64 64 72 2c |hostbyad|dr(addr,|
|00001410| 20 34 2c 20 41 46 5f 49 | 4e 45 54 29 3b 0a 58 09 | 4, AF_I|NET);.X.|
|00001420| 7d 0a 58 09 65 6c 73 65 | 20 2f 2a 20 6e 61 6d 65 |}.X.else| /* name|
|00001430| 20 2a 2f 0a 58 09 20 20 | 70 32 68 6f 73 74 65 6e | */.X. |p2hosten|
|00001440| 74 20 3d 20 67 65 74 68 | 6f 73 74 62 79 6e 61 6d |t = geth|ostbynam|
|00001450| 65 28 61 72 67 76 5b 31 | 5d 29 3b 0a 58 0a 58 09 |e(argv[1|]);.X.X.|
|00001460| 69 66 28 20 70 32 68 6f | 73 74 65 6e 74 20 3d 3d |if( p2ho|stent ==|
|00001470| 20 4e 55 4c 4c 20 29 0a | 58 09 7b 0a 58 09 09 66 | NULL ).|X.{.X..f|
|00001480| 70 72 69 6e 74 66 28 73 | 74 64 65 72 72 2c 22 4c |printf(s|tderr,"L|
|00001490| 6f 6f 6b 75 70 20 66 61 | 69 6c 75 72 65 20 6f 6e |ookup fa|ilure on|
|000014a0| 20 68 6f 73 74 20 5c 22 | 25 73 5c 22 5c 6e 22 2c | host \"|%s\"\n",|
|000014b0| 61 72 67 76 5b 31 5d 29 | 3b 0a 58 09 09 65 78 69 |argv[1])|;.X..exi|
|000014c0| 74 28 31 29 3b 0a 58 09 | 7d 0a 58 0a 58 09 2f 2a |t(1);.X.|}.X.X./*|
|000014d0| 20 61 6c 6c 20 69 73 20 | 77 65 6c 6c 2c 20 70 72 | all is |well, pr|
|000014e0| 69 6e 74 20 74 68 65 20 | 65 6e 74 72 79 20 2a 2f |int the |entry */|
|000014f0| 0a 58 0a 58 09 70 72 69 | 6e 74 5f 68 6f 73 74 65 |.X.X.pri|nt_hoste|
|00001500| 6e 74 72 79 28 70 32 68 | 6f 73 74 65 6e 74 29 3b |ntry(p2h|ostent);|
|00001510| 0a 58 0a 58 7d 0a 58 0a | 58 2f 2a 20 46 75 6e 63 |.X.X}.X.|X/* Func|
|00001520| 74 69 6f 6e 20 74 6f 20 | 70 72 69 6e 74 20 61 20 |tion to |print a |
|00001530| 22 68 6f 73 74 65 6e 74 | 22 20 73 74 72 75 63 74 |"hostent|" struct|
|00001540| 75 72 65 20 2a 2f 0a 58 | 0a 58 70 72 69 6e 74 5f |ure */.X|.Xprint_|
|00001550| 68 6f 73 74 65 6e 74 72 | 79 28 70 32 68 6f 73 74 |hostentr|y(p2host|
|00001560| 65 6e 74 29 0a 58 73 74 | 72 75 63 74 20 68 6f 73 |ent).Xst|ruct hos|
|00001570| 74 65 6e 74 20 2a 70 32 | 68 6f 73 74 65 6e 74 3b |tent *p2|hostent;|
|00001580| 0a 58 7b 20 0a 58 0a 58 | 09 69 6e 74 20 69 2c 6a |.X{ .X.X|.int i,j|
|00001590| 3b 0a 58 09 63 68 61 72 | 20 2a 6e 6f 6e 65 3b 0a |;.X.char| *none;.|
|000015a0| 58 0a 58 09 2f 2a 20 4f | 66 66 69 63 69 61 6c 20 |X.X./* O|fficial |
|000015b0| 6e 61 6d 65 20 2a 2f 0a | 58 0a 58 09 70 72 69 6e |name */.|X.X.prin|
|000015c0| 74 66 28 22 43 61 6e 6e | 6f 6e 69 63 61 6c 20 28 |tf("Cann|onical (|
|000015d0| 4f 66 66 69 63 69 61 6c | 29 20 68 6f 73 74 6e 61 |Official|) hostna|
|000015e0| 6d 65 20 3d 20 25 73 5c | 6e 5c 6e 22 2c 70 32 68 |me = %s\|n\n",p2h|
|000015f0| 6f 73 74 65 6e 74 2d 3e | 68 5f 6e 61 6d 65 29 3b |ostent->|h_name);|
|00001600| 0a 58 0a 58 09 2f 2a 20 | 6c 69 73 74 20 6f 66 20 |.X.X./* |list of |
|00001610| 61 6c 69 61 73 65 73 20 | 2a 2f 0a 58 0a 58 09 69 |aliases |*/.X.X.i|
|00001620| 66 28 70 32 68 6f 73 74 | 65 6e 74 2d 3e 68 5f 61 |f(p2host|ent->h_a|
|00001630| 6c 69 61 73 65 73 5b 30 | 5d 29 20 6e 6f 6e 65 20 |liases[0|]) none |
|00001640| 3d 20 22 22 3b 20 65 6c | 73 65 20 6e 6f 6e 65 20 |= ""; el|se none |
|00001650| 3d 20 22 20 3c 4e 4f 4e | 45 20 45 58 49 53 54 3e |= " <NON|E EXIST>|
|00001660| 22 3b 0a 58 09 70 72 69 | 6e 74 66 28 22 4c 69 73 |";.X.pri|ntf("Lis|
|00001670| 74 20 6f 66 20 61 6c 69 | 61 73 65 73 3a 25 73 5c |t of ali|ases:%s\|
|00001680| 6e 5c 6e 22 2c 6e 6f 6e | 65 29 3b 0a 58 0a 58 09 |n\n",non|e);.X.X.|
|00001690| 66 6f 72 28 69 3d 30 3b | 70 32 68 6f 73 74 65 6e |for(i=0;|p2hosten|
|000016a0| 74 2d 3e 68 5f 61 6c 69 | 61 73 65 73 5b 69 5d 3b |t->h_ali|ases[i];|
|000016b0| 69 2b 2b 29 0a 58 09 20 | 20 70 72 69 6e 74 66 28 |i++).X. | printf(|
|000016c0| 22 61 6c 69 61 73 23 20 | 25 64 20 20 3d 20 25 73 |"alias# |%d = %s|
|000016d0| 5c 6e 22 2c 69 2c 70 32 | 68 6f 73 74 65 6e 74 2d |\n",i,p2|hostent-|
|000016e0| 3e 68 5f 61 6c 69 61 73 | 65 73 5b 69 5d 29 3b 0a |>h_alias|es[i]);.|
|000016f0| 58 09 70 72 69 6e 74 66 | 28 22 5c 6e 22 29 3b 0a |X.printf|("\n");.|
|00001700| 58 0a 58 09 2f 2a 20 70 | 72 69 6e 74 20 6f 75 74 |X.X./* p|rint out|
|00001710| 20 74 68 65 20 6c 69 73 | 74 20 6f 66 20 61 64 64 | the lis|t of add|
|00001720| 72 65 73 73 65 73 20 2a | 2f 0a 58 0a 58 09 70 72 |resses *|/.X.X.pr|
|00001730| 69 6e 74 66 28 22 4c 69 | 73 74 20 6f 66 20 49 50 |intf("Li|st of IP|
|00001740| 20 61 64 64 72 65 73 73 | 65 73 3a 5c 6e 5c 6e 22 | address|es:\n\n"|
|00001750| 29 3b 0a 58 0a 58 09 66 | 6f 72 28 69 3d 30 3b 70 |);.X.X.f|or(i=0;p|
|00001760| 32 68 6f 73 74 65 6e 74 | 2d 3e 68 5f 61 64 64 72 |2hostent|->h_addr|
|00001770| 5f 6c 69 73 74 5b 69 5d | 3b 69 2b 2b 29 0a 58 09 |_list[i]|;i++).X.|
|00001780| 7b 0a 58 09 20 20 70 72 | 69 6e 74 66 28 22 61 64 |{.X. pr|intf("ad|
|00001790| 64 72 65 73 73 23 20 25 | 64 20 20 3d 20 22 2c 69 |dress# %|d = ",i|
|000017a0| 29 3b 0a 58 09 20 20 66 | 6f 72 28 6a 3d 30 3b 6a |);.X. f|or(j=0;j|
|000017b0| 3c 33 3b 6a 2b 2b 29 0a | 58 09 20 20 20 20 70 72 |<3;j++).|X. pr|
|000017c0| 69 6e 74 66 28 22 25 75 | 2e 22 2c 28 75 6e 73 69 |intf("%u|.",(unsi|
|000017d0| 67 6e 65 64 20 63 68 61 | 72 29 70 32 68 6f 73 74 |gned cha|r)p2host|
|000017e0| 65 6e 74 2d 3e 68 5f 61 | 64 64 72 5f 6c 69 73 74 |ent->h_a|ddr_list|
|000017f0| 5b 69 5d 5b 6a 5d 29 3b | 0a 58 09 20 20 70 72 69 |[i][j]);|.X. pri|
|00001800| 6e 74 66 28 22 25 75 5c | 6e 22 2c 28 75 6e 73 69 |ntf("%u\|n",(unsi|
|00001810| 67 6e 65 64 20 63 68 61 | 72 29 70 32 68 6f 73 74 |gned cha|r)p2host|
|00001820| 65 6e 74 2d 3e 68 5f 61 | 64 64 72 5f 6c 69 73 74 |ent->h_a|ddr_list|
|00001830| 5b 69 5d 5b 6a 5d 29 3b | 0a 58 09 7d 0a 58 0a 58 |[i][j]);|.X.}.X.X|
|00001840| 7d 0a 45 4e 44 5f 4f 46 | 5f 46 49 4c 45 0a 69 66 |}.END_OF|_FILE.if|
|00001850| 20 74 65 73 74 20 32 31 | 33 30 20 2d 6e 65 20 60 | test 21|30 -ne `|
|00001860| 77 63 20 2d 63 20 3c 27 | 68 6f 73 74 65 6e 74 2e |wc -c <'|hostent.|
|00001870| 63 27 60 3b 20 74 68 65 | 6e 0a 20 20 20 20 65 63 |c'`; the|n. ec|
|00001880| 68 6f 20 73 68 61 72 3a | 20 5c 22 27 68 6f 73 74 |ho shar:| \"'host|
|00001890| 65 6e 74 2e 63 27 5c 22 | 20 75 6e 70 61 63 6b 65 |ent.c'\"| unpacke|
|000018a0| 64 20 77 69 74 68 20 77 | 72 6f 6e 67 20 73 69 7a |d with w|rong siz|
|000018b0| 65 21 0a 66 69 0a 23 20 | 65 6e 64 20 6f 66 20 27 |e!.fi.# |end of '|
|000018c0| 68 6f 73 74 65 6e 74 2e | 63 27 0a 66 69 0a 69 66 |hostent.|c'.fi.if|
|000018d0| 20 74 65 73 74 20 2d 66 | 20 27 4d 61 6b 65 66 69 | test -f| 'Makefi|
|000018e0| 6c 65 27 20 2d 61 20 22 | 24 7b 31 7d 22 20 21 3d |le' -a "|${1}" !=|
|000018f0| 20 22 2d 63 22 20 3b 20 | 74 68 65 6e 20 0a 20 20 | "-c" ; |then . |
|00001900| 65 63 68 6f 20 73 68 61 | 72 3a 20 57 69 6c 6c 20 |echo sha|r: Will |
|00001910| 6e 6f 74 20 63 6c 6f 62 | 62 65 72 20 65 78 69 73 |not clob|ber exis|
|00001920| 74 69 6e 67 20 66 69 6c | 65 20 5c 22 27 4d 61 6b |ting fil|e \"'Mak|
|00001930| 65 66 69 6c 65 27 5c 22 | 0a 65 6c 73 65 0a 65 63 |efile'\"|.else.ec|
|00001940| 68 6f 20 73 68 61 72 3a | 20 45 78 74 72 61 63 74 |ho shar:| Extract|
|00001950| 69 6e 67 20 5c 22 27 4d | 61 6b 65 66 69 6c 65 27 |ing \"'M|akefile'|
|00001960| 5c 22 20 5c 28 31 32 33 | 36 20 63 68 61 72 61 63 |\" \(123|6 charac|
|00001970| 74 65 72 73 5c 29 0a 73 | 65 64 20 22 73 2f 5e 58 |ters\).s|ed "s/^X|
|00001980| 2f 2f 22 20 3e 27 4d 61 | 6b 65 66 69 6c 65 27 20 |//" >'Ma|kefile' |
|00001990| 3c 3c 27 45 4e 44 5f 4f | 46 5f 46 49 4c 45 27 0a |<<'END_O|F_FILE'.|
|000019a0| 58 23 0a 58 23 20 54 6f | 20 75 73 65 20 74 68 69 |X#.X# To| use thi|
|000019b0| 73 20 4d 61 6b 65 66 69 | 6c 65 20 79 6f 75 20 6d |s Makefi|le you m|
|000019c0| 75 73 74 20 66 69 72 73 | 74 20 66 69 6c 6c 20 69 |ust firs|t fill i|
|000019d0| 6e 20 74 68 65 20 63 6f | 6e 66 69 67 75 72 61 74 |n the co|nfigurat|
|000019e0| 69 6f 6e 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 0a |ion info|rmation.|
|000019f0| 58 23 20 62 65 6c 6f 77 | 2e 0a 58 23 0a 58 23 20 |X# below|..X#.X# |
|00001a00| 54 6f 20 63 6f 6d 70 69 | 6c 65 20 61 6e 64 20 6c |To compi|le and l|
|00001a10| 69 6e 6b 3a 0a 58 23 20 | 6d 61 6b 65 0a 58 23 0a |ink:.X# |make.X#.|
|00001a20| 58 23 20 54 6f 20 69 6e | 73 74 61 6c 6c 3a 0a 58 |X# To in|stall:.X|
|00001a30| 23 20 6d 61 6b 65 20 69 | 6e 73 74 61 6c 6c 0a 58 |# make i|nstall.X|
|00001a40| 23 0a 58 23 20 54 6f 20 | 75 6e 69 6e 73 74 61 6c |#.X# To |uninstal|
|00001a50| 6c 20 28 72 65 6d 6f 76 | 65 29 3a 0a 58 23 20 6d |l (remov|e):.X# m|
|00001a60| 61 6b 65 20 75 6e 69 6e | 73 74 61 6c 6c 0a 58 23 |ake unin|stall.X#|
|00001a70| 0a 58 23 20 54 6f 20 63 | 6c 65 61 6e 20 75 70 20 |.X# To c|lean up |
|00001a80| 61 66 74 65 72 20 74 68 | 65 20 62 75 69 6c 64 20 |after th|e build |
|00001a90| 74 79 70 65 3a 0a 58 23 | 20 6d 61 6b 65 20 63 6c |type:.X#| make cl|
|00001aa0| 65 61 6e 0a 58 23 0a 58 | 0a 58 23 20 53 54 41 52 |ean.X#.X|.X# STAR|
|00001ab0| 54 20 4f 46 20 43 4f 4e | 46 49 47 55 52 41 54 49 |T OF CON|FIGURATI|
|00001ac0| 4f 4e 20 41 52 45 41 0a | 58 0a 58 23 20 43 68 61 |ON AREA.|X.X# Cha|
|00001ad0| 6e 67 65 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |nge the |followin|
|00001ae0| 67 20 74 6f 20 74 68 65 | 20 6e 61 6d 65 20 6f 66 |g to the| name of|
|00001af0| 20 79 6f 75 72 20 70 72 | 6f 67 72 61 6d 2e 0a 58 | your pr|ogram..X|
|00001b00| 23 20 49 66 20 79 6f 75 | 72 20 70 72 6f 67 72 61 |# If you|r progra|
|00001b10| 6d 20 73 6f 75 72 63 65 | 20 69 73 20 63 61 6c 6c |m source| is call|
|00001b20| 65 64 20 70 72 6f 67 2e | 63 20 69 74 20 77 6f 75 |ed prog.|c it wou|
|00001b30| 6c 64 20 62 65 3a 0a 58 | 23 20 50 52 4f 47 4e 41 |ld be:.X|# PROGNA|
|00001b40| 4d 45 3d 70 72 6f 67 0a | 58 0a 58 50 52 4f 47 4e |ME=prog.|X.XPROGN|
|00001b50| 41 4d 45 3d 68 6f 73 74 | 65 6e 74 0a 58 0a 58 23 |AME=host|ent.X.X#|
|00001b60| 20 57 68 65 72 65 20 74 | 6f 20 69 6e 73 74 61 6c | Where t|o instal|
|00001b70| 6c 20 74 68 65 20 62 69 | 6e 61 72 79 0a 58 42 49 |l the bi|nary.XBI|
|00001b80| 4e 44 49 52 20 3d 20 2f | 75 73 72 2f 6c 6f 63 61 |NDIR = /|usr/loca|
|00001b90| 6c 2f 62 69 6e 0a 58 0a | 58 23 20 57 68 65 72 65 |l/bin.X.|X# Where|
|00001ba0| 20 74 6f 20 69 6e 73 74 | 61 6c 6c 20 74 68 65 20 | to inst|all the |
|00001bb0| 6d 61 6e 75 61 6c 20 70 | 61 67 65 2e 0a 58 4d 41 |manual p|age..XMA|
|00001bc0| 4e 44 49 52 20 3d 20 2f | 75 73 72 2f 6c 6f 63 61 |NDIR = /|usr/loca|
|00001bd0| 6c 2f 6d 61 6e 2f 6d 61 | 6e 31 0a 58 0a 58 23 20 |l/man/ma|n1.X.X# |
|00001be0| 63 63 20 66 6c 61 67 73 | 20 28 6f 70 74 69 6f 6e |cc flags| (option|
|00001bf0| 73 20 77 68 69 63 68 20 | 77 69 6c 6c 20 62 65 20 |s which |will be |
|00001c00| 75 73 65 64 20 62 79 20 | 74 68 65 20 63 20 63 6f |used by |the c co|
|00001c10| 6d 70 69 6c 65 72 29 0a | 58 23 20 56 61 72 69 6f |mpiler).|X# Vario|
|00001c20| 75 73 20 22 6c 6f 63 61 | 6c 22 20 69 6e 63 6c 75 |us "loca|l" inclu|
|00001c30| 64 65 20 66 69 6c 65 73 | 20 6e 65 65 64 20 2d 49 |de files| need -I|
|00001c40| 2f 75 73 72 2f 6c 6f 63 | 61 6c 2f 69 6e 63 6c 75 |/usr/loc|al/inclu|
|00001c50| 64 65 0a 58 23 20 6d 6f | 73 74 20 58 31 31 20 61 |de.X# mo|st X11 a|
|00001c60| 70 70 6c 69 63 61 74 69 | 6f 6e 73 20 77 69 6c 6c |pplicati|ons will|
|00001c70| 20 6e 65 65 64 20 2d 49 | 2f 75 73 72 2f 6f 70 65 | need -I|/usr/ope|
|00001c80| 6e 77 69 6e 2f 69 6e 63 | 6c 75 64 65 2f 58 31 31 |nwin/inc|lude/X11|
|00001c90| 0a 58 0a 58 43 46 4c 41 | 47 53 3d 20 2d 4f 0a 58 |.X.XCFLA|GS= -O.X|
|00001ca0| 0a 58 23 20 43 20 63 6f | 6d 70 69 6c 65 72 20 74 |.X# C co|mpiler t|
|00001cb0| 6f 20 75 73 65 2e 0a 58 | 23 20 63 63 20 62 79 20 |o use..X|# cc by |
|00001cc0| 64 65 66 61 75 6c 74 2c | 20 66 6f 72 20 67 63 63 |default,| for gcc|
|00001cd0| 20 28 47 4e 55 20 43 29 | 20 75 6e 63 6f 6d 6d 65 | (GNU C)| uncomme|
|00001ce0| 6e 74 20 74 68 65 20 6e | 65 78 74 20 6c 69 6e 65 |nt the n|ext line|
|00001cf0| 0a 58 23 43 43 3d 67 63 | 63 0a 58 0a 58 23 20 6c |.X#CC=gc|c.X.X# l|
|00001d00| 69 6e 6b 65 72 20 66 6c | 61 67 73 2e 0a 58 0a 58 |inker fl|ags..X.X|
|00001d10| 4c 44 46 4c 41 47 53 3d | 20 0a 58 0a 58 23 20 45 |LDFLAGS=| .X.X# E|
|00001d20| 4e 44 20 4f 46 20 43 4f | 4e 46 49 47 55 52 41 54 |ND OF CO|NFIGURAT|
|00001d30| 49 4f 4e 20 41 52 45 41 | 0a 58 0a 58 24 28 50 52 |ION AREA|.X.X$(PR|
|00001d40| 4f 47 4e 41 4d 45 29 3a | 20 24 28 50 52 4f 47 4e |OGNAME):| $(PROGN|
|00001d50| 41 4d 45 29 2e 6f 0a 58 | 09 24 28 43 43 29 20 24 |AME).o.X|.$(CC) $|
|00001d60| 28 50 52 4f 47 4e 41 4d | 45 29 2e 6f 20 2d 6f 20 |(PROGNAM|E).o -o |
|00001d70| 24 28 50 52 4f 47 4e 41 | 4d 45 29 20 24 28 4c 44 |$(PROGNA|ME) $(LD|
|00001d80| 46 4c 41 47 53 29 0a 58 | 0a 58 69 6e 73 74 61 6c |FLAGS).X|.Xinstal|
|00001d90| 6c 3a 0a 58 09 69 6e 73 | 74 61 6c 6c 20 24 28 50 |l:.X.ins|tall $(P|
|00001da0| 52 4f 47 4e 41 4d 45 29 | 20 24 28 42 49 4e 44 49 |ROGNAME)| $(BINDI|
|00001db0| 52 29 0a 58 09 2d 63 70 | 20 24 28 50 52 4f 47 4e |R).X.-cp| $(PROGN|
|00001dc0| 41 4d 45 29 2e 31 20 24 | 28 4d 41 4e 44 49 52 29 |AME).1 $|(MANDIR)|
|00001dd0| 0a 58 09 40 65 63 68 6f | 0a 58 09 40 65 63 68 6f |.X.@echo|.X.@echo|
|00001de0| 20 22 20 20 20 20 20 20 | 49 66 20 74 68 69 73 20 | " |If this |
|00001df0| 69 73 20 74 68 65 20 66 | 69 72 73 74 20 74 69 6d |is the f|irst tim|
|00001e00| 65 20 74 68 61 74 20 79 | 6f 75 20 68 61 76 65 20 |e that y|ou have |
|00001e10| 62 75 69 6c 74 20 74 68 | 69 73 20 70 72 6f 67 72 |built th|is progr|
|00001e20| 61 6d 22 0a 58 09 40 65 | 63 68 6f 20 22 20 20 20 |am".X.@e|cho " |
|00001e30| 20 20 20 79 6f 75 20 6d | 75 73 74 20 6e 6f 77 20 | you m|ust now |
|00001e40| 74 79 70 65 20 5c 22 72 | 65 68 61 73 68 5c 22 2e |type \"r|ehash\".|
|00001e50| 22 0a 58 09 40 65 63 68 | 6f 0a 58 0a 58 75 6e 69 |".X.@ech|o.X.Xuni|
|00001e60| 6e 73 74 61 6c 6c 3a 0a | 58 09 72 6d 20 2d 66 20 |nstall:.|X.rm -f |
|00001e70| 24 28 42 49 4e 44 49 52 | 29 2f 24 28 50 52 4f 47 |$(BINDIR|)/$(PROG|
|00001e80| 4e 41 4d 45 29 0a 58 0a | 58 63 6c 65 61 6e 3a 0a |NAME).X.|Xclean:.|
|00001e90| 58 09 72 6d 20 2d 66 20 | 24 28 50 52 4f 47 4e 41 |X.rm -f |$(PROGNA|
|00001ea0| 4d 45 29 2e 6f 20 24 28 | 50 52 4f 47 4e 41 4d 45 |ME).o $(|PROGNAME|
|00001eb0| 29 0a 58 0a 45 4e 44 5f | 4f 46 5f 46 49 4c 45 0a |).X.END_|OF_FILE.|
|00001ec0| 69 66 20 74 65 73 74 20 | 31 32 33 36 20 2d 6e 65 |if test |1236 -ne|
|00001ed0| 20 60 77 63 20 2d 63 20 | 3c 27 4d 61 6b 65 66 69 | `wc -c |<'Makefi|
|00001ee0| 6c 65 27 60 3b 20 74 68 | 65 6e 0a 20 20 20 20 65 |le'`; th|en. e|
|00001ef0| 63 68 6f 20 73 68 61 72 | 3a 20 5c 22 27 4d 61 6b |cho shar|: \"'Mak|
|00001f00| 65 66 69 6c 65 27 5c 22 | 20 75 6e 70 61 63 6b 65 |efile'\"| unpacke|
|00001f10| 64 20 77 69 74 68 20 77 | 72 6f 6e 67 20 73 69 7a |d with w|rong siz|
|00001f20| 65 21 0a 66 69 0a 23 20 | 65 6e 64 20 6f 66 20 27 |e!.fi.# |end of '|
|00001f30| 4d 61 6b 65 66 69 6c 65 | 27 0a 66 69 0a 65 63 68 |Makefile|'.fi.ech|
|00001f40| 6f 20 73 68 61 72 3a 20 | 45 6e 64 20 6f 66 20 73 |o shar: |End of s|
|00001f50| 68 65 6c 6c 20 61 72 63 | 68 69 76 65 2e 0a 65 78 |hell arc|hive..ex|
|00001f60| 69 74 20 30 0a 0a 23 2d | 2d 20 0a 23 50 68 69 6c |it 0..#-|- .#Phil|
|00001f70| 20 42 6c 61 6e 63 68 66 | 69 65 6c 64 0a 23 54 68 | Blanchf|ield.#Th|
|00001f80| 65 20 43 6f 6d 6d 75 6e | 69 63 61 74 69 6f 6e 73 |e Commun|ications|
|00001f90| 20 52 65 73 65 61 72 63 | 68 20 43 65 6e 74 72 65 | Researc|h Centre|
|00001fa0| 20 33 37 30 31 20 43 61 | 72 6c 69 6e 67 20 41 76 | 3701 Ca|rling Av|
|00001fb0| 65 6e 75 65 2c 20 4f 74 | 74 61 77 61 20 4f 6e 74 |enue, Ot|tawa Ont|
|00001fc0| 61 72 69 6f 20 43 41 4e | 41 44 41 0a 23 49 6e 74 |ario CAN|ADA.#Int|
|00001fd0| 65 72 6e 65 74 3a 20 50 | 68 69 6c 2e 42 6c 61 6e |ernet: P|hil.Blan|
|00001fe0| 63 68 66 69 65 6c 64 40 | 43 52 43 2e 44 4f 43 2e |chfield@|CRC.DOC.|
|00001ff0| 43 41 0a | |CA. | |
+--------+-------------------------+-------------------------+--------+--------+