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| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 73 6f 75 72 63 65 73 | 2e 75 6e 69 78 0a 46 72 |.sources|.unix.Fr|
|00000020| 6f 6d 3a 20 6e 69 63 6b | 65 6c 40 63 73 2e 74 75 |om: nick|el@cs.tu|
|00000030| 2d 62 65 72 6c 69 6e 2e | 64 65 20 28 4a 75 65 72 |-berlin.|de (Juer|
|00000040| 67 65 6e 20 4e 69 63 6b | 65 6c 73 65 6e 29 0a 53 |gen Nick|elsen).S|
|00000050| 75 62 6a 65 63 74 3a 20 | 76 32 36 69 30 37 35 3a |ubject: |v26i075:|
|00000060| 20 73 6f 63 6b 65 74 20 | 2d 20 73 68 65 6c 6c 2d | socket |- shell-|
|00000070| 6c 65 76 65 6c 20 69 6e | 74 65 72 66 61 63 65 20 |level in|terface |
|00000080| 74 6f 20 49 50 2f 54 43 | 50 20 73 6f 63 6b 65 74 |to IP/TC|P socket|
|00000090| 73 20 28 56 31 2e 31 29 | 0a 53 65 6e 64 65 72 3a |s (V1.1)|.Sender:|
|000000a0| 20 75 6e 69 78 2d 73 6f | 75 72 63 65 73 2d 6d 6f | unix-so|urces-mo|
|000000b0| 64 65 72 61 74 6f 72 40 | 70 61 2e 64 65 63 2e 63 |derator@|pa.dec.c|
|000000c0| 6f 6d 0a 41 70 70 72 6f | 76 65 64 3a 20 76 69 78 |om.Appro|ved: vix|
|000000d0| 69 65 40 70 61 2e 64 65 | 63 2e 63 6f 6d 0a 0a 53 |ie@pa.de|c.com..S|
|000000e0| 75 62 6d 69 74 74 65 64 | 2d 42 79 3a 20 6e 69 63 |ubmitted|-By: nic|
|000000f0| 6b 65 6c 40 63 73 2e 74 | 75 2d 62 65 72 6c 69 6e |kel@cs.t|u-berlin|
|00000100| 2e 64 65 20 28 4a 75 65 | 72 67 65 6e 20 4e 69 63 |.de (Jue|rgen Nic|
|00000110| 6b 65 6c 73 65 6e 29 0a | 50 6f 73 74 69 6e 67 2d |kelsen).|Posting-|
|00000120| 4e 75 6d 62 65 72 3a 20 | 56 6f 6c 75 6d 65 20 32 |Number: |Volume 2|
|00000130| 36 2c 20 49 73 73 75 65 | 20 37 35 0a 41 72 63 68 |6, Issue| 75.Arch|
|00000140| 69 76 65 2d 4e 61 6d 65 | 3a 20 73 6f 63 6b 65 74 |ive-Name|: socket|
|00000150| 0a 0a 54 68 69 73 20 69 | 73 20 72 65 6c 65 61 73 |..This i|s releas|
|00000160| 65 20 31 2e 31 20 6f 66 | 20 74 68 65 20 53 6f 63 |e 1.1 of| the Soc|
|00000170| 6b 65 74 28 31 29 20 70 | 72 6f 67 72 61 6d 2e 0a |ket(1) p|rogram..|
|00000180| 0a 53 6f 63 6b 65 74 28 | 31 29 20 69 6d 70 6c 65 |.Socket(|1) imple|
|00000190| 6d 65 6e 74 73 20 61 6e | 20 69 6e 74 65 72 66 61 |ments an| interfa|
|000001a0| 63 65 20 74 6f 20 54 43 | 50 20 73 6f 63 6b 65 74 |ce to TC|P socket|
|000001b0| 73 20 61 74 20 73 68 65 | 6c 6c 20 6c 65 76 65 6c |s at she|ll level|
|000001c0| 2e 20 20 43 6c 69 65 6e | 74 20 61 6e 64 0a 73 65 |. Clien|t and.se|
|000001d0| 72 76 65 72 20 73 6f 63 | 6b 65 74 73 20 63 61 6e |rver soc|kets can|
|000001e0| 20 62 65 20 75 73 65 64 | 20 66 72 6f 6d 20 73 68 | be used| from sh|
|000001f0| 65 6c 6c 20 73 63 72 69 | 70 74 73 20 6f 72 20 69 |ell scri|pts or i|
|00000200| 6e 74 65 72 61 63 74 69 | 76 65 6c 79 2e 20 20 53 |nteracti|vely. S|
|00000210| 6f 63 6b 65 74 20 63 61 | 6e 0a 61 6c 73 6f 20 72 |ocket ca|n.also r|
|00000220| 75 6e 20 61 20 70 72 6f | 67 72 61 6d 20 77 69 74 |un a pro|gram wit|
|00000230| 68 20 73 74 64 69 6e 2c | 20 73 74 64 6f 75 74 2c |h stdin,| stdout,|
|00000240| 20 61 6e 64 20 73 74 64 | 65 72 72 20 63 6f 6e 6e | and std|err conn|
|00000250| 65 63 74 65 64 20 74 6f | 20 74 68 65 20 73 6f 63 |ected to| the soc|
|00000260| 6b 65 74 0a 63 6f 6e 6e | 65 63 74 69 6f 6e 2e 20 |ket.conn|ection. |
|00000270| 20 53 61 6d 70 6c 65 20 | 73 68 65 6c 6c 20 73 63 | Sample |shell sc|
|00000280| 72 69 70 74 73 20 69 6d | 70 6c 65 6d 65 6e 74 69 |ripts im|plementi|
|00000290| 6e 67 20 61 20 66 69 6e | 67 65 72 20 63 6c 69 65 |ng a fin|ger clie|
|000002a0| 6e 74 20 28 72 65 6d 6f | 74 65 20 6f 6e 6c 79 29 |nt (remo|te only)|
|000002b0| 0a 61 6e 64 20 61 20 66 | 69 6e 67 65 72 20 64 61 |.and a f|inger da|
|000002c0| 65 6d 6f 6e 20 61 72 65 | 20 69 6e 63 6c 75 64 65 |emon are| include|
|000002d0| 64 2e 0a 0a 53 6f 63 6b | 65 74 2d 31 2e 31 20 72 |d...Sock|et-1.1 r|
|000002e0| 75 6e 73 20 6f 6e 20 74 | 68 65 73 65 20 70 6c 61 |uns on t|hese pla|
|000002f0| 74 66 6f 72 6d 73 3a 0a | 0a 20 20 2d 20 41 54 20 |tforms:.|. - AT |
|00000300| 33 38 36 2c 20 49 53 43 | 20 33 2e 30 20 20 20 20 |386, ISC| 3.0 |
|00000310| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000320| 20 28 2a 29 0a 20 20 2d | 20 43 44 43 20 34 36 38 | (*). -| CDC 468|
|00000330| 30 2c 20 45 50 2f 49 58 | 20 31 2e 34 2e 31 2e 20 |0, EP/IX| 1.4.1. |
|00000340| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 28 2a 29 | | (*)|
|00000350| 0a 20 20 2d 20 44 45 43 | 73 74 61 74 69 6f 6e 20 |. - DEC|station |
|00000360| 33 31 30 30 2c 20 55 6c | 74 72 69 78 20 34 2e 30 |3100, Ul|trix 4.0|
|00000370| 0a 20 20 2d 20 48 50 2d | 55 58 20 37 2e 30 2c 20 |. - HP-|UX 7.0, |
|00000380| 38 2e 30 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |8.0 | |
|00000390| 20 20 20 20 20 20 20 20 | 20 28 2a 29 0a 20 20 2d | | (*). -|
|000003a0| 20 49 42 4d 20 52 53 20 | 36 30 30 30 2c 20 41 49 | IBM RS |6000, AI|
|000003b0| 58 20 33 2e 31 2e 35 0a | 20 20 2d 20 4d 69 63 72 |X 3.1.5.| - Micr|
|000003c0| 6f 56 41 58 20 49 49 2c | 20 34 2e 33 20 42 53 44 |oVAX II,| 4.3 BSD|
|000003d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000003e0| 28 2a 29 0a 20 20 2d 20 | 53 47 49 20 49 72 69 73 |(*). - |SGI Iris|
|000003f0| 2c 20 49 72 69 78 20 33 | 2e 33 2e 31 0a 20 20 2d |, Irix 3|.3.1. -|
|00000400| 20 53 65 71 75 65 6e 74 | 2c 20 44 59 4e 49 58 20 | Sequent|, DYNIX |
|00000410| 76 2e 33 2e 30 2e 37 20 | 20 20 20 20 20 20 20 20 |v.3.0.7 | |
|00000420| 20 20 20 20 20 28 2a 29 | 0a 20 20 2d 20 53 75 6e | (*)|. - Sun|
|00000430| 20 53 50 41 52 43 73 74 | 61 74 69 6f 6e 20 49 49 | SPARCst|ation II|
|00000440| 2c 20 53 75 6e 4f 53 20 | 34 2e 31 2e 32 0a 20 20 |, SunOS |4.1.2. |
|00000450| 2d 20 53 79 73 74 65 6d | 20 56 20 52 65 6c 2e 20 |- System| V Rel. |
|00000460| 34 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |4 | |
|00000470| 20 20 20 20 20 20 28 2a | 29 0a 0a 54 68 65 20 70 | (*|)..The p|
|00000480| 6c 61 74 66 6f 72 6d 73 | 20 6d 61 72 6b 65 64 20 |latforms| marked |
|00000490| 77 69 74 68 20 22 28 2a | 29 22 20 72 65 71 75 69 |with "(*|)" requi|
|000004a0| 72 65 20 6d 69 6e 6f 72 | 20 65 64 69 74 69 6e 67 |re minor| editing|
|000004b0| 20 6f 66 20 74 68 65 20 | 4d 61 6b 65 66 69 6c 65 | of the |Makefile|
|000004c0| 2e 0a 0a 50 6c 65 61 73 | 65 20 73 65 6e 64 20 61 |...Pleas|e send a|
|000004d0| 6e 79 20 63 6f 6d 6d 65 | 6e 74 73 2c 20 73 75 67 |ny comme|nts, sug|
|000004e0| 67 65 73 74 69 6f 6e 73 | 2c 20 62 75 67 20 72 65 |gestions|, bug re|
|000004f0| 70 6f 72 74 73 20 65 74 | 63 2e 20 74 6f 20 6d 65 |ports et|c. to me|
|00000500| 3a 0a 0a 20 20 20 20 4a | 75 65 72 67 65 6e 20 4e |:.. J|uergen N|
|00000510| 69 63 6b 65 6c 73 65 6e | 0a 20 20 20 20 53 65 6b |ickelsen|. Sek|
|00000520| 72 2e 20 46 52 20 35 2d | 36 0a 20 20 20 20 54 55 |r. FR 5-|6. TU|
|00000530| 20 42 65 72 6c 69 6e 0a | 20 20 20 20 46 72 61 6e | Berlin.| Fran|
|00000540| 6b 6c 69 6e 73 74 72 2e | 20 32 38 2d 32 39 0a 20 |klinstr.| 28-29. |
|00000550| 20 20 20 31 30 30 30 20 | 42 65 72 6c 69 6e 20 31 | 1000 |Berlin 1|
|00000560| 30 0a 20 20 20 20 47 65 | 72 6d 61 6e 79 0a 0a 20 |0. Ge|rmany.. |
|00000570| 20 20 20 3c 6e 69 63 6b | 65 6c 40 63 73 2e 74 75 | <nick|el@cs.tu|
|00000580| 2d 62 65 72 6c 69 6e 2e | 64 65 3e 0a 0a 23 21 20 |-berlin.|de>..#! |
|00000590| 2f 62 69 6e 2f 73 68 0a | 23 20 54 68 69 73 20 69 |/bin/sh.|# This i|
|000005a0| 73 20 61 20 73 68 65 6c | 6c 20 61 72 63 68 69 76 |s a shel|l archiv|
|000005b0| 65 2e 20 20 52 65 6d 6f | 76 65 20 61 6e 79 74 68 |e. Remo|ve anyth|
|000005c0| 69 6e 67 20 62 65 66 6f | 72 65 20 74 68 69 73 20 |ing befo|re this |
|000005d0| 6c 69 6e 65 2c 20 74 68 | 65 6e 20 75 6e 70 61 63 |line, th|en unpac|
|000005e0| 6b 0a 23 20 69 74 20 62 | 79 20 73 61 76 69 6e 67 |k.# it b|y saving|
|000005f0| 20 69 74 20 69 6e 74 6f | 20 61 20 66 69 6c 65 20 | it into| a file |
|00000600| 61 6e 64 20 74 79 70 69 | 6e 67 20 22 73 68 20 66 |and typi|ng "sh f|
|00000610| 69 6c 65 22 2e 20 20 54 | 6f 20 6f 76 65 72 77 72 |ile". T|o overwr|
|00000620| 69 74 65 20 65 78 69 73 | 74 69 6e 67 0a 23 20 66 |ite exis|ting.# f|
|00000630| 69 6c 65 73 2c 20 74 79 | 70 65 20 22 73 68 20 66 |iles, ty|pe "sh f|
|00000640| 69 6c 65 20 2d 63 22 2e | 20 20 59 6f 75 20 63 61 |ile -c".| You ca|
|00000650| 6e 20 61 6c 73 6f 20 66 | 65 65 64 20 74 68 69 73 |n also f|eed this|
|00000660| 20 61 73 20 73 74 61 6e | 64 61 72 64 20 69 6e 70 | as stan|dard inp|
|00000670| 75 74 20 76 69 61 0a 23 | 20 75 6e 73 68 61 72 2c |ut via.#| unshar,|
|00000680| 20 6f 72 20 62 79 20 74 | 79 70 69 6e 67 20 22 73 | or by t|yping "s|
|00000690| 68 20 3c 66 69 6c 65 22 | 2c 20 65 2e 67 2e 2e 20 |h <file"|, e.g.. |
|000006a0| 20 49 66 20 74 68 69 73 | 20 61 72 63 68 69 76 65 | If this| archive|
|000006b0| 20 69 73 20 63 6f 6d 70 | 6c 65 74 65 2c 20 79 6f | is comp|lete, yo|
|000006c0| 75 0a 23 20 77 69 6c 6c | 20 73 65 65 20 74 68 65 |u.# will| see the|
|000006d0| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 6d 65 73 73 61 | followi|ng messa|
|000006e0| 67 65 20 61 74 20 74 68 | 65 20 65 6e 64 3a 0a 23 |ge at th|e end:.#|
|000006f0| 09 09 22 45 6e 64 20 6f | 66 20 73 68 65 6c 6c 20 |.."End o|f shell |
|00000700| 61 72 63 68 69 76 65 2e | 22 0a 23 20 43 6f 6e 74 |archive.|".# Cont|
|00000710| 65 6e 74 73 3a 20 20 42 | 4c 55 52 42 20 43 48 41 |ents: B|LURB CHA|
|00000720| 4e 47 45 53 20 43 4f 50 | 59 52 49 47 48 54 20 44 |NGES COP|YRIGHT D|
|00000730| 65 70 65 6e 64 65 6e 63 | 69 65 73 20 49 4e 53 54 |ependenc|ies INST|
|00000740| 41 4c 4c 20 4d 61 6b 65 | 66 69 6c 65 0a 23 20 20 |ALL Make|file.# |
|00000750| 20 52 45 41 44 4d 45 20 | 66 69 6e 67 65 72 64 2e | README |fingerd.|
|00000760| 73 68 20 67 6c 6f 62 61 | 6c 73 2e 68 20 69 6f 2e |sh globa|ls.h io.|
|00000770| 63 20 70 61 74 63 68 6c | 65 76 65 6c 2e 68 20 72 |c patchl|evel.h r|
|00000780| 66 69 6e 67 65 72 2e 73 | 68 20 73 69 67 6c 69 73 |finger.s|h siglis|
|00000790| 74 2e 63 0a 23 20 20 20 | 73 6f 5f 72 65 6c 65 61 |t.c.# |so_relea|
|000007a0| 73 65 2e 63 20 73 6f 63 | 6b 65 74 2e 31 20 73 6f |se.c soc|ket.1 so|
|000007b0| 63 6b 65 74 2e 63 20 73 | 6f 63 6b 65 74 70 2e 63 |cket.c s|ocketp.c|
|000007c0| 20 75 74 69 6c 73 2e 63 | 0a 23 20 57 72 61 70 70 | utils.c|.# Wrapp|
|000007d0| 65 64 20 62 79 20 76 69 | 78 69 65 40 63 6f 67 6e |ed by vi|xie@cogn|
|000007e0| 69 74 69 6f 6e 2e 70 61 | 2e 64 65 63 2e 63 6f 6d |ition.pa|.dec.com|
|000007f0| 20 6f 6e 20 57 65 64 20 | 53 65 70 20 20 39 20 31 | on Wed |Sep 9 1|
|00000800| 31 3a 32 38 3a 34 33 20 | 31 39 39 32 0a 50 41 54 |1:28:43 |1992.PAT|
|00000810| 48 3d 2f 62 69 6e 3a 2f | 75 73 72 2f 62 69 6e 3a |H=/bin:/|usr/bin:|
|00000820| 2f 75 73 72 2f 75 63 62 | 20 3b 20 65 78 70 6f 72 |/usr/ucb| ; expor|
|00000830| 74 20 50 41 54 48 0a 69 | 66 20 74 65 73 74 20 2d |t PATH.i|f test -|
|00000840| 66 20 27 42 4c 55 52 42 | 27 20 2d 61 20 22 24 7b |f 'BLURB|' -a "${|
|00000850| 31 7d 22 20 21 3d 20 22 | 2d 63 22 20 3b 20 74 68 |1}" != "|-c" ; th|
|00000860| 65 6e 20 0a 20 20 65 63 | 68 6f 20 73 68 61 72 3a |en . ec|ho shar:|
|00000870| 20 57 69 6c 6c 20 6e 6f | 74 20 63 6c 6f 62 62 65 | Will no|t clobbe|
|00000880| 72 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |r existi|ng file |
|00000890| 5c 22 27 42 4c 55 52 42 | 27 5c 22 0a 65 6c 73 65 |\"'BLURB|'\".else|
|000008a0| 0a 65 63 68 6f 20 73 68 | 61 72 3a 20 45 78 74 72 |.echo sh|ar: Extr|
|000008b0| 61 63 74 69 6e 67 20 5c | 22 27 42 4c 55 52 42 27 |acting \|"'BLURB'|
|000008c0| 5c 22 20 5c 28 38 37 39 | 20 63 68 61 72 61 63 74 |\" \(879| charact|
|000008d0| 65 72 73 5c 29 0a 73 65 | 64 20 22 73 2f 5e 58 2f |ers\).se|d "s/^X/|
|000008e0| 2f 22 20 3e 27 42 4c 55 | 52 42 27 20 3c 3c 27 45 |/" >'BLU|RB' <<'E|
|000008f0| 4e 44 5f 4f 46 5f 46 49 | 4c 45 27 0a 54 68 69 73 |ND_OF_FI|LE'.This|
|00000900| 20 69 73 20 72 65 6c 65 | 61 73 65 20 31 2e 31 20 | is rele|ase 1.1 |
|00000910| 6f 66 20 74 68 65 20 53 | 6f 63 6b 65 74 28 31 29 |of the S|ocket(1)|
|00000920| 20 70 72 6f 67 72 61 6d | 2e 0a 58 0a 53 6f 63 6b | program|..X.Sock|
|00000930| 65 74 28 31 29 20 69 6d | 70 6c 65 6d 65 6e 74 73 |et(1) im|plements|
|00000940| 20 61 6e 20 69 6e 74 65 | 72 66 61 63 65 20 74 6f | an inte|rface to|
|00000950| 20 54 43 50 20 73 6f 63 | 6b 65 74 73 20 61 74 20 | TCP soc|kets at |
|00000960| 73 68 65 6c 6c 20 6c 65 | 76 65 6c 2e 0a 43 6c 69 |shell le|vel..Cli|
|00000970| 65 6e 74 20 61 6e 64 20 | 73 65 72 76 65 72 20 73 |ent and |server s|
|00000980| 6f 63 6b 65 74 73 20 63 | 61 6e 20 62 65 20 75 73 |ockets c|an be us|
|00000990| 65 64 20 66 72 6f 6d 20 | 73 68 65 6c 6c 20 73 63 |ed from |shell sc|
|000009a0| 72 69 70 74 73 20 6f 72 | 0a 69 6e 74 65 72 61 63 |ripts or|.interac|
|000009b0| 74 69 76 65 6c 79 2e 20 | 20 53 6f 63 6b 65 74 20 |tively. | Socket |
|000009c0| 63 61 6e 20 61 6c 73 6f | 20 72 75 6e 20 61 20 70 |can also| run a p|
|000009d0| 72 6f 67 72 61 6d 20 77 | 69 74 68 20 73 74 64 69 |rogram w|ith stdi|
|000009e0| 6e 2c 20 73 74 64 6f 75 | 74 2c 20 61 6e 64 0a 73 |n, stdou|t, and.s|
|000009f0| 74 64 65 72 72 20 63 6f | 6e 6e 65 63 74 65 64 20 |tderr co|nnected |
|00000a00| 74 6f 20 74 68 65 20 73 | 6f 63 6b 65 74 20 63 6f |to the s|ocket co|
|00000a10| 6e 6e 65 63 74 69 6f 6e | 2e 20 20 53 61 6d 70 6c |nnection|. Sampl|
|00000a20| 65 20 73 68 65 6c 6c 20 | 73 63 72 69 70 74 73 0a |e shell |scripts.|
|00000a30| 69 6d 70 6c 65 6d 65 6e | 74 69 6e 67 20 61 20 66 |implemen|ting a f|
|00000a40| 69 6e 67 65 72 20 63 6c | 69 65 6e 74 20 28 72 65 |inger cl|ient (re|
|00000a50| 6d 6f 74 65 20 6f 6e 6c | 79 29 20 61 6e 64 20 61 |mote onl|y) and a|
|00000a60| 20 66 69 6e 67 65 72 20 | 64 61 65 6d 6f 6e 20 61 | finger |daemon a|
|00000a70| 72 65 0a 69 6e 63 6c 75 | 64 65 64 2e 0a 58 0a 53 |re.inclu|ded..X.S|
|00000a80| 6f 63 6b 65 74 2d 31 2e | 31 20 72 75 6e 73 20 6f |ocket-1.|1 runs o|
|00000a90| 6e 20 74 68 65 73 65 20 | 70 6c 61 74 66 6f 72 6d |n these |platform|
|00000aa0| 73 3a 0a 58 0a 58 20 20 | 2d 20 41 54 20 33 38 36 |s:.X.X |- AT 386|
|00000ab0| 2c 20 49 53 43 20 33 2e | 30 20 20 20 20 20 20 20 |, ISC 3.|0 |
|00000ac0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 28 2a | | (*|
|00000ad0| 29 0a 58 20 20 2d 20 43 | 44 43 20 34 36 38 30 2c |).X - C|DC 4680,|
|00000ae0| 20 45 50 2f 49 58 20 31 | 2e 34 2e 31 2e 20 20 20 | EP/IX 1|.4.1. |
|00000af0| 20 20 20 20 20 20 20 20 | 20 20 20 28 2a 29 0a 58 | | (*).X|
|00000b00| 20 20 2d 20 44 45 43 73 | 74 61 74 69 6f 6e 20 33 | - DECs|tation 3|
|00000b10| 31 30 30 2c 20 55 6c 74 | 72 69 78 20 34 2e 30 0a |100, Ult|rix 4.0.|
|00000b20| 58 20 20 2d 20 48 50 2d | 55 58 20 37 2e 30 2c 20 |X - HP-|UX 7.0, |
|00000b30| 38 2e 30 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |8.0 | |
|00000b40| 20 20 20 20 20 20 20 20 | 20 28 2a 29 0a 58 20 20 | | (*).X |
|00000b50| 2d 20 49 42 4d 20 52 53 | 20 36 30 30 30 2c 20 41 |- IBM RS| 6000, A|
|00000b60| 49 58 20 33 2e 31 2e 35 | 0a 58 20 20 2d 20 4d 69 |IX 3.1.5|.X - Mi|
|00000b70| 63 72 6f 56 41 58 20 49 | 49 2c 20 34 2e 33 20 42 |croVAX I|I, 4.3 B|
|00000b80| 53 44 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |SD | |
|00000b90| 20 20 28 2a 29 0a 58 20 | 20 2d 20 53 47 49 20 49 | (*).X | - SGI I|
|00000ba0| 72 69 73 2c 20 49 72 69 | 78 20 33 2e 33 2e 31 0a |ris, Iri|x 3.3.1.|
|00000bb0| 58 20 20 2d 20 53 65 71 | 75 65 6e 74 2c 20 44 59 |X - Seq|uent, DY|
|00000bc0| 4e 49 58 20 76 2e 33 2e | 30 2e 37 20 20 20 20 20 |NIX v.3.|0.7 |
|00000bd0| 20 20 20 20 20 20 20 20 | 20 28 2a 29 0a 58 20 20 | | (*).X |
|00000be0| 2d 20 53 75 6e 20 53 50 | 41 52 43 73 74 61 74 69 |- Sun SP|ARCstati|
|00000bf0| 6f 6e 20 49 49 2c 20 53 | 75 6e 4f 53 20 34 2e 31 |on II, S|unOS 4.1|
|00000c00| 2e 32 0a 58 20 20 2d 20 | 53 79 73 74 65 6d 20 56 |.2.X - |System V|
|00000c10| 20 52 65 6c 2e 20 34 20 | 20 20 20 20 20 20 20 20 | Rel. 4 | |
|00000c20| 20 20 20 20 20 20 20 20 | 20 20 20 20 28 2a 29 0a | | (*).|
|00000c30| 58 0a 54 68 65 20 70 6c | 61 74 66 6f 72 6d 73 20 |X.The pl|atforms |
|00000c40| 6d 61 72 6b 65 64 20 77 | 69 74 68 20 22 28 2a 29 |marked w|ith "(*)|
|00000c50| 22 20 72 65 71 75 69 72 | 65 20 6d 69 6e 6f 72 20 |" requir|e minor |
|00000c60| 65 64 69 74 69 6e 67 20 | 6f 66 20 74 68 65 20 4d |editing |of the M|
|00000c70| 61 6b 65 66 69 6c 65 2e | 0a 45 4e 44 5f 4f 46 5f |akefile.|.END_OF_|
|00000c80| 46 49 4c 45 0a 69 66 20 | 74 65 73 74 20 38 37 39 |FILE.if |test 879|
|00000c90| 20 2d 6e 65 20 60 77 63 | 20 2d 63 20 3c 27 42 4c | -ne `wc| -c <'BL|
|00000ca0| 55 52 42 27 60 3b 20 74 | 68 65 6e 0a 20 20 20 20 |URB'`; t|hen. |
|00000cb0| 65 63 68 6f 20 73 68 61 | 72 3a 20 5c 22 27 42 4c |echo sha|r: \"'BL|
|00000cc0| 55 52 42 27 5c 22 20 75 | 6e 70 61 63 6b 65 64 20 |URB'\" u|npacked |
|00000cd0| 77 69 74 68 20 77 72 6f | 6e 67 20 73 69 7a 65 21 |with wro|ng size!|
|00000ce0| 0a 66 69 0a 23 20 65 6e | 64 20 6f 66 20 27 42 4c |.fi.# en|d of 'BL|
|00000cf0| 55 52 42 27 0a 66 69 0a | 69 66 20 74 65 73 74 20 |URB'.fi.|if test |
|00000d00| 2d 66 20 27 43 48 41 4e | 47 45 53 27 20 2d 61 20 |-f 'CHAN|GES' -a |
|00000d10| 22 24 7b 31 7d 22 20 21 | 3d 20 22 2d 63 22 20 3b |"${1}" !|= "-c" ;|
|00000d20| 20 74 68 65 6e 20 0a 20 | 20 65 63 68 6f 20 73 68 | then . | echo sh|
|00000d30| 61 72 3a 20 57 69 6c 6c | 20 6e 6f 74 20 63 6c 6f |ar: Will| not clo|
|00000d40| 62 62 65 72 20 65 78 69 | 73 74 69 6e 67 20 66 69 |bber exi|sting fi|
|00000d50| 6c 65 20 5c 22 27 43 48 | 41 4e 47 45 53 27 5c 22 |le \"'CH|ANGES'\"|
|00000d60| 0a 65 6c 73 65 0a 65 63 | 68 6f 20 73 68 61 72 3a |.else.ec|ho shar:|
|00000d70| 20 45 78 74 72 61 63 74 | 69 6e 67 20 5c 22 27 43 | Extract|ing \"'C|
|00000d80| 48 41 4e 47 45 53 27 5c | 22 20 5c 28 34 38 39 20 |HANGES'\|" \(489 |
|00000d90| 63 68 61 72 61 63 74 65 | 72 73 5c 29 0a 73 65 64 |characte|rs\).sed|
|00000da0| 20 22 73 2f 5e 58 2f 2f | 22 20 3e 27 43 48 41 4e | "s/^X//|" >'CHAN|
|00000db0| 47 45 53 27 20 3c 3c 27 | 45 4e 44 5f 4f 46 5f 46 |GES' <<'|END_OF_F|
|00000dc0| 49 4c 45 27 0a 58 2d 2a | 2d 74 65 78 74 2d 2a 2d |ILE'.X-*|-text-*-|
|00000dd0| 0a 58 0a 55 73 65 72 2d | 76 69 73 69 62 6c 65 20 |.X.User-|visible |
|00000de0| 63 68 61 6e 67 65 73 20 | 69 6e 20 53 6f 63 6b 65 |changes |in Socke|
|00000df0| 74 20 76 65 72 73 69 6f | 6e 20 31 2e 31 3a 0a 58 |t versio|n 1.1:.X|
|00000e00| 0a 58 20 20 2d 20 50 6f | 72 74 65 64 20 74 6f 20 |.X - Po|rted to |
|00000e10| 6d 6f 72 65 20 50 6c 61 | 74 66 6f 72 6d 73 20 28 |more Pla|tforms (|
|00000e20| 53 47 49 20 49 72 69 78 | 2c 20 49 42 4d 20 41 49 |SGI Irix|, IBM AI|
|00000e30| 58 2c 20 43 44 43 20 45 | 50 2f 49 58 2c 20 49 53 |X, CDC E|P/IX, IS|
|00000e40| 43 20 33 2e 30 2c 0a 58 | 20 20 20 20 53 79 73 74 |C 3.0,.X| Syst|
|00000e50| 65 6d 20 56 20 52 34 2c | 20 53 65 71 75 65 6e 74 |em V R4,| Sequent|
|00000e60| 29 0a 58 0a 58 20 20 2d | 20 66 69 78 65 64 20 67 |).X.X -| fixed g|
|00000e70| 65 74 6f 70 74 28 29 2d | 72 65 6c 61 74 65 64 20 |etopt()-|related |
|00000e80| 62 75 67 20 69 6e 20 6d | 61 69 6e 28 29 20 28 6f |bug in m|ain() (o|
|00000e90| 70 74 20 64 65 63 6c 61 | 72 65 64 20 61 73 20 69 |pt decla|red as i|
|00000ea0| 6e 74 20 6e 6f 77 29 2e | 0a 58 0a 58 20 20 2d 20 |nt now).|.X.X - |
|00000eb0| 66 69 78 65 64 20 53 49 | 47 57 49 4e 43 48 2d 72 |fixed SI|GWINCH-r|
|00000ec0| 65 6c 61 74 65 64 20 62 | 75 67 20 28 73 6f 63 6b |elated b|ug (sock|
|00000ed0| 65 74 20 6e 6f 20 6c 6f | 6e 67 65 72 20 65 78 69 |et no lo|nger exi|
|00000ee0| 74 73 20 6f 6e 20 53 49 | 47 57 49 4e 43 48 29 2e |ts on SI|GWINCH).|
|00000ef0| 0a 58 0a 58 20 20 2d 20 | 42 61 63 6b 67 72 6f 75 |.X.X - |Backgrou|
|00000f00| 6e 64 20 6d 6f 64 65 20 | 28 2d 62 20 6f 70 74 69 |nd mode |(-b opti|
|00000f10| 6f 6e 29 0a 58 0a 58 20 | 20 2d 20 2d 66 20 6f 70 |on).X.X | - -f op|
|00000f20| 74 69 6f 6e 20 74 6f 20 | 66 6f 72 6b 20 63 68 69 |tion to |fork chi|
|00000f30| 6c 64 20 0a 58 0a 58 20 | 20 2d 20 66 69 78 65 64 |ld .X.X | - fixed|
|00000f40| 20 62 75 67 20 69 6e 20 | 73 65 72 76 65 72 20 6d | bug in |server m|
|00000f50| 6f 64 65 20 63 6f 6e 63 | 65 72 6e 69 6e 67 20 74 |ode conc|erning t|
|00000f60| 68 65 20 22 43 6f 6e 6e | 65 63 74 69 6f 6e 20 66 |he "Conn|ection f|
|00000f70| 72 6f 6d 2e 2e 2e 22 0a | 58 20 20 20 20 6d 65 73 |rom...".|X mes|
|00000f80| 73 61 67 65 0a 58 0a 58 | 20 20 2d 20 73 6c 69 67 |sage.X.X| - slig|
|00000f90| 68 74 6c 79 20 6d 6f 72 | 65 20 61 64 65 71 75 61 |htly mor|e adequa|
|00000fa0| 74 65 20 73 69 67 6e 61 | 6c 20 68 61 6e 64 6c 69 |te signa|l handli|
|00000fb0| 6e 67 20 61 6e 64 20 6d | 65 73 73 61 67 65 73 0a |ng and m|essages.|
|00000fc0| 45 4e 44 5f 4f 46 5f 46 | 49 4c 45 0a 69 66 20 74 |END_OF_F|ILE.if t|
|00000fd0| 65 73 74 20 34 38 39 20 | 2d 6e 65 20 60 77 63 20 |est 489 |-ne `wc |
|00000fe0| 2d 63 20 3c 27 43 48 41 | 4e 47 45 53 27 60 3b 20 |-c <'CHA|NGES'`; |
|00000ff0| 74 68 65 6e 0a 20 20 20 | 20 65 63 68 6f 20 73 68 |then. | echo sh|
|00001000| 61 72 3a 20 5c 22 27 43 | 48 41 4e 47 45 53 27 5c |ar: \"'C|HANGES'\|
|00001010| 22 20 75 6e 70 61 63 6b | 65 64 20 77 69 74 68 20 |" unpack|ed with |
|00001020| 77 72 6f 6e 67 20 73 69 | 7a 65 21 0a 66 69 0a 23 |wrong si|ze!.fi.#|
|00001030| 20 65 6e 64 20 6f 66 20 | 27 43 48 41 4e 47 45 53 | end of |'CHANGES|
|00001040| 27 0a 66 69 0a 69 66 20 | 74 65 73 74 20 2d 66 20 |'.fi.if |test -f |
|00001050| 27 43 4f 50 59 52 49 47 | 48 54 27 20 2d 61 20 22 |'COPYRIG|HT' -a "|
|00001060| 24 7b 31 7d 22 20 21 3d | 20 22 2d 63 22 20 3b 20 |${1}" !=| "-c" ; |
|00001070| 74 68 65 6e 20 0a 20 20 | 65 63 68 6f 20 73 68 61 |then . |echo sha|
|00001080| 72 3a 20 57 69 6c 6c 20 | 6e 6f 74 20 63 6c 6f 62 |r: Will |not clob|
|00001090| 62 65 72 20 65 78 69 73 | 74 69 6e 67 20 66 69 6c |ber exis|ting fil|
|000010a0| 65 20 5c 22 27 43 4f 50 | 59 52 49 47 48 54 27 5c |e \"'COP|YRIGHT'\|
|000010b0| 22 0a 65 6c 73 65 0a 65 | 63 68 6f 20 73 68 61 72 |".else.e|cho shar|
|000010c0| 3a 20 45 78 74 72 61 63 | 74 69 6e 67 20 5c 22 27 |: Extrac|ting \"'|
|000010d0| 43 4f 50 59 52 49 47 48 | 54 27 5c 22 20 5c 28 39 |COPYRIGH|T'\" \(9|
|000010e0| 33 32 20 63 68 61 72 61 | 63 74 65 72 73 5c 29 0a |32 chara|cters\).|
|000010f0| 73 65 64 20 22 73 2f 5e | 58 2f 2f 22 20 3e 27 43 |sed "s/^|X//" >'C|
|00001100| 4f 50 59 52 49 47 48 54 | 27 20 3c 3c 27 45 4e 44 |OPYRIGHT|' <<'END|
|00001110| 5f 4f 46 5f 46 49 4c 45 | 27 0a 58 2d 2a 2d 20 74 |_OF_FILE|'.X-*- t|
|00001120| 65 78 74 20 2d 2a 2d 20 | 0a 58 0a 43 6f 70 79 72 |ext -*- |.X.Copyr|
|00001130| 69 67 68 74 20 28 43 29 | 20 31 39 39 32 20 62 79 |ight (C)| 1992 by|
|00001140| 20 4a 75 65 72 67 65 6e | 20 4e 69 63 6b 65 6c 73 | Juergen| Nickels|
|00001150| 65 6e 20 3c 6e 69 63 6b | 65 6c 40 63 73 2e 74 75 |en <nick|el@cs.tu|
|00001160| 2d 62 65 72 6c 69 6e 2e | 64 65 3e 0a 65 78 63 65 |-berlin.|de>.exce|
|00001170| 70 74 20 74 68 65 20 66 | 69 6c 65 20 73 69 67 6c |pt the f|ile sigl|
|00001180| 69 73 74 2e 63 2c 20 77 | 68 69 63 68 20 69 73 20 |ist.c, w|hich is |
|00001190| 43 6f 70 79 72 69 67 68 | 74 20 28 43 29 20 31 39 |Copyrigh|t (C) 19|
|000011a0| 38 39 20 46 72 65 65 20 | 53 6f 66 74 77 61 72 65 |89 Free |Software|
|000011b0| 0a 58 46 6f 75 6e 64 61 | 74 69 6f 6e 2c 20 49 6e |.XFounda|tion, In|
|000011c0| 63 2e 0a 58 0a 54 68 69 | 73 20 61 70 70 6c 69 65 |c..X.Thi|s applie|
|000011d0| 73 20 74 6f 20 74 68 65 | 20 53 6f 63 6b 65 74 20 |s to the| Socket |
|000011e0| 70 72 6f 67 72 61 6d 2c | 20 72 65 6c 65 61 73 65 |program,| release|
|000011f0| 20 53 6f 63 6b 65 74 2d | 31 2e 31 2e 0a 58 0a 53 | Socket-|1.1..X.S|
|00001200| 6f 63 6b 65 74 20 69 73 | 20 66 72 65 65 20 73 6f |ocket is| free so|
|00001210| 66 74 77 61 72 65 3b 20 | 79 6f 75 20 63 61 6e 20 |ftware; |you can |
|00001220| 72 65 64 69 73 74 72 69 | 62 75 74 65 20 69 74 20 |redistri|bute it |
|00001230| 61 6e 64 2f 6f 72 20 6d | 6f 64 69 66 79 20 69 74 |and/or m|odify it|
|00001240| 0a 75 6e 64 65 72 20 74 | 68 65 20 74 65 72 6d 73 |.under t|he terms|
|00001250| 20 6f 66 20 74 68 65 20 | 47 4e 55 20 47 65 6e 65 | of the |GNU Gene|
|00001260| 72 61 6c 20 50 75 62 6c | 69 63 20 4c 69 63 65 6e |ral Publ|ic Licen|
|00001270| 73 65 20 61 73 20 70 75 | 62 6c 69 73 68 65 64 20 |se as pu|blished |
|00001280| 62 79 20 74 68 65 0a 58 | 46 72 65 65 20 53 6f 66 |by the.X|Free Sof|
|00001290| 74 77 61 72 65 20 46 6f | 75 6e 64 61 74 69 6f 6e |tware Fo|undation|
|000012a0| 3b 20 65 69 74 68 65 72 | 20 76 65 72 73 69 6f 6e |; either| version|
|000012b0| 20 31 2c 20 6f 72 20 28 | 61 74 20 79 6f 75 72 20 | 1, or (|at your |
|000012c0| 6f 70 74 69 6f 6e 29 20 | 61 6e 79 0a 6c 61 74 65 |option) |any.late|
|000012d0| 72 20 76 65 72 73 69 6f | 6e 2e 0a 58 0a 49 74 20 |r versio|n..X.It |
|000012e0| 69 73 20 64 69 73 74 72 | 69 62 75 74 65 64 20 69 |is distr|ibuted i|
|000012f0| 6e 20 74 68 65 20 68 6f | 70 65 20 74 68 61 74 20 |n the ho|pe that |
|00001300| 69 74 20 77 69 6c 6c 20 | 62 65 20 75 73 65 66 75 |it will |be usefu|
|00001310| 6c 2c 20 62 75 74 20 57 | 49 54 48 4f 55 54 20 41 |l, but W|ITHOUT A|
|00001320| 4e 59 0a 57 41 52 52 41 | 4e 54 59 3b 20 77 69 74 |NY.WARRA|NTY; wit|
|00001330| 68 6f 75 74 20 65 76 65 | 6e 20 74 68 65 20 69 6d |hout eve|n the im|
|00001340| 70 6c 69 65 64 20 77 61 | 72 72 61 6e 74 79 20 6f |plied wa|rranty o|
|00001350| 66 20 4d 45 52 43 48 41 | 4e 54 41 42 49 4c 49 54 |f MERCHA|NTABILIT|
|00001360| 59 20 6f 72 0a 58 46 49 | 54 4e 45 53 53 20 46 4f |Y or.XFI|TNESS FO|
|00001370| 52 20 41 20 50 41 52 54 | 49 43 55 4c 41 52 20 50 |R A PART|ICULAR P|
|00001380| 55 52 50 4f 53 45 2e 20 | 20 53 65 65 20 74 68 65 |URPOSE. | See the|
|00001390| 20 47 4e 55 20 47 65 6e | 65 72 61 6c 20 50 75 62 | GNU Gen|eral Pub|
|000013a0| 6c 69 63 20 4c 69 63 65 | 6e 73 65 0a 66 6f 72 20 |lic Lice|nse.for |
|000013b0| 6d 6f 72 65 20 64 65 74 | 61 69 6c 73 2e 0a 58 0a |more det|ails..X.|
|000013c0| 59 6f 75 20 6d 61 79 20 | 68 61 76 65 20 72 65 63 |You may |have rec|
|000013d0| 65 69 76 65 64 20 61 20 | 63 6f 70 79 20 6f 66 20 |eived a |copy of |
|000013e0| 74 68 65 20 47 4e 55 20 | 47 65 6e 65 72 61 6c 20 |the GNU |General |
|000013f0| 50 75 62 6c 69 63 20 4c | 69 63 65 6e 73 65 20 61 |Public L|icense a|
|00001400| 6c 6f 6e 67 0a 77 69 74 | 68 20 47 4e 55 20 45 6d |long.wit|h GNU Em|
|00001410| 61 63 73 20 6f 72 20 61 | 6e 6f 74 68 65 72 20 47 |acs or a|nother G|
|00001420| 4e 55 20 70 72 6f 67 72 | 61 6d 3b 20 73 65 65 20 |NU progr|am; see |
|00001430| 74 68 65 20 66 69 6c 65 | 20 43 4f 50 59 49 4e 47 |the file| COPYING|
|00001440| 2e 20 20 49 66 20 6e 6f | 74 2c 0a 77 72 69 74 65 |. If no|t,.write|
|00001450| 20 74 6f 20 6d 65 20 61 | 74 20 74 68 65 20 65 6c | to me a|t the el|
|00001460| 65 63 74 72 6f 6e 69 63 | 20 6d 61 69 6c 20 61 64 |ectronic| mail ad|
|00001470| 64 72 65 73 73 20 67 69 | 76 65 6e 20 61 62 6f 76 |dress gi|ven abov|
|00001480| 65 20 6f 72 20 74 6f 20 | 0a 4a 75 65 72 67 65 6e |e or to |.Juergen|
|00001490| 20 4e 69 63 6b 65 6c 73 | 65 6e 2c 20 48 65 72 74 | Nickels|en, Hert|
|000014a0| 7a 62 65 72 67 73 74 72 | 2e 20 32 38 2c 20 31 30 |zbergstr|. 28, 10|
|000014b0| 30 30 20 42 65 72 6c 69 | 6e 20 34 34 2c 20 47 65 |00 Berli|n 44, Ge|
|000014c0| 72 6d 61 6e 79 2e 0a 45 | 4e 44 5f 4f 46 5f 46 49 |rmany..E|ND_OF_FI|
|000014d0| 4c 45 0a 69 66 20 74 65 | 73 74 20 39 33 32 20 2d |LE.if te|st 932 -|
|000014e0| 6e 65 20 60 77 63 20 2d | 63 20 3c 27 43 4f 50 59 |ne `wc -|c <'COPY|
|000014f0| 52 49 47 48 54 27 60 3b | 20 74 68 65 6e 0a 20 20 |RIGHT'`;| then. |
|00001500| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 5c 22 27 | echo s|har: \"'|
|00001510| 43 4f 50 59 52 49 47 48 | 54 27 5c 22 20 75 6e 70 |COPYRIGH|T'\" unp|
|00001520| 61 63 6b 65 64 20 77 69 | 74 68 20 77 72 6f 6e 67 |acked wi|th wrong|
|00001530| 20 73 69 7a 65 21 0a 66 | 69 0a 23 20 65 6e 64 20 | size!.f|i.# end |
|00001540| 6f 66 20 27 43 4f 50 59 | 52 49 47 48 54 27 0a 66 |of 'COPY|RIGHT'.f|
|00001550| 69 0a 69 66 20 74 65 73 | 74 20 2d 66 20 27 44 65 |i.if tes|t -f 'De|
|00001560| 70 65 6e 64 65 6e 63 69 | 65 73 27 20 2d 61 20 22 |pendenci|es' -a "|
|00001570| 24 7b 31 7d 22 20 21 3d | 20 22 2d 63 22 20 3b 20 |${1}" !=| "-c" ; |
|00001580| 74 68 65 6e 20 0a 20 20 | 65 63 68 6f 20 73 68 61 |then . |echo sha|
|00001590| 72 3a 20 57 69 6c 6c 20 | 6e 6f 74 20 63 6c 6f 62 |r: Will |not clob|
|000015a0| 62 65 72 20 65 78 69 73 | 74 69 6e 67 20 66 69 6c |ber exis|ting fil|
|000015b0| 65 20 5c 22 27 44 65 70 | 65 6e 64 65 6e 63 69 65 |e \"'Dep|endencie|
|000015c0| 73 27 5c 22 0a 65 6c 73 | 65 0a 65 63 68 6f 20 73 |s'\".els|e.echo s|
|000015d0| 68 61 72 3a 20 45 78 74 | 72 61 63 74 69 6e 67 20 |har: Ext|racting |
|000015e0| 5c 22 27 44 65 70 65 6e | 64 65 6e 63 69 65 73 27 |\"'Depen|dencies'|
|000015f0| 5c 22 20 5c 28 32 39 36 | 20 63 68 61 72 61 63 74 |\" \(296| charact|
|00001600| 65 72 73 5c 29 0a 73 65 | 64 20 22 73 2f 5e 58 2f |ers\).se|d "s/^X/|
|00001610| 2f 22 20 3e 27 44 65 70 | 65 6e 64 65 6e 63 69 65 |/" >'Dep|endencie|
|00001620| 73 27 20 3c 3c 27 45 4e | 44 5f 4f 46 5f 46 49 4c |s' <<'EN|D_OF_FIL|
|00001630| 45 27 0a 69 6f 2e 6f 3a | 20 2e 2f 67 6c 6f 62 61 |E'.io.o:| ./globa|
|00001640| 6c 73 2e 68 0a 69 6f 2e | 6f 3a 20 2e 2f 70 61 74 |ls.h.io.|o: ./pat|
|00001650| 63 68 6c 65 76 65 6c 2e | 68 0a 69 6f 2e 6f 3a 20 |chlevel.|h.io.o: |
|00001660| 69 6f 2e 63 0a 73 69 67 | 6c 69 73 74 2e 6f 3a 20 |io.c.sig|list.o: |
|00001670| 73 69 67 6c 69 73 74 2e | 63 0a 73 6f 5f 72 65 6c |siglist.|c.so_rel|
|00001680| 65 61 73 65 2e 6f 3a 20 | 73 6f 5f 72 65 6c 65 61 |ease.o: |so_relea|
|00001690| 73 65 2e 63 0a 73 6f 63 | 6b 65 74 2e 6f 3a 20 2e |se.c.soc|ket.o: .|
|000016a0| 2f 67 6c 6f 62 61 6c 73 | 2e 68 0a 73 6f 63 6b 65 |/globals|.h.socke|
|000016b0| 74 2e 6f 3a 20 2e 2f 70 | 61 74 63 68 6c 65 76 65 |t.o: ./p|atchleve|
|000016c0| 6c 2e 68 0a 73 6f 63 6b | 65 74 2e 6f 3a 20 73 6f |l.h.sock|et.o: so|
|000016d0| 63 6b 65 74 2e 63 0a 73 | 6f 63 6b 65 74 70 2e 6f |cket.c.s|ocketp.o|
|000016e0| 3a 20 2e 2f 67 6c 6f 62 | 61 6c 73 2e 68 0a 73 6f |: ./glob|als.h.so|
|000016f0| 63 6b 65 74 70 2e 6f 3a | 20 2e 2f 70 61 74 63 68 |cketp.o:| ./patch|
|00001700| 6c 65 76 65 6c 2e 68 0a | 73 6f 63 6b 65 74 70 2e |level.h.|socketp.|
|00001710| 6f 3a 20 73 6f 63 6b 65 | 74 70 2e 63 0a 75 74 69 |o: socke|tp.c.uti|
|00001720| 6c 73 2e 6f 3a 20 2e 2f | 67 6c 6f 62 61 6c 73 2e |ls.o: ./|globals.|
|00001730| 68 0a 75 74 69 6c 73 2e | 6f 3a 20 2e 2f 70 61 74 |h.utils.|o: ./pat|
|00001740| 63 68 6c 65 76 65 6c 2e | 68 0a 75 74 69 6c 73 2e |chlevel.|h.utils.|
|00001750| 6f 3a 20 75 74 69 6c 73 | 2e 63 0a 45 4e 44 5f 4f |o: utils|.c.END_O|
|00001760| 46 5f 46 49 4c 45 0a 69 | 66 20 74 65 73 74 20 32 |F_FILE.i|f test 2|
|00001770| 39 36 20 2d 6e 65 20 60 | 77 63 20 2d 63 20 3c 27 |96 -ne `|wc -c <'|
|00001780| 44 65 70 65 6e 64 65 6e | 63 69 65 73 27 60 3b 20 |Dependen|cies'`; |
|00001790| 74 68 65 6e 0a 20 20 20 | 20 65 63 68 6f 20 73 68 |then. | echo sh|
|000017a0| 61 72 3a 20 5c 22 27 44 | 65 70 65 6e 64 65 6e 63 |ar: \"'D|ependenc|
|000017b0| 69 65 73 27 5c 22 20 75 | 6e 70 61 63 6b 65 64 20 |ies'\" u|npacked |
|000017c0| 77 69 74 68 20 77 72 6f | 6e 67 20 73 69 7a 65 21 |with wro|ng size!|
|000017d0| 0a 66 69 0a 23 20 65 6e | 64 20 6f 66 20 27 44 65 |.fi.# en|d of 'De|
|000017e0| 70 65 6e 64 65 6e 63 69 | 65 73 27 0a 66 69 0a 69 |pendenci|es'.fi.i|
|000017f0| 66 20 74 65 73 74 20 2d | 66 20 27 49 4e 53 54 41 |f test -|f 'INSTA|
|00001800| 4c 4c 27 20 2d 61 20 22 | 24 7b 31 7d 22 20 21 3d |LL' -a "|${1}" !=|
|00001810| 20 22 2d 63 22 20 3b 20 | 74 68 65 6e 20 0a 20 20 | "-c" ; |then . |
|00001820| 65 63 68 6f 20 73 68 61 | 72 3a 20 57 69 6c 6c 20 |echo sha|r: Will |
|00001830| 6e 6f 74 20 63 6c 6f 62 | 62 65 72 20 65 78 69 73 |not clob|ber exis|
|00001840| 74 69 6e 67 20 66 69 6c | 65 20 5c 22 27 49 4e 53 |ting fil|e \"'INS|
|00001850| 54 41 4c 4c 27 5c 22 0a | 65 6c 73 65 0a 65 63 68 |TALL'\".|else.ech|
|00001860| 6f 20 73 68 61 72 3a 20 | 45 78 74 72 61 63 74 69 |o shar: |Extracti|
|00001870| 6e 67 20 5c 22 27 49 4e | 53 54 41 4c 4c 27 5c 22 |ng \"'IN|STALL'\"|
|00001880| 20 5c 28 31 31 34 31 20 | 63 68 61 72 61 63 74 65 | \(1141 |characte|
|00001890| 72 73 5c 29 0a 73 65 64 | 20 22 73 2f 5e 58 2f 2f |rs\).sed| "s/^X//|
|000018a0| 22 20 3e 27 49 4e 53 54 | 41 4c 4c 27 20 3c 3c 27 |" >'INST|ALL' <<'|
|000018b0| 45 4e 44 5f 4f 46 5f 46 | 49 4c 45 27 0a 58 2d 2a |END_OF_F|ILE'.X-*|
|000018c0| 2d 20 74 65 78 74 20 2d | 2a 2d 0a 58 0a 53 6f 63 |- text -|*-.X.Soc|
|000018d0| 6b 65 74 2d 31 2e 31 20 | 72 75 6e 73 20 6f 6e 20 |ket-1.1 |runs on |
|000018e0| 74 68 65 73 65 20 70 6c | 61 74 66 6f 72 6d 73 3a |these pl|atforms:|
|000018f0| 0a 58 0a 58 20 20 2d 20 | 41 54 20 33 38 36 2c 20 |.X.X - |AT 386, |
|00001900| 49 53 43 20 33 2e 30 09 | 09 09 28 2a 29 0a 58 20 |ISC 3.0.|..(*).X |
|00001910| 20 2d 20 43 44 43 20 34 | 36 38 30 2c 20 45 50 2f | - CDC 4|680, EP/|
|00001920| 49 58 20 31 2e 34 2e 31 | 2e 09 09 28 2a 29 0a 58 |IX 1.4.1|...(*).X|
|00001930| 20 20 2d 20 44 45 43 73 | 74 61 74 69 6f 6e 20 33 | - DECs|tation 3|
|00001940| 31 30 30 2c 20 55 6c 74 | 72 69 78 20 34 2e 30 0a |100, Ult|rix 4.0.|
|00001950| 58 20 20 2d 20 48 50 2d | 55 58 20 37 2e 30 2c 20 |X - HP-|UX 7.0, |
|00001960| 38 2e 30 09 09 09 28 2a | 29 0a 58 20 20 2d 20 49 |8.0...(*|).X - I|
|00001970| 42 4d 20 52 53 20 36 30 | 30 30 2c 20 41 49 58 20 |BM RS 60|00, AIX |
|00001980| 33 2e 31 2e 35 0a 58 20 | 20 2d 20 4d 69 63 72 6f |3.1.5.X | - Micro|
|00001990| 56 41 58 20 49 49 2c 20 | 34 2e 33 20 42 53 44 09 |VAX II, |4.3 BSD.|
|000019a0| 09 28 2a 29 0a 58 20 20 | 2d 20 53 47 49 20 49 72 |.(*).X |- SGI Ir|
|000019b0| 69 73 2c 20 49 72 69 78 | 20 33 2e 33 2e 31 0a 58 |is, Irix| 3.3.1.X|
|000019c0| 20 20 2d 20 53 65 71 75 | 65 6e 74 2c 20 44 59 4e | - Sequ|ent, DYN|
|000019d0| 49 58 20 76 2e 33 2e 30 | 2e 37 09 09 28 2a 29 0a |IX v.3.0|.7..(*).|
|000019e0| 58 20 20 2d 20 53 75 6e | 20 53 50 41 52 43 73 74 |X - Sun| SPARCst|
|000019f0| 61 74 69 6f 6e 20 49 49 | 2c 20 53 75 6e 4f 53 20 |ation II|, SunOS |
|00001a00| 34 2e 31 2e 32 0a 58 20 | 20 2d 20 53 79 73 74 65 |4.1.2.X | - Syste|
|00001a10| 6d 20 56 20 52 65 6c 2e | 20 34 09 09 09 28 2a 29 |m V Rel.| 4...(*)|
|00001a20| 0a 58 0a 54 68 65 20 70 | 6c 61 74 66 6f 72 6d 73 |.X.The p|latforms|
|00001a30| 20 6d 61 72 6b 65 64 20 | 77 69 74 68 20 22 28 2a | marked |with "(*|
|00001a40| 29 22 20 72 65 71 75 69 | 72 65 20 6d 69 6e 6f 72 |)" requi|re minor|
|00001a50| 20 65 64 69 74 69 6e 67 | 20 6f 66 20 74 68 65 20 | editing| of the |
|00001a60| 4d 61 6b 65 66 69 6c 65 | 2e 0a 49 6e 73 74 72 75 |Makefile|..Instru|
|00001a70| 63 74 69 6f 6e 73 20 61 | 72 65 20 69 6e 63 6c 75 |ctions a|re inclu|
|00001a80| 64 65 64 20 6e 65 61 72 | 20 74 68 65 20 62 65 67 |ded near| the beg|
|00001a90| 69 6e 6e 69 6e 67 20 6f | 66 20 74 68 65 20 4d 61 |inning o|f the Ma|
|00001aa0| 6b 65 66 69 6c 65 2e 20 | 45 64 69 74 20 61 73 0a |kefile. |Edit as.|
|00001ab0| 6e 65 63 65 73 73 61 72 | 79 20 61 6e 64 20 74 79 |necessar|y and ty|
|00001ac0| 70 65 20 22 6d 61 6b 65 | 20 69 6e 73 74 61 6c 6c |pe "make| install|
|00001ad0| 22 2e 20 54 68 69 73 20 | 62 75 69 6c 64 73 20 74 |". This |builds t|
|00001ae0| 68 65 20 70 72 6f 67 72 | 61 6d 20 61 6e 64 0a 69 |he progr|am and.i|
|00001af0| 6e 73 74 61 6c 6c 73 20 | 74 68 65 20 65 78 65 63 |nstalls |the exec|
|00001b00| 75 74 61 62 6c 65 20 61 | 73 20 2f 75 73 72 2f 6c |utable a|s /usr/l|
|00001b10| 6f 63 61 6c 2f 62 69 6e | 2f 73 6f 63 6b 65 74 20 |ocal/bin|/socket |
|00001b20| 61 6e 64 20 74 68 65 20 | 6d 61 6e 75 61 6c 20 70 |and the |manual p|
|00001b30| 61 67 65 0a 61 73 20 2f | 75 73 72 2f 6c 6f 63 61 |age.as /|usr/loca|
|00001b40| 6c 2f 6d 61 6e 2f 6d 61 | 6e 31 2f 73 6f 63 6b 65 |l/man/ma|n1/socke|
|00001b50| 74 2e 31 2e 0a 58 0a 53 | 6f 63 6b 65 74 20 72 65 |t.1..X.S|ocket re|
|00001b60| 6c 69 65 73 20 6f 6e 20 | 73 6f 6d 65 20 42 65 72 |lies on |some Ber|
|00001b70| 6b 65 6c 65 79 69 73 6d | 73 20 69 6e 20 73 69 67 |keleyism|s in sig|
|00001b80| 6e 61 6c 2c 20 70 72 6f | 63 65 73 73 2c 20 61 6e |nal, pro|cess, an|
|00001b90| 64 20 49 4f 0a 68 61 6e | 64 6c 69 6e 67 2c 20 73 |d IO.han|dling, s|
|00001ba0| 6f 20 70 6f 72 74 69 6e | 67 20 69 74 20 74 6f 20 |o portin|g it to |
|00001bb0| 28 6f 74 68 65 72 29 20 | 6e 6f 6e 2d 42 53 44 2d |(other) |non-BSD-|
|00001bc0| 64 65 72 69 76 65 64 20 | 70 6c 61 74 66 6f 72 6d |derived |platform|
|00001bd0| 73 20 6d 61 79 20 62 65 | 0a 64 69 66 66 69 63 75 |s may be|.difficu|
|00001be0| 6c 74 2e 20 20 49 20 61 | 6d 20 69 6e 74 65 72 65 |lt. I a|m intere|
|00001bf0| 73 74 65 64 20 69 6e 20 | 61 6e 79 20 63 68 61 6e |sted in |any chan|
|00001c00| 67 65 73 20 79 6f 75 20 | 6d 61 6b 65 20 74 6f 20 |ges you |make to |
|00001c10| 70 6f 72 74 20 74 68 65 | 0a 70 72 6f 67 72 61 6d |port the|.program|
|00001c20| 20 74 6f 20 61 20 6e 65 | 77 20 70 6c 61 74 66 6f | to a ne|w platfo|
|00001c30| 72 6d 2e 20 20 50 6c 65 | 61 73 65 20 73 65 6e 64 |rm. Ple|ase send|
|00001c40| 20 74 68 65 6d 20 62 61 | 63 6b 20 74 6f 20 6d 65 | them ba|ck to me|
|00001c50| 20 73 6f 20 49 20 63 61 | 6e 20 6d 65 72 67 65 0a | so I ca|n merge.|
|00001c60| 74 68 65 6d 20 69 6e 74 | 6f 20 61 20 6c 61 74 65 |them int|o a late|
|00001c70| 72 20 72 65 6c 65 61 73 | 65 2e 0a 58 0a 54 68 65 |r releas|e..X.The|
|00001c80| 20 4d 61 6b 65 66 69 6c | 65 20 69 73 20 6e 6f 74 | Makefil|e is not|
|00001c90| 20 73 75 69 74 61 62 6c | 65 20 66 6f 72 20 64 65 | suitabl|e for de|
|00001ca0| 76 65 6c 6f 70 6d 65 6e | 74 20 73 69 6e 63 65 20 |velopmen|t since |
|00001cb0| 69 74 20 64 6f 65 73 6e | 27 74 20 69 6e 63 6c 75 |it doesn|'t inclu|
|00001cc0| 64 65 0a 74 68 65 20 64 | 65 70 65 6e 64 65 6e 63 |de.the d|ependenc|
|00001cd0| 69 65 73 2e 20 28 49 20 | 75 73 65 20 74 68 65 20 |ies. (I |use the |
|00001ce0| 53 68 61 70 65 20 54 6f | 6f 6c 6b 69 74 20 66 6f |Shape To|olkit fo|
|00001cf0| 72 20 64 65 76 65 6c 6f | 70 6d 65 6e 74 2e 29 0a |r develo|pment.).|
|00001d00| 54 6f 20 63 6f 72 72 65 | 63 74 20 74 68 69 73 2c |To corre|ct this,|
|00001d10| 20 69 6e 63 6c 75 64 65 | 20 74 68 65 20 66 69 6c | include| the fil|
|00001d20| 65 20 44 65 70 65 6e 64 | 65 6e 63 69 65 73 20 69 |e Depend|encies i|
|00001d30| 6e 74 6f 20 74 68 65 20 | 4d 61 6b 65 66 69 6c 65 |nto the |Makefile|
|00001d40| 2e 0a 45 4e 44 5f 4f 46 | 5f 46 49 4c 45 0a 69 66 |..END_OF|_FILE.if|
|00001d50| 20 74 65 73 74 20 31 31 | 34 31 20 2d 6e 65 20 60 | test 11|41 -ne `|
|00001d60| 77 63 20 2d 63 20 3c 27 | 49 4e 53 54 41 4c 4c 27 |wc -c <'|INSTALL'|
|00001d70| 60 3b 20 74 68 65 6e 0a | 20 20 20 20 65 63 68 6f |`; then.| echo|
|00001d80| 20 73 68 61 72 3a 20 5c | 22 27 49 4e 53 54 41 4c | shar: \|"'INSTAL|
|00001d90| 4c 27 5c 22 20 75 6e 70 | 61 63 6b 65 64 20 77 69 |L'\" unp|acked wi|
|00001da0| 74 68 20 77 72 6f 6e 67 | 20 73 69 7a 65 21 0a 66 |th wrong| size!.f|
|00001db0| 69 0a 23 20 65 6e 64 20 | 6f 66 20 27 49 4e 53 54 |i.# end |of 'INST|
|00001dc0| 41 4c 4c 27 0a 66 69 0a | 69 66 20 74 65 73 74 20 |ALL'.fi.|if test |
|00001dd0| 2d 66 20 27 4d 61 6b 65 | 66 69 6c 65 27 20 2d 61 |-f 'Make|file' -a|
|00001de0| 20 22 24 7b 31 7d 22 20 | 21 3d 20 22 2d 63 22 20 | "${1}" |!= "-c" |
|00001df0| 3b 20 74 68 65 6e 20 0a | 20 20 65 63 68 6f 20 73 |; then .| echo s|
|00001e00| 68 61 72 3a 20 57 69 6c | 6c 20 6e 6f 74 20 63 6c |har: Wil|l not cl|
|00001e10| 6f 62 62 65 72 20 65 78 | 69 73 74 69 6e 67 20 66 |obber ex|isting f|
|00001e20| 69 6c 65 20 5c 22 27 4d | 61 6b 65 66 69 6c 65 27 |ile \"'M|akefile'|
|00001e30| 5c 22 0a 65 6c 73 65 0a | 65 63 68 6f 20 73 68 61 |\".else.|echo sha|
|00001e40| 72 3a 20 45 78 74 72 61 | 63 74 69 6e 67 20 5c 22 |r: Extra|cting \"|
|00001e50| 27 4d 61 6b 65 66 69 6c | 65 27 5c 22 20 5c 28 34 |'Makefil|e'\" \(4|
|00001e60| 35 36 34 20 63 68 61 72 | 61 63 74 65 72 73 5c 29 |564 char|acters\)|
|00001e70| 0a 73 65 64 20 22 73 2f | 5e 58 2f 2f 22 20 3e 27 |.sed "s/|^X//" >'|
|00001e80| 4d 61 6b 65 66 69 6c 65 | 27 20 3c 3c 27 45 4e 44 |Makefile|' <<'END|
|00001e90| 5f 4f 46 5f 46 49 4c 45 | 27 0a 58 23 20 4d 61 6b |_OF_FILE|'.X# Mak|
|00001ea0| 65 66 69 6c 65 20 66 6f | 72 20 53 6f 63 6b 65 74 |efile fo|r Socket|
|00001eb0| 0a 58 23 0a 58 23 20 24 | 48 65 61 64 65 72 3a 20 |.X#.X# $|Header: |
|00001ec0| 4d 61 6b 65 66 69 6c 65 | 5b 31 2e 32 33 5d 20 57 |Makefile|[1.23] W|
|00001ed0| 65 64 20 53 65 70 20 20 | 39 20 31 39 3a 30 33 3a |ed Sep |9 19:03:|
|00001ee0| 32 36 20 31 39 39 32 20 | 6e 69 63 6b 65 6c 40 63 |26 1992 |nickel@c|
|00001ef0| 73 2e 74 75 2d 62 65 72 | 6c 69 6e 2e 64 65 20 70 |s.tu-ber|lin.de p|
|00001f00| 72 6f 70 6f 73 65 64 20 | 24 0a 58 23 0a 58 0a 58 |roposed |$.X#.X.X|
|00001f10| 23 23 23 20 61 64 6a 75 | 73 74 20 74 68 65 73 65 |### adju|st these|
|00001f20| 20 74 6f 20 79 6f 75 72 | 20 74 61 73 74 65 0a 58 | to your| taste.X|
|00001f30| 23 23 23 20 54 68 69 73 | 20 69 73 20 73 65 74 20 |### This| is set |
|00001f40| 75 70 20 74 6f 20 69 6e | 73 74 61 6c 6c 20 73 6f |up to in|stall so|
|00001f50| 63 6b 65 74 20 61 73 20 | 2f 75 73 72 2f 6c 6f 63 |cket as |/usr/loc|
|00001f60| 61 6c 2f 62 69 6e 2f 73 | 6f 63 6b 65 74 20 61 6e |al/bin/s|ocket an|
|00001f70| 64 0a 58 23 23 23 20 73 | 6f 63 6b 65 74 2e 31 20 |d.X### s|ocket.1 |
|00001f80| 69 6e 20 2f 75 73 72 2f | 6c 6f 63 61 6c 2f 6d 61 |in /usr/|local/ma|
|00001f90| 6e 2f 6d 61 6e 31 2f 73 | 6f 63 6b 65 74 2e 31 0a |n/man1/s|ocket.1.|
|00001fa0| 58 23 23 23 20 4d 61 6b | 65 20 73 75 72 65 20 74 |X### Mak|e sure t|
|00001fb0| 68 65 20 74 61 72 67 65 | 74 20 64 69 72 65 63 74 |he targe|t direct|
|00001fc0| 6f 72 69 65 73 20 65 78 | 69 73 74 20 62 65 66 6f |ories ex|ist befo|
|00001fd0| 72 65 20 64 6f 69 6e 67 | 20 61 20 22 6d 61 6b 65 |re doing| a "make|
|00001fe0| 20 69 6e 73 74 61 6c 6c | 22 2e 0a 58 0a 49 4e 53 | install|"..X.INS|
|00001ff0| 54 41 4c 4c 42 41 53 45 | 20 3d 20 2f 75 73 72 2f |TALLBASE| = /usr/|
|00002000| 6c 6f 63 61 6c 0a 49 4e | 53 54 41 4c 4c 42 49 4e |local.IN|STALLBIN|
|00002010| 50 41 54 48 20 3d 20 24 | 28 49 4e 53 54 41 4c 4c |PATH = $|(INSTALL|
|00002020| 42 41 53 45 29 2f 62 69 | 6e 0a 49 4e 53 54 41 4c |BASE)/bi|n.INSTAL|
|00002030| 4c 42 49 4e 4d 4f 44 45 | 20 3d 20 37 35 35 0a 49 |LBINMODE| = 755.I|
|00002040| 4e 53 54 41 4c 4c 4d 41 | 4e 50 41 54 48 20 3d 20 |NSTALLMA|NPATH = |
|00002050| 24 28 49 4e 53 54 41 4c | 4c 42 41 53 45 29 2f 6d |$(INSTAL|LBASE)/m|
|00002060| 61 6e 0a 49 4e 53 54 41 | 4c 4c 4d 41 4e 4d 4f 44 |an.INSTA|LLMANMOD|
|00002070| 45 20 3d 20 34 34 34 0a | 43 43 20 3d 20 63 63 0a |E = 444.|CC = cc.|
|00002080| 43 46 4c 41 47 53 20 20 | 3d 20 24 28 53 57 49 54 |CFLAGS |= $(SWIT|
|00002090| 43 48 45 53 29 20 2d 4f | 0a 4c 44 46 4c 41 47 53 |CHES) -O|.LDFLAGS|
|000020a0| 20 3d 20 24 28 53 57 49 | 54 43 48 45 53 29 20 2d | = $(SWI|TCHES) -|
|000020b0| 73 0a 58 0a 58 23 23 23 | 20 59 6f 75 20 6d 61 79 |s.X.X###| You may|
|000020c0| 20 6e 65 65 64 20 74 6f | 20 75 6e 63 6f 6d 6d 65 | need to| uncomme|
|000020d0| 6e 74 20 73 6f 6d 65 20 | 6c 69 6e 65 73 20 62 65 |nt some |lines be|
|000020e0| 6c 6f 77 20 66 6f 72 20 | 79 6f 75 72 20 6f 70 65 |low for |your ope|
|000020f0| 72 61 74 69 6e 67 0a 58 | 23 23 23 20 73 79 73 74 |rating.X|### syst|
|00002100| 65 6d 3a 0a 58 0a 58 23 | 23 23 20 34 2e 33 20 42 |em:.X.X#|## 4.3 B|
|00002110| 53 44 3a 0a 58 23 20 53 | 57 49 54 43 48 45 53 20 |SD:.X# S|WITCHES |
|00002120| 3d 20 2d 44 4e 4f 53 45 | 54 53 49 44 0a 58 0a 58 |= -DNOSE|TSID.X.X|
|00002130| 23 23 23 20 48 50 2d 55 | 58 3a 0a 58 23 20 53 59 |### HP-U|X:.X# SY|
|00002140| 53 4c 49 42 53 20 20 3d | 20 2d 6c 42 53 44 0a 58 |SLIBS =| -lBSD.X|
|00002150| 0a 58 23 23 23 20 49 53 | 43 20 33 2e 30 3a 0a 58 |.X### IS|C 3.0:.X|
|00002160| 23 20 53 59 53 4c 49 42 | 53 20 20 3d 20 2d 6c 69 |# SYSLIB|S = -li|
|00002170| 6e 65 74 20 2d 6c 63 70 | 6f 73 69 78 0a 58 23 20 |net -lcp|osix.X# |
|00002180| 53 57 49 54 43 48 45 53 | 20 3d 20 2d 44 49 53 43 |SWITCHES| = -DISC|
|00002190| 0a 58 0a 58 23 23 23 20 | 53 79 73 74 65 6d 20 56 |.X.X### |System V|
|000021a0| 20 52 65 6c 2e 20 34 3a | 0a 58 23 20 53 59 53 4c | Rel. 4:|.X# SYSL|
|000021b0| 49 42 53 20 20 3d 20 2d | 6c 63 20 2d 6c 73 6f 63 |IBS = -|lc -lsoc|
|000021c0| 6b 65 74 20 2d 6c 6e 73 | 6c 20 2d 4c 2f 75 73 72 |ket -lns|l -L/usr|
|000021d0| 2f 75 63 62 6c 69 62 20 | 2d 6c 75 63 62 0a 58 23 |/ucblib |-lucb.X#|
|000021e0| 20 53 57 49 54 43 48 45 | 53 20 3d 20 2d 49 2f 75 | SWITCHE|S = -I/u|
|000021f0| 73 72 2f 75 63 62 69 6e | 63 6c 75 64 65 0a 58 0a |sr/ucbin|clude.X.|
|00002200| 58 23 23 23 20 53 65 71 | 75 65 6e 74 3a 0a 58 23 |X### Seq|uent:.X#|
|00002210| 20 53 59 53 4c 49 42 53 | 20 20 3d 20 2d 6c 73 65 | SYSLIBS| = -lse|
|00002220| 71 0a 58 23 20 53 57 49 | 54 43 48 45 53 20 3d 20 |q.X# SWI|TCHES = |
|00002230| 2d 44 73 74 72 72 63 68 | 72 3d 72 69 6e 64 65 78 |-Dstrrch|r=rindex|
|00002240| 20 2d 44 53 45 51 55 45 | 4e 54 20 2d 44 4e 4f 53 | -DSEQUE|NT -DNOS|
|00002250| 45 54 53 49 44 0a 58 23 | 23 23 20 28 49 20 68 61 |ETSID.X#|## (I ha|
|00002260| 76 65 20 62 65 65 6e 20 | 72 65 70 6f 72 74 65 64 |ve been |reported|
|00002270| 20 74 72 6f 75 62 6c 65 | 73 20 77 69 74 68 20 74 | trouble|s with t|
|00002280| 68 65 20 22 69 6e 73 74 | 61 6c 6c 6d 61 6e 75 61 |he "inst|allmanua|
|00002290| 6c 73 22 20 74 61 72 67 | 65 74 20 6f 6e 0a 58 23 |ls" targ|et on.X#|
|000022a0| 23 23 20 61 20 53 65 71 | 75 65 6e 74 2c 20 73 6f |## a Seq|uent, so|
|000022b0| 20 79 6f 75 20 6d 69 67 | 68 74 20 68 61 76 65 20 | you mig|ht have |
|000022c0| 74 6f 20 63 6f 70 79 20 | 74 68 65 20 6d 61 6e 75 |to copy |the manu|
|000022d0| 61 6c 20 70 61 67 65 20 | 79 6f 75 72 73 65 6c 66 |al page |yourself|
|000022e0| 2e 29 0a 58 0a 58 23 23 | 23 20 43 44 43 20 34 36 |.).X.X##|# CDC 46|
|000022f0| 38 30 20 45 50 2f 49 58 | 3a 20 28 49 20 6b 6e 6f |80 EP/IX|: (I kno|
|00002300| 77 20 69 74 20 2a 68 61 | 73 2a 20 73 65 74 73 69 |w it *ha|s* setsi|
|00002310| 64 28 32 29 2c 20 62 75 | 74 20 6e 6f 74 20 77 69 |d(2), bu|t not wi|
|00002320| 74 68 20 62 73 64 34 33 | 29 0a 58 23 20 53 57 49 |th bsd43|).X# SWI|
|00002330| 54 43 48 45 53 20 3d 20 | 2d 73 79 73 74 79 70 65 |TCHES = |-systype|
|00002340| 20 62 73 64 34 33 20 2d | 44 4e 4f 53 45 54 53 49 | bsd43 -|DNOSETSI|
|00002350| 44 0a 58 0a 58 0a 58 0a | 58 23 23 23 20 49 74 20 |D.X.X.X.|X### It |
|00002360| 73 68 6f 75 6c 64 20 6e | 6f 74 20 62 65 20 6e 65 |should n|ot be ne|
|00002370| 63 65 73 73 61 72 79 20 | 74 6f 20 63 68 61 6e 67 |cessary |to chang|
|00002380| 65 20 61 6e 79 74 68 69 | 6e 67 20 62 65 6c 6f 77 |e anythi|ng below|
|00002390| 20 74 68 69 73 20 6c 69 | 6e 65 2e 0a 58 23 23 23 | this li|ne..X###|
|000023a0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000023b0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000023c0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000023d0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 0a |########|#######.|
|000023e0| 58 0a 4d 41 4b 45 20 3d | 20 6d 61 6b 65 0a 53 48 |X.MAKE =| make.SH|
|000023f0| 45 4c 4c 20 3d 20 2f 62 | 69 6e 2f 73 68 0a 42 41 |ELL = /b|in/sh.BA|
|00002400| 53 45 20 3d 20 2f 68 6f | 6d 65 2f 73 74 6f 6e 65 |SE = /ho|me/stone|
|00002410| 2f 6e 69 63 6b 65 6c 2f | 73 72 63 0a 4e 4f 44 45 |/nickel/|src.NODE|
|00002420| 50 41 54 48 20 3d 20 73 | 6f 63 6b 65 74 0a 4e 4f |PATH = s|ocket.NO|
|00002430| 44 45 4e 41 4d 45 20 3d | 20 22 53 6f 63 6b 65 74 |DENAME =| "Socket|
|00002440| 22 0a 54 41 52 47 45 54 | 20 3d 20 73 6f 63 6b 65 |".TARGET| = socke|
|00002450| 74 0a 56 45 52 53 49 4f | 4e 46 49 4c 45 20 3d 20 |t.VERSIO|NFILE = |
|00002460| 09 73 6f 5f 72 65 6c 65 | 61 73 65 2e 63 0a 56 45 |.so_rele|ase.c.VE|
|00002470| 52 53 49 4f 4e 4f 42 4a | 45 43 54 20 3d 09 73 6f |RSIONOBJ|ECT =.so|
|00002480| 5f 72 65 6c 65 61 73 65 | 2e 6f 0a 50 52 4f 47 53 |_release|.o.PROGS|
|00002490| 4f 55 52 43 45 53 20 3d | 20 73 6f 63 6b 65 74 2e |OURCES =| socket.|
|000024a0| 63 20 73 69 67 6c 69 73 | 74 2e 63 20 69 6f 2e 63 |c siglis|t.c io.c|
|000024b0| 20 75 74 69 6c 73 2e 63 | 20 73 6f 63 6b 65 74 70 | utils.c| socketp|
|000024c0| 2e 63 0a 53 4f 55 52 43 | 45 53 20 3d 20 42 4c 55 |.c.SOURC|ES = BLU|
|000024d0| 52 42 20 52 45 41 44 4d | 45 20 43 4f 50 59 52 49 |RB READM|E COPYRI|
|000024e0| 47 48 54 20 49 4e 53 54 | 41 4c 4c 20 43 48 41 4e |GHT INST|ALL CHAN|
|000024f0| 47 45 53 20 5c 0a 58 09 | 73 6f 63 6b 65 74 2e 31 |GES \.X.|socket.1|
|00002500| 20 5c 0a 58 09 24 28 50 | 52 4f 47 53 4f 55 52 43 | \.X.$(P|ROGSOURC|
|00002510| 45 53 29 20 5c 0a 58 09 | 72 66 69 6e 67 65 72 2e |ES) \.X.|rfinger.|
|00002520| 73 68 20 66 69 6e 67 65 | 72 64 2e 73 68 0a 48 45 |sh finge|rd.sh.HE|
|00002530| 41 44 45 52 53 20 3d 20 | 67 6c 6f 62 61 6c 73 2e |ADERS = |globals.|
|00002540| 68 20 70 61 74 63 68 6c | 65 76 65 6c 2e 68 0a 4d |h patchl|evel.h.M|
|00002550| 41 4e 55 41 4c 53 20 3d | 20 24 28 4d 41 4e 31 29 |ANUALS =| $(MAN1)|
|00002560| 0a 4d 41 4e 31 20 3d 20 | 73 6f 63 6b 65 74 2e 31 |.MAN1 = |socket.1|
|00002570| 0a 43 4f 4d 50 4f 4e 45 | 4e 54 53 20 3d 20 24 28 |.COMPONE|NTS = $(|
|00002580| 53 4f 55 52 43 45 53 29 | 20 24 28 48 45 41 44 45 |SOURCES)| $(HEADE|
|00002590| 52 53 29 20 24 28 4d 41 | 4e 55 41 4c 53 29 20 4d |RS) $(MA|NUALS) M|
|000025a0| 61 6b 65 66 69 6c 65 20 | 44 65 70 65 6e 64 65 6e |akefile |Dependen|
|000025b0| 63 69 65 73 0a 4f 42 4a | 45 43 54 53 20 3d 20 24 |cies.OBJ|ECTS = $|
|000025c0| 28 56 45 52 53 49 4f 4e | 4f 42 4a 45 43 54 29 20 |(VERSION|OBJECT) |
|000025d0| 73 6f 63 6b 65 74 2e 6f | 20 73 69 67 6c 69 73 74 |socket.o| siglist|
|000025e0| 2e 6f 20 69 6f 2e 6f 20 | 75 74 69 6c 73 2e 6f 20 |.o io.o |utils.o |
|000025f0| 73 6f 63 6b 65 74 70 2e | 6f 0a 58 0a 61 6c 6c 3a |socketp.|o.X.all:|
|00002600| 20 2b 61 6c 6c 20 24 28 | 41 4c 4c 54 41 52 47 45 | +all $(|ALLTARGE|
|00002610| 54 53 29 0a 58 0a 74 61 | 72 67 65 74 73 3a 20 24 |TS).X.ta|rgets: $|
|00002620| 28 54 41 52 47 45 54 29 | 0a 58 0a 58 24 28 54 41 |(TARGET)|.X.X$(TA|
|00002630| 52 47 45 54 29 3a 20 24 | 28 4c 4f 43 41 4c 4c 49 |RGET): $|(LOCALLI|
|00002640| 42 53 29 20 24 28 4f 42 | 4a 45 43 54 53 29 0a 58 |BS) $(OB|JECTS).X|
|00002650| 09 24 28 43 43 29 20 24 | 28 4c 44 46 4c 41 47 53 |.$(CC) $|(LDFLAGS|
|00002660| 29 20 2d 6f 20 24 28 54 | 41 52 47 45 54 29 20 24 |) -o $(T|ARGET) $|
|00002670| 28 4f 42 4a 45 43 54 53 | 29 20 24 28 4c 4f 43 41 |(OBJECTS|) $(LOCA|
|00002680| 4c 4c 49 42 53 29 20 24 | 28 53 59 53 4c 49 42 53 |LLIBS) $|(SYSLIBS|
|00002690| 29 0a 58 0a 74 61 67 73 | 3a 20 54 41 47 53 0a 54 |).X.tags|: TAGS.T|
|000026a0| 41 47 53 3a 20 24 28 50 | 52 4f 47 53 4f 55 52 43 |AGS: $(P|ROGSOURC|
|000026b0| 45 53 29 20 24 28 48 45 | 41 44 45 52 53 29 0a 58 |ES) $(HE|ADERS).X|
|000026c0| 09 65 74 61 67 73 20 24 | 28 50 52 4f 47 53 4f 55 |.etags $|(PROGSOU|
|000026d0| 52 43 45 53 29 20 24 28 | 48 45 41 44 45 52 53 29 |RCES) $(|HEADERS)|
|000026e0| 0a 58 0a 69 6e 73 74 61 | 6c 6c 74 61 72 67 65 74 |.X.insta|lltarget|
|000026f0| 73 3a 20 24 28 49 4e 53 | 54 41 4c 4c 42 49 4e 50 |s: $(INS|TALLBINP|
|00002700| 41 54 48 29 2f 24 28 54 | 41 52 47 45 54 29 20 69 |ATH)/$(T|ARGET) i|
|00002710| 6e 73 74 61 6c 6c 6d 61 | 6e 75 61 6c 73 0a 58 0a |nstallma|nuals.X.|
|00002720| 58 24 28 49 4e 53 54 41 | 4c 4c 42 49 4e 50 41 54 |X$(INSTA|LLBINPAT|
|00002730| 48 29 2f 24 28 54 41 52 | 47 45 54 29 3a 20 24 28 |H)/$(TAR|GET): $(|
|00002740| 54 41 52 47 45 54 29 0a | 58 09 40 2d 65 63 68 6f |TARGET).|X.@-echo|
|00002750| 20 22 69 6e 73 74 61 6c | 6c 69 6e 67 20 24 28 54 | "instal|ling $(T|
|00002760| 41 52 47 45 54 29 20 69 | 6e 20 24 28 49 4e 53 54 |ARGET) i|n $(INST|
|00002770| 41 4c 4c 42 49 4e 50 41 | 54 48 29 22 3b 20 5c 0a |ALLBINPA|TH)"; \.|
|00002780| 58 09 69 66 20 5b 20 2d | 66 20 24 28 49 4e 53 54 |X.if [ -|f $(INST|
|00002790| 41 4c 4c 42 49 4e 50 41 | 54 48 29 2f 24 28 54 41 |ALLBINPA|TH)/$(TA|
|000027a0| 52 47 45 54 29 20 5d 20 | 26 26 20 5c 0a 58 09 20 |RGET) ] |&& \.X. |
|000027b0| 20 20 5b 20 21 20 2d 77 | 20 24 28 49 4e 53 54 41 | [ ! -w| $(INSTA|
|000027c0| 4c 4c 42 49 4e 50 41 54 | 48 29 2f 24 28 54 41 52 |LLBINPAT|H)/$(TAR|
|000027d0| 47 45 54 29 20 5d 3b 20 | 5c 0a 58 09 74 68 65 6e |GET) ]; |\.X.then|
|000027e0| 20 5c 0a 58 09 20 20 63 | 68 6d 6f 64 20 75 2b 77 | \.X. c|hmod u+w|
|000027f0| 20 24 28 49 4e 53 54 41 | 4c 4c 42 49 4e 50 41 54 | $(INSTA|LLBINPAT|
|00002800| 48 29 2f 24 28 54 41 52 | 47 45 54 29 3b 20 5c 0a |H)/$(TAR|GET); \.|
|00002810| 58 09 66 69 3b 20 5c 0a | 58 09 63 70 20 24 28 54 |X.fi; \.|X.cp $(T|
|00002820| 41 52 47 45 54 29 20 24 | 28 49 4e 53 54 41 4c 4c |ARGET) $|(INSTALL|
|00002830| 42 49 4e 50 41 54 48 29 | 2f 24 28 54 41 52 47 45 |BINPATH)|/$(TARGE|
|00002840| 54 29 3b 20 5c 0a 58 09 | 63 68 6d 6f 64 20 24 28 |T); \.X.|chmod $(|
|00002850| 49 4e 53 54 41 4c 4c 42 | 49 4e 4d 4f 44 45 29 20 |INSTALLB|INMODE) |
|00002860| 24 28 49 4e 53 54 41 4c | 4c 42 49 4e 50 41 54 48 |$(INSTAL|LBINPATH|
|00002870| 29 2f 24 28 54 41 52 47 | 45 54 29 0a 58 0a 69 6e |)/$(TARG|ET).X.in|
|00002880| 73 74 61 6c 6c 6d 61 6e | 75 61 6c 73 3a 20 24 28 |stallman|uals: $(|
|00002890| 4d 41 4e 55 41 4c 53 29 | 0a 58 09 40 2d 5f 6d 61 |MANUALS)|.X.@-_ma|
|000028a0| 6e 75 61 6c 73 3d 22 24 | 28 4d 41 4e 31 29 22 3b |nuals="$|(MAN1)";|
|000028b0| 20 5c 0a 58 09 66 6f 72 | 20 69 20 69 6e 20 24 24 | \.X.for| i in $$|
|000028c0| 5f 6d 61 6e 75 61 6c 73 | 3b 20 5c 0a 58 09 64 6f |_manuals|; \.X.do|
|000028d0| 20 5c 0a 58 09 20 20 65 | 63 68 6f 20 22 69 6e 73 | \.X. e|cho "ins|
|000028e0| 74 61 6c 6c 69 6e 67 20 | 24 24 69 20 69 6e 20 24 |talling |$$i in $|
|000028f0| 28 49 4e 53 54 41 4c 4c | 4d 41 4e 50 41 54 48 29 |(INSTALL|MANPATH)|
|00002900| 2f 6d 61 6e 31 22 3b 20 | 5c 0a 58 09 20 20 69 66 |/man1"; |\.X. if|
|00002910| 20 5b 20 2d 66 20 24 28 | 49 4e 53 54 41 4c 4c 4d | [ -f $(|INSTALLM|
|00002920| 41 4e 50 41 54 48 29 2f | 6d 61 6e 31 2f 24 24 69 |ANPATH)/|man1/$$i|
|00002930| 20 5d 20 26 26 20 5c 0a | 58 09 20 20 20 20 20 5b | ] && \.|X. [|
|00002940| 20 21 20 2d 77 20 24 28 | 49 4e 53 54 41 4c 4c 4d | ! -w $(|INSTALLM|
|00002950| 41 4e 50 41 54 48 29 2f | 6d 61 6e 31 2f 24 24 69 |ANPATH)/|man1/$$i|
|00002960| 20 5d 3b 20 5c 0a 58 09 | 20 20 74 68 65 6e 20 5c | ]; \.X.| then \|
|00002970| 0a 58 09 20 20 20 20 63 | 68 6d 6f 64 20 75 2b 77 |.X. c|hmod u+w|
|00002980| 20 24 28 49 4e 53 54 41 | 4c 4c 4d 41 4e 50 41 54 | $(INSTA|LLMANPAT|
|00002990| 48 29 2f 6d 61 6e 31 2f | 24 24 69 3b 20 5c 0a 58 |H)/man1/|$$i; \.X|
|000029a0| 09 20 20 66 69 3b 20 5c | 0a 58 09 20 20 63 70 20 |. fi; \|.X. cp |
|000029b0| 24 24 69 20 24 28 49 4e | 53 54 41 4c 4c 4d 41 4e |$$i $(IN|STALLMAN|
|000029c0| 50 41 54 48 29 2f 6d 61 | 6e 31 2f 24 24 69 3b 20 |PATH)/ma|n1/$$i; |
|000029d0| 5c 0a 58 09 20 20 63 68 | 6d 6f 64 20 24 28 49 4e |\.X. ch|mod $(IN|
|000029e0| 53 54 41 4c 4c 4d 41 4e | 4d 4f 44 45 29 20 24 28 |STALLMAN|MODE) $(|
|000029f0| 49 4e 53 54 41 4c 4c 4d | 41 4e 50 41 54 48 29 2f |INSTALLM|ANPATH)/|
|00002a00| 6d 61 6e 31 2f 24 24 69 | 3b 20 5c 0a 58 09 64 6f |man1/$$i|; \.X.do|
|00002a10| 6e 65 0a 58 0a 64 6f 63 | 6c 65 61 6e 3a 0a 58 09 |ne.X.doc|lean:.X.|
|00002a20| 72 6d 20 2d 66 20 24 28 | 54 41 52 47 45 54 29 20 |rm -f $(|TARGET) |
|00002a30| 24 28 41 4c 49 41 53 45 | 53 29 20 24 28 4f 42 4a |$(ALIASE|S) $(OBJ|
|00002a40| 45 43 54 53 29 20 63 6f | 72 65 20 2a 7e 0a 58 0a |ECTS) co|re *~.X.|
|00002a50| 58 23 23 0a 58 23 23 20 | 66 6f 6c 6c 6f 77 69 6e |X##.X## |followin|
|00002a60| 67 20 69 6e 74 65 72 6e | 61 6c 73 20 6f 66 20 73 |g intern|als of s|
|00002a70| 68 61 70 65 54 6f 6f 6c | 73 20 52 65 6c 65 61 73 |hapeTool|s Releas|
|00002a80| 65 20 4d 61 6e 61 67 65 | 6d 65 6e 74 20 53 79 73 |e Manage|ment Sys|
|00002a90| 74 65 6d 0a 58 0a 73 75 | 62 73 79 73 74 65 6d 73 |tem.X.su|bsystems|
|00002aa0| 3a 20 23 20 6e 6f 6e 65 | 0a 58 0a 69 6e 73 74 61 |: # none|.X.insta|
|00002ab0| 6c 6c 3a 20 2b 69 6e 73 | 74 61 6c 6c 20 24 28 41 |ll: +ins|tall $(A|
|00002ac0| 4c 4c 54 41 52 47 45 54 | 53 29 0a 58 0a 63 6c 65 |LLTARGET|S).X.cle|
|00002ad0| 61 6e 3a 20 2b 63 6c 65 | 61 6e 20 24 28 41 4c 4c |an: +cle|an $(ALL|
|00002ae0| 54 41 52 47 45 54 53 29 | 0a 58 0a 58 2b 61 6c 6c |TARGETS)|.X.X+all|
|00002af0| 3a 0a 58 09 40 2d 69 66 | 20 5b 20 2d 6e 20 22 24 |:.X.@-if| [ -n "$|
|00002b00| 28 41 4c 4c 54 41 52 47 | 45 54 53 29 22 20 5d 3b |(ALLTARG|ETS)" ];|
|00002b10| 20 5c 0a 58 09 74 68 65 | 6e 20 3a 20 3b 20 5c 0a | \.X.the|n : ; \.|
|00002b20| 58 09 65 6c 73 65 20 5c | 0a 58 09 20 20 24 28 4d |X.else \|.X. $(M|
|00002b30| 41 4b 45 29 20 41 4c 4c | 54 41 52 47 45 54 53 3d |AKE) ALL|TARGETS=|
|00002b40| 22 73 75 62 73 79 73 74 | 65 6d 73 20 74 61 72 67 |"subsyst|ems targ|
|00002b50| 65 74 73 22 20 4d 41 49 | 4e 54 41 52 47 45 54 3d |ets" MAI|NTARGET=|
|00002b60| 61 6c 6c 20 5c 0a 58 09 | 09 42 41 53 45 3d 24 28 |all \.X.|.BASE=$(|
|00002b70| 42 41 53 45 29 20 5c 0a | 58 09 09 53 57 49 54 43 |BASE) \.|X..SWITC|
|00002b80| 48 45 53 3d 22 24 28 53 | 57 49 54 43 48 45 53 29 |HES="$(S|WITCHES)|
|00002b90| 22 20 5c 0a 58 09 09 49 | 4e 53 54 41 4c 4c 42 41 |" \.X..I|NSTALLBA|
|00002ba0| 53 45 3d 24 28 49 4e 53 | 54 41 4c 4c 42 41 53 45 |SE=$(INS|TALLBASE|
|00002bb0| 29 20 5c 0a 58 09 09 49 | 4e 53 54 41 4c 4c 42 49 |) \.X..I|NSTALLBI|
|00002bc0| 4e 50 41 54 48 3d 24 28 | 49 4e 53 54 41 4c 4c 42 |NPATH=$(|INSTALLB|
|00002bd0| 49 4e 50 41 54 48 29 20 | 5c 0a 58 09 09 49 4e 53 |INPATH) |\.X..INS|
|00002be0| 54 41 4c 4c 42 49 4e 4d | 4f 44 45 3d 24 28 49 4e |TALLBINM|ODE=$(IN|
|00002bf0| 53 54 41 4c 4c 42 49 4e | 4d 4f 44 45 29 20 5c 0a |STALLBIN|MODE) \.|
|00002c00| 58 09 09 49 4e 53 54 41 | 4c 4c 4d 41 4e 50 41 54 |X..INSTA|LLMANPAT|
|00002c10| 48 3d 24 28 49 4e 53 54 | 41 4c 4c 4d 41 4e 50 41 |H=$(INST|ALLMANPA|
|00002c20| 54 48 29 20 5c 0a 58 09 | 09 49 4e 53 54 41 4c 4c |TH) \.X.|.INSTALL|
|00002c30| 4d 41 4e 4d 4f 44 45 3d | 24 28 49 4e 53 54 41 4c |MANMODE=|$(INSTAL|
|00002c40| 4c 4d 41 4e 4d 4f 44 45 | 29 20 5c 0a 58 09 09 4d |LMANMODE|) \.X..M|
|00002c50| 41 4b 45 3d 22 24 28 4d | 41 4b 45 29 22 20 5c 0a |AKE="$(M|AKE)" \.|
|00002c60| 58 09 09 53 48 45 4c 4c | 3d 22 24 28 53 48 45 4c |X..SHELL|="$(SHEL|
|00002c70| 4c 29 22 20 5c 0a 58 09 | 09 43 43 3d 22 24 28 43 |L)" \.X.|.CC="$(C|
|00002c80| 43 29 22 20 5c 0a 58 09 | 09 43 46 4c 41 47 53 3d |C)" \.X.|.CFLAGS=|
|00002c90| 22 24 28 43 46 4c 41 47 | 53 29 22 20 5c 0a 58 09 |"$(CFLAG|S)" \.X.|
|00002ca0| 09 4c 44 46 4c 41 47 53 | 3d 22 24 28 4c 44 46 4c |.LDFLAGS|="$(LDFL|
|00002cb0| 41 47 53 29 22 20 5c 0a | 58 09 09 53 59 53 4c 49 |AGS)" \.|X..SYSLI|
|00002cc0| 42 53 3d 22 24 28 53 59 | 53 4c 49 42 53 29 22 20 |BS="$(SY|SLIBS)" |
|00002cd0| 61 6c 6c 3b 20 5c 0a 58 | 09 66 69 0a 58 0a 58 2b |all; \.X|.fi.X.X+|
|00002ce0| 69 6e 73 74 61 6c 6c 3a | 0a 58 09 40 2d 69 66 20 |install:|.X.@-if |
|00002cf0| 5b 20 2d 6e 20 22 24 28 | 41 4c 4c 54 41 52 47 45 |[ -n "$(|ALLTARGE|
|00002d00| 54 53 29 22 20 5d 3b 20 | 5c 0a 58 09 74 68 65 6e |TS)" ]; |\.X.then|
|00002d10| 20 3a 20 3b 20 5c 0a 58 | 09 65 6c 73 65 20 5c 0a | : ; \.X|.else \.|
|00002d20| 58 09 20 20 24 28 4d 41 | 4b 45 29 20 41 4c 4c 54 |X. $(MA|KE) ALLT|
|00002d30| 41 52 47 45 54 53 3d 22 | 73 75 62 73 79 73 74 65 |ARGETS="|subsyste|
|00002d40| 6d 73 20 69 6e 73 74 61 | 6c 6c 74 61 72 67 65 74 |ms insta|lltarget|
|00002d50| 73 22 20 5c 0a 58 09 09 | 4d 41 49 4e 54 41 52 47 |s" \.X..|MAINTARG|
|00002d60| 45 54 3d 69 6e 73 74 61 | 6c 6c 20 5c 0a 58 09 09 |ET=insta|ll \.X..|
|00002d70| 42 41 53 45 3d 24 28 42 | 41 53 45 29 20 5c 0a 58 |BASE=$(B|ASE) \.X|
|00002d80| 09 09 53 57 49 54 43 48 | 45 53 3d 22 24 28 53 57 |..SWITCH|ES="$(SW|
|00002d90| 49 54 43 48 45 53 29 22 | 20 5c 0a 58 09 09 49 4e |ITCHES)"| \.X..IN|
|00002da0| 53 54 41 4c 4c 42 41 53 | 45 3d 24 28 49 4e 53 54 |STALLBAS|E=$(INST|
|00002db0| 41 4c 4c 42 41 53 45 29 | 20 5c 0a 58 09 09 49 4e |ALLBASE)| \.X..IN|
|00002dc0| 53 54 41 4c 4c 42 49 4e | 50 41 54 48 3d 24 28 49 |STALLBIN|PATH=$(I|
|00002dd0| 4e 53 54 41 4c 4c 42 49 | 4e 50 41 54 48 29 20 5c |NSTALLBI|NPATH) \|
|00002de0| 0a 58 09 09 49 4e 53 54 | 41 4c 4c 42 49 4e 4d 4f |.X..INST|ALLBINMO|
|00002df0| 44 45 3d 24 28 49 4e 53 | 54 41 4c 4c 42 49 4e 4d |DE=$(INS|TALLBINM|
|00002e00| 4f 44 45 29 20 5c 0a 58 | 09 09 49 4e 53 54 41 4c |ODE) \.X|..INSTAL|
|00002e10| 4c 4d 41 4e 50 41 54 48 | 3d 24 28 49 4e 53 54 41 |LMANPATH|=$(INSTA|
|00002e20| 4c 4c 4d 41 4e 50 41 54 | 48 29 20 5c 0a 58 09 09 |LLMANPAT|H) \.X..|
|00002e30| 49 4e 53 54 41 4c 4c 4d | 41 4e 4d 4f 44 45 3d 24 |INSTALLM|ANMODE=$|
|00002e40| 28 49 4e 53 54 41 4c 4c | 4d 41 4e 4d 4f 44 45 29 |(INSTALL|MANMODE)|
|00002e50| 20 5c 0a 58 09 09 4d 41 | 4b 45 3d 22 24 28 4d 41 | \.X..MA|KE="$(MA|
|00002e60| 4b 45 29 22 20 5c 0a 58 | 09 09 53 48 45 4c 4c 3d |KE)" \.X|..SHELL=|
|00002e70| 22 24 28 53 48 45 4c 4c | 29 22 20 5c 0a 58 09 09 |"$(SHELL|)" \.X..|
|00002e80| 43 43 3d 22 24 28 43 43 | 29 22 20 5c 0a 58 09 09 |CC="$(CC|)" \.X..|
|00002e90| 43 46 4c 41 47 53 3d 22 | 24 28 43 46 4c 41 47 53 |CFLAGS="|$(CFLAGS|
|00002ea0| 29 22 20 5c 0a 58 09 09 | 4c 44 46 4c 41 47 53 3d |)" \.X..|LDFLAGS=|
|00002eb0| 22 24 28 4c 44 46 4c 41 | 47 53 29 22 20 5c 0a 58 |"$(LDFLA|GS)" \.X|
|00002ec0| 09 09 53 59 53 4c 49 42 | 53 3d 22 24 28 53 59 53 |..SYSLIB|S="$(SYS|
|00002ed0| 4c 49 42 53 29 22 20 69 | 6e 73 74 61 6c 6c 3b 20 |LIBS)" i|nstall; |
|00002ee0| 5c 0a 58 09 66 69 0a 58 | 0a 58 2b 63 6c 65 61 6e |\.X.fi.X|.X+clean|
|00002ef0| 3a 0a 58 09 40 2d 69 66 | 20 5b 20 2d 6e 20 22 24 |:.X.@-if| [ -n "$|
|00002f00| 28 41 4c 4c 54 41 52 47 | 45 54 53 29 22 20 5d 3b |(ALLTARG|ETS)" ];|
|00002f10| 20 5c 0a 58 09 74 68 65 | 6e 20 3a 20 3b 20 5c 0a | \.X.the|n : ; \.|
|00002f20| 58 09 65 6c 73 65 20 5c | 0a 58 09 20 20 24 28 4d |X.else \|.X. $(M|
|00002f30| 41 4b 45 29 20 41 4c 4c | 54 41 52 47 45 54 53 3d |AKE) ALL|TARGETS=|
|00002f40| 22 73 75 62 73 79 73 74 | 65 6d 73 20 64 6f 63 6c |"subsyst|ems docl|
|00002f50| 65 61 6e 22 20 4d 41 49 | 4e 54 41 52 47 45 54 3d |ean" MAI|NTARGET=|
|00002f60| 63 6c 65 61 6e 20 5c 0a | 58 09 09 42 41 53 45 3d |clean \.|X..BASE=|
|00002f70| 24 28 42 41 53 45 29 20 | 5c 0a 58 09 09 53 57 49 |$(BASE) |\.X..SWI|
|00002f80| 54 43 48 45 53 3d 22 24 | 28 53 57 49 54 43 48 45 |TCHES="$|(SWITCHE|
|00002f90| 53 29 22 20 5c 0a 58 09 | 09 49 4e 53 54 41 4c 4c |S)" \.X.|.INSTALL|
|00002fa0| 42 41 53 45 3d 24 28 49 | 4e 53 54 41 4c 4c 42 41 |BASE=$(I|NSTALLBA|
|00002fb0| 53 45 29 20 5c 0a 58 09 | 09 49 4e 53 54 41 4c 4c |SE) \.X.|.INSTALL|
|00002fc0| 42 49 4e 50 41 54 48 3d | 24 28 49 4e 53 54 41 4c |BINPATH=|$(INSTAL|
|00002fd0| 4c 42 49 4e 50 41 54 48 | 29 20 5c 0a 58 09 09 49 |LBINPATH|) \.X..I|
|00002fe0| 4e 53 54 41 4c 4c 42 49 | 4e 4d 4f 44 45 3d 24 28 |NSTALLBI|NMODE=$(|
|00002ff0| 49 4e 53 54 41 4c 4c 42 | 49 4e 4d 4f 44 45 29 20 |INSTALLB|INMODE) |
|00003000| 5c 0a 58 09 09 49 4e 53 | 54 41 4c 4c 4d 41 4e 50 |\.X..INS|TALLMANP|
|00003010| 41 54 48 3d 24 28 49 4e | 53 54 41 4c 4c 4d 41 4e |ATH=$(IN|STALLMAN|
|00003020| 50 41 54 48 29 20 5c 0a | 58 09 09 49 4e 53 54 41 |PATH) \.|X..INSTA|
|00003030| 4c 4c 4d 41 4e 4d 4f 44 | 45 3d 24 28 49 4e 53 54 |LLMANMOD|E=$(INST|
|00003040| 41 4c 4c 4d 41 4e 4d 4f | 44 45 29 20 5c 0a 58 09 |ALLMANMO|DE) \.X.|
|00003050| 09 49 4e 43 4c 55 44 45 | 50 41 54 48 3d 24 28 49 |.INCLUDE|PATH=$(I|
|00003060| 4e 43 4c 55 44 45 50 41 | 54 48 29 20 5c 0a 58 09 |NCLUDEPA|TH) \.X.|
|00003070| 09 4d 41 4b 45 3d 22 24 | 28 4d 41 4b 45 29 22 20 |.MAKE="$|(MAKE)" |
|00003080| 5c 0a 58 09 09 53 48 45 | 4c 4c 3d 22 24 28 53 48 |\.X..SHE|LL="$(SH|
|00003090| 45 4c 4c 29 22 20 5c 0a | 58 09 09 43 43 3d 22 24 |ELL)" \.|X..CC="$|
|000030a0| 28 43 43 29 22 20 5c 0a | 58 09 09 43 46 4c 41 47 |(CC)" \.|X..CFLAG|
|000030b0| 53 3d 22 24 28 43 46 4c | 41 47 53 29 22 20 5c 0a |S="$(CFL|AGS)" \.|
|000030c0| 58 09 09 4c 44 46 4c 41 | 47 53 3d 22 24 28 4c 44 |X..LDFLA|GS="$(LD|
|000030d0| 46 4c 41 47 53 29 22 20 | 5c 0a 58 09 09 53 59 53 |FLAGS)" |\.X..SYS|
|000030e0| 4c 49 42 53 3d 22 24 28 | 53 59 53 4c 49 42 53 29 |LIBS="$(|SYSLIBS)|
|000030f0| 22 20 63 6c 65 61 6e 3b | 20 5c 0a 58 09 66 69 0a |" clean;| \.X.fi.|
|00003100| 45 4e 44 5f 4f 46 5f 46 | 49 4c 45 0a 69 66 20 74 |END_OF_F|ILE.if t|
|00003110| 65 73 74 20 34 35 36 34 | 20 2d 6e 65 20 60 77 63 |est 4564| -ne `wc|
|00003120| 20 2d 63 20 3c 27 4d 61 | 6b 65 66 69 6c 65 27 60 | -c <'Ma|kefile'`|
|00003130| 3b 20 74 68 65 6e 0a 20 | 20 20 20 65 63 68 6f 20 |; then. | echo |
|00003140| 73 68 61 72 3a 20 5c 22 | 27 4d 61 6b 65 66 69 6c |shar: \"|'Makefil|
|00003150| 65 27 5c 22 20 75 6e 70 | 61 63 6b 65 64 20 77 69 |e'\" unp|acked wi|
|00003160| 74 68 20 77 72 6f 6e 67 | 20 73 69 7a 65 21 0a 66 |th wrong| size!.f|
|00003170| 69 0a 23 20 65 6e 64 20 | 6f 66 20 27 4d 61 6b 65 |i.# end |of 'Make|
|00003180| 66 69 6c 65 27 0a 66 69 | 0a 69 66 20 74 65 73 74 |file'.fi|.if test|
|00003190| 20 2d 66 20 27 52 45 41 | 44 4d 45 27 20 2d 61 20 | -f 'REA|DME' -a |
|000031a0| 22 24 7b 31 7d 22 20 21 | 3d 20 22 2d 63 22 20 3b |"${1}" !|= "-c" ;|
|000031b0| 20 74 68 65 6e 20 0a 20 | 20 65 63 68 6f 20 73 68 | then . | echo sh|
|000031c0| 61 72 3a 20 57 69 6c 6c | 20 6e 6f 74 20 63 6c 6f |ar: Will| not clo|
|000031d0| 62 62 65 72 20 65 78 69 | 73 74 69 6e 67 20 66 69 |bber exi|sting fi|
|000031e0| 6c 65 20 5c 22 27 52 45 | 41 44 4d 45 27 5c 22 0a |le \"'RE|ADME'\".|
|000031f0| 65 6c 73 65 0a 65 63 68 | 6f 20 73 68 61 72 3a 20 |else.ech|o shar: |
|00003200| 45 78 74 72 61 63 74 69 | 6e 67 20 5c 22 27 52 45 |Extracti|ng \"'RE|
|00003210| 41 44 4d 45 27 5c 22 20 | 5c 28 36 30 34 33 20 63 |ADME'\" |\(6043 c|
|00003220| 68 61 72 61 63 74 65 72 | 73 5c 29 0a 73 65 64 20 |haracter|s\).sed |
|00003230| 22 73 2f 5e 58 2f 2f 22 | 20 3e 27 52 45 41 44 4d |"s/^X//"| >'READM|
|00003240| 45 27 20 3c 3c 27 45 4e | 44 5f 4f 46 5f 46 49 4c |E' <<'EN|D_OF_FIL|
|00003250| 45 27 0a 48 65 79 20 45 | 6d 61 63 73 2c 20 74 68 |E'.Hey E|macs, th|
|00003260| 69 73 20 69 73 20 2d 2a | 2d 20 74 65 78 74 20 2d |is is -*|- text -|
|00003270| 2a 2d 2e 0a 58 0a 54 68 | 69 73 20 69 73 20 74 68 |*-..X.Th|is is th|
|00003280| 65 20 52 45 41 44 4d 45 | 20 66 69 6c 65 20 66 6f |e README| file fo|
|00003290| 72 20 53 6f 63 6b 65 74 | 2d 31 2e 31 2e 20 20 0a |r Socket|-1.1. .|
|000032a0| 58 0a 58 46 6f 72 20 69 | 6e 66 6f 72 6d 61 74 69 |X.XFor i|nformati|
|000032b0| 6f 6e 20 6f 6e 20 68 6f | 77 20 74 6f 20 62 75 69 |on on ho|w to bui|
|000032c0| 6c 64 20 61 6e 64 20 69 | 6e 73 74 61 6c 6c 20 53 |ld and i|nstall S|
|000032d0| 6f 63 6b 65 74 2c 20 72 | 65 61 64 20 74 68 65 20 |ocket, r|ead the |
|000032e0| 66 69 6c 65 0a 49 4e 53 | 54 41 4c 4c 2e 20 20 50 |file.INS|TALL. P|
|000032f0| 6c 65 61 73 65 20 72 65 | 61 64 20 74 68 65 20 66 |lease re|ad the f|
|00003300| 69 6c 65 20 43 4f 50 59 | 52 49 47 48 54 20 61 62 |ile COPY|RIGHT ab|
|00003310| 6f 75 74 20 74 68 65 20 | 74 65 72 6d 73 20 75 6e |out the |terms un|
|00003320| 64 65 72 20 77 68 69 63 | 68 0a 74 68 69 73 20 70 |der whic|h.this p|
|00003330| 72 6f 67 72 61 6d 20 69 | 73 20 6c 69 63 65 6e 73 |rogram i|s licens|
|00003340| 65 64 20 74 6f 20 79 6f | 75 2e 0a 58 0a 58 0a 57 |ed to yo|u..X.X.W|
|00003350| 68 61 74 20 69 73 20 69 | 74 3f 0a 58 0a 54 68 65 |hat is i|t?.X.The|
|00003360| 20 70 72 6f 67 72 61 6d | 20 53 6f 63 6b 65 74 20 | program| Socket |
|00003370| 69 6d 70 6c 65 6d 65 6e | 74 73 20 61 63 63 65 73 |implemen|ts acces|
|00003380| 73 20 74 6f 20 54 43 50 | 20 73 6f 63 6b 65 74 73 |s to TCP| sockets|
|00003390| 20 66 72 6f 6d 20 73 68 | 65 6c 6c 20 6c 65 76 65 | from sh|ell leve|
|000033a0| 6c 2e 0a 58 46 69 72 73 | 74 20 77 72 69 74 74 65 |l..XFirs|t writte|
|000033b0| 6e 20 66 6f 72 20 74 68 | 65 20 6e 65 65 64 20 74 |n for th|e need t|
|000033c0| 6f 20 6f 70 65 6e 20 61 | 20 73 65 72 76 65 72 20 |o open a| server |
|000033d0| 73 6f 63 6b 65 74 20 61 | 6e 64 20 72 65 61 64 20 |socket a|nd read |
|000033e0| 61 6e 64 20 77 72 69 74 | 65 0a 74 6f 20 74 68 65 |and writ|e.to the|
|000033f0| 20 73 6f 63 6b 65 74 20 | 69 6e 74 65 72 61 63 74 | socket |interact|
|00003400| 69 76 65 6c 79 20 66 6f | 72 20 74 65 73 74 69 6e |ively fo|r testin|
|00003410| 67 20 70 75 72 70 6f 73 | 65 73 2c 20 69 74 20 71 |g purpos|es, it q|
|00003420| 75 69 63 6b 6c 79 20 65 | 76 6f 6c 76 65 64 0a 69 |uickly e|volved.i|
|00003430| 6e 74 6f 20 61 20 67 65 | 6e 65 72 69 63 20 74 6f |nto a ge|neric to|
|00003440| 6f 6c 20 70 72 6f 76 69 | 64 69 6e 67 20 74 68 65 |ol provi|ding the|
|00003450| 20 73 6f 63 6b 65 74 20 | 69 6e 74 65 72 66 61 63 | socket |interfac|
|00003460| 65 20 66 6f 72 20 73 68 | 65 6c 6c 20 73 63 72 69 |e for sh|ell scri|
|00003470| 70 74 0a 61 6e 64 20 69 | 6e 74 65 72 61 63 74 69 |pt.and i|nteracti|
|00003480| 76 65 20 75 73 65 2e 0a | 58 0a 58 0a 43 6c 69 65 |ve use..|X.X.Clie|
|00003490| 6e 74 20 6d 6f 64 65 0a | 58 0a 49 6e 20 63 6c 69 |nt mode.|X.In cli|
|000034a0| 65 6e 74 20 6d 6f 64 65 | 20 28 77 68 69 63 68 20 |ent mode| (which |
|000034b0| 69 73 20 74 68 65 20 64 | 65 66 61 75 6c 74 29 20 |is the d|efault) |
|000034c0| 69 74 20 63 6f 6e 6e 65 | 63 74 73 20 74 6f 20 61 |it conne|cts to a|
|000034d0| 20 67 69 76 65 6e 20 70 | 6f 72 74 20 61 74 20 61 | given p|ort at a|
|000034e0| 0a 67 69 76 65 6e 20 68 | 6f 73 74 2e 20 20 44 61 |.given h|ost. Da|
|000034f0| 74 61 20 72 65 61 64 20 | 66 72 6f 6d 20 74 68 65 |ta read |from the|
|00003500| 20 73 6f 63 6b 65 74 20 | 69 73 20 77 72 69 74 74 | socket |is writt|
|00003510| 65 6e 20 74 6f 20 73 74 | 64 6f 75 74 2c 20 64 61 |en to st|dout, da|
|00003520| 74 61 20 72 65 61 64 0a | 66 72 6f 6d 20 73 74 64 |ta read.|from std|
|00003530| 69 6e 20 69 73 20 77 72 | 69 74 74 65 6e 20 74 6f |in is wr|itten to|
|00003540| 20 74 68 65 20 73 6f 63 | 6b 65 74 2e 20 20 57 68 | the soc|ket. Wh|
|00003550| 65 6e 20 74 68 65 20 70 | 65 65 72 20 63 6c 6f 73 |en the p|eer clos|
|00003560| 65 73 20 74 68 65 0a 63 | 6f 6e 6e 65 63 74 69 6f |es the.c|onnectio|
|00003570| 6e 20 6f 72 20 61 20 73 | 69 67 6e 61 6c 20 69 73 |n or a s|ignal is|
|00003580| 20 72 65 63 65 69 76 65 | 64 2c 20 74 68 65 20 70 | receive|d, the p|
|00003590| 72 6f 67 72 61 6d 20 74 | 65 72 6d 69 6e 61 74 65 |rogram t|erminate|
|000035a0| 73 2e 20 20 41 6e 0a 65 | 78 61 6d 70 6c 65 20 66 |s. An.e|xample f|
|000035b0| 6f 72 20 74 68 69 73 20 | 69 73 20 74 68 65 20 66 |or this |is the f|
|000035c0| 6f 6c 6c 6f 77 69 6e 67 | 20 63 6f 6d 6d 61 6e 64 |ollowing| command|
|000035d0| 3a 0a 58 0a 58 09 25 20 | 73 6f 63 6b 65 74 20 63 |:.X.X.% |socket c|
|000035e0| 6f 6d 61 2e 63 73 2e 74 | 75 2d 62 65 72 6c 69 6e |oma.cs.t|u-berlin|
|000035f0| 2e 64 65 20 6e 6e 74 70 | 0a 58 0a 54 68 69 73 20 |.de nntp|.X.This |
|00003600| 63 6f 6e 6e 65 63 74 73 | 20 74 6f 20 74 68 65 20 |connects| to the |
|00003610| 68 6f 73 74 20 63 6f 6d | 61 2e 63 73 2e 74 75 2d |host com|a.cs.tu-|
|00003620| 62 65 72 6c 69 6e 2e 64 | 65 20 61 74 20 74 68 65 |berlin.d|e at the|
|00003630| 20 6e 6e 74 70 20 70 6f | 72 74 0a 58 28 70 72 6f | nntp po|rt.X(pro|
|00003640| 76 69 64 65 64 20 74 68 | 65 73 65 20 74 77 6f 20 |vided th|ese two |
|00003650| 6e 61 6d 65 73 20 63 61 | 6e 20 62 65 20 72 65 73 |names ca|n be res|
|00003660| 6f 6c 76 65 64 20 74 68 | 72 6f 75 67 68 20 67 65 |olved th|rough ge|
|00003670| 74 68 6f 73 74 62 79 6e | 61 6d 65 28 33 29 20 61 |thostbyn|ame(3) a|
|00003680| 6e 64 0a 67 65 74 73 65 | 72 76 62 79 6e 61 6d 65 |nd.getse|rvbyname|
|00003690| 28 33 29 29 2e 20 20 54 | 68 65 20 75 73 65 72 20 |(3)). T|he user |
|000036a0| 63 61 6e 20 6e 6f 77 20 | 69 73 73 75 65 20 63 6f |can now |issue co|
|000036b0| 6d 6d 61 6e 64 73 20 74 | 6f 20 74 68 65 20 4e 4e |mmands t|o the NN|
|000036c0| 54 50 0a 73 65 72 76 65 | 72 2c 20 61 6e 79 20 6f |TP.serve|r, any o|
|000036d0| 75 74 70 75 74 20 66 72 | 6f 6d 20 74 68 65 20 73 |utput fr|om the s|
|000036e0| 65 72 76 65 72 20 69 73 | 20 77 72 69 74 74 65 6e |erver is| written|
|000036f0| 20 74 6f 20 74 68 65 20 | 75 73 65 72 27 73 20 74 | to the |user's t|
|00003700| 65 72 6d 69 6e 61 6c 2e | 0a 58 0a 58 0a 53 65 72 |erminal.|.X.X.Ser|
|00003710| 76 65 72 20 6d 6f 64 65 | 0a 58 0a 49 6e 20 73 65 |ver mode|.X.In se|
|00003720| 72 76 65 72 20 6d 6f 64 | 65 20 28 69 6e 64 69 63 |rver mod|e (indic|
|00003730| 61 74 65 64 20 62 79 20 | 74 68 65 20 22 2d 73 22 |ated by |the "-s"|
|00003740| 20 63 6f 6d 6d 61 6e 64 | 20 6c 69 6e 65 20 73 77 | command| line sw|
|00003750| 69 74 63 68 29 20 69 74 | 20 62 69 6e 64 73 20 61 |itch) it| binds a|
|00003760| 0a 73 65 72 76 65 72 20 | 73 6f 63 6b 65 74 20 74 |.server |socket t|
|00003770| 6f 20 74 68 65 20 67 69 | 76 65 6e 20 70 6f 72 74 |o the gi|ven port|
|00003780| 20 6f 6e 20 74 68 65 20 | 6c 6f 63 61 6c 20 68 6f | on the |local ho|
|00003790| 73 74 20 61 6e 64 20 61 | 63 63 65 70 74 73 20 61 |st and a|ccepts a|
|000037a0| 0a 63 6f 6e 6e 65 63 74 | 69 6f 6e 2e 20 20 57 68 |.connect|ion. Wh|
|000037b0| 65 6e 20 61 20 63 6c 69 | 65 6e 74 20 63 6f 6e 6e |en a cli|ent conn|
|000037c0| 65 63 74 73 20 74 6f 20 | 74 68 69 73 20 73 6f 63 |ects to |this soc|
|000037d0| 6b 65 74 2c 20 61 6c 6c | 20 64 61 74 61 20 72 65 |ket, all| data re|
|000037e0| 61 64 20 66 72 6f 6d 0a | 74 68 65 20 73 6f 63 6b |ad from.|the sock|
|000037f0| 65 74 20 69 73 20 77 72 | 69 74 74 65 6e 20 74 6f |et is wr|itten to|
|00003800| 20 73 74 64 6f 75 74 2c | 20 64 61 74 61 20 72 65 | stdout,| data re|
|00003810| 61 64 20 66 72 6f 6d 20 | 73 74 64 69 6e 20 69 73 |ad from |stdin is|
|00003820| 20 77 72 69 74 74 65 6e | 20 74 6f 0a 74 68 65 20 | written| to.the |
|00003830| 73 6f 63 6b 65 74 2e 20 | 20 46 6f 72 20 65 78 61 |socket. | For exa|
|00003840| 6d 70 6c 65 2c 20 74 68 | 65 20 63 6f 6d 6d 61 6e |mple, th|e comman|
|00003850| 64 0a 58 0a 58 09 25 20 | 73 6f 63 6b 65 74 20 2d |d.X.X.% |socket -|
|00003860| 73 20 33 39 31 37 0a 58 | 0a 61 63 63 65 70 74 73 |s 3917.X|.accepts|
|00003870| 20 61 20 63 6f 6e 6e 65 | 63 74 69 6f 6e 20 6f 6e | a conne|ction on|
|00003880| 20 70 6f 72 74 20 33 39 | 31 37 2e 20 20 0a 58 0a | port 39|17. .X.|
|00003890| 58 0a 52 65 73 74 72 69 | 63 74 69 6e 67 20 64 61 |X.Restri|cting da|
|000038a0| 74 61 20 66 6c 6f 77 0a | 58 0a 49 74 20 69 73 20 |ta flow.|X.It is |
|000038b0| 6e 6f 74 20 61 6c 77 61 | 79 73 20 64 65 73 69 72 |not alwa|ys desir|
|000038c0| 61 62 6c 65 20 74 6f 20 | 68 61 76 65 20 64 61 74 |able to |have dat|
|000038d0| 61 20 66 6c 6f 77 20 69 | 6e 20 62 6f 74 68 20 64 |a flow i|n both d|
|000038e0| 69 72 65 63 74 69 6f 6e | 73 2c 20 65 2e 67 2e 0a |irection|s, e.g..|
|000038f0| 77 68 65 6e 20 74 68 65 | 20 70 72 6f 67 72 61 6d |when the| program|
|00003900| 20 69 73 20 72 75 6e 6e | 69 6e 67 20 69 6e 20 74 | is runn|ing in t|
|00003910| 68 65 20 62 61 63 6b 67 | 72 6f 75 6e 64 2c 20 69 |he backg|round, i|
|00003920| 74 20 77 6f 75 6c 64 20 | 62 65 20 73 74 6f 70 70 |t would |be stopp|
|00003930| 65 64 20 69 66 0a 69 74 | 20 74 72 69 65 64 20 74 |ed if.it| tried t|
|00003940| 6f 20 72 65 61 64 20 66 | 72 6f 6d 20 74 68 65 20 |o read f|rom the |
|00003950| 74 65 72 6d 69 6e 61 6c | 2e 20 20 53 6f 20 74 68 |terminal|. So th|
|00003960| 65 20 75 73 65 72 20 63 | 61 6e 20 61 64 76 69 73 |e user c|an advis|
|00003970| 65 20 74 68 65 20 70 72 | 6f 67 72 61 6d 0a 6f 6e |e the pr|ogram.on|
|00003980| 6c 79 20 74 6f 20 72 65 | 61 64 20 66 72 6f 6d 20 |ly to re|ad from |
|00003990| 74 68 65 20 73 6f 63 6b | 65 74 20 28 22 2d 72 22 |the sock|et ("-r"|
|000039a0| 29 20 6f 72 20 6f 6e 6c | 79 20 74 6f 20 77 72 69 |) or onl|y to wri|
|000039b0| 74 65 20 74 6f 20 74 68 | 65 20 73 6f 63 6b 65 74 |te to th|e socket|
|000039c0| 0a 58 28 22 2d 77 22 29 | 2e 20 20 45 73 70 65 63 |.X("-w")|. Espec|
|000039d0| 69 61 6c 6c 79 20 77 68 | 65 6e 20 53 6f 63 6b 65 |ially wh|en Socke|
|000039e0| 74 20 65 78 65 63 75 74 | 65 73 20 61 20 70 72 6f |t execut|es a pro|
|000039f0| 67 72 61 6d 20 28 73 65 | 65 20 62 65 6c 6f 77 29 |gram (se|e below)|
|00003a00| 2c 20 69 74 20 69 73 0a | 69 6d 70 6f 72 74 61 6e |, it is.|importan|
|00003a10| 74 20 2a 6e 6f 74 2a 20 | 74 6f 20 77 72 69 74 65 |t *not* |to write|
|00003a20| 20 74 6f 20 74 68 65 20 | 70 72 6f 67 72 61 6d 27 | to the |program'|
|00003a30| 73 20 73 74 64 69 6e 20 | 69 66 20 74 68 65 20 70 |s stdin |if the p|
|00003a40| 72 6f 67 72 61 6d 20 64 | 6f 65 73 6e 27 74 0a 72 |rogram d|oesn't.r|
|00003a50| 65 61 64 20 69 74 2e 20 | 20 54 68 69 73 20 69 73 |ead it. | This is|
|00003a60| 20 74 68 65 20 6d 61 69 | 6e 20 72 65 61 73 6f 6e | the mai|n reason|
|00003a70| 20 77 68 79 20 49 20 61 | 64 64 65 64 20 74 68 69 | why I a|dded thi|
|00003a80| 73 20 6f 70 74 69 6f 6e | 2e 0a 58 0a 58 0a 43 6c |s option|..X.X.Cl|
|00003a90| 6f 73 69 6e 67 20 63 6f | 6e 6e 65 63 74 69 6f 6e |osing co|nnection|
|00003aa0| 20 6f 6e 20 45 4f 46 0a | 58 0a 58 46 6f 72 20 6e | on EOF.|X.XFor n|
|00003ab0| 6f 6e 2d 69 6e 74 65 72 | 61 63 74 69 76 65 20 75 |on-inter|active u|
|00003ac0| 73 65 20 69 74 20 69 73 | 20 6e 6f 74 20 61 6c 77 |se it is| not alw|
|00003ad0| 61 79 73 20 63 6c 65 61 | 72 20 77 68 65 6e 20 74 |ays clea|r when t|
|00003ae0| 6f 20 63 6c 6f 73 65 20 | 74 68 65 0a 6e 65 74 77 |o close |the.netw|
|00003af0| 6f 72 6b 20 63 6f 6e 6e | 65 63 74 69 6f 6e 3b 20 |ork conn|ection; |
|00003b00| 74 68 69 73 20 69 73 20 | 73 74 69 6c 6c 20 61 6e |this is |still an|
|00003b10| 20 75 6e 73 6f 6c 76 65 | 64 20 70 72 6f 62 6c 65 | unsolve|d proble|
|00003b20| 6d 2e 20 20 42 75 74 20 | 6f 66 74 65 6e 20 69 74 |m. But |often it|
|00003b30| 0a 77 69 6c 6c 20 62 65 | 20 65 6e 6f 75 67 68 20 |.will be| enough |
|00003b40| 74 6f 20 63 6c 6f 73 65 | 20 74 68 65 20 63 6f 6e |to close| the con|
|00003b50| 6e 65 63 74 69 6f 6e 20 | 77 68 65 6e 20 73 6f 6d |nection |when som|
|00003b60| 65 20 64 61 74 61 20 68 | 61 73 20 62 65 65 6e 20 |e data h|as been |
|00003b70| 77 72 69 74 74 65 6e 0a | 74 6f 20 74 68 65 20 73 |written.|to the s|
|00003b80| 6f 63 6b 65 74 2e 20 20 | 49 6e 20 74 68 69 73 20 |ocket. |In this |
|00003b90| 63 61 73 65 20 74 68 65 | 20 22 71 75 69 74 22 20 |case the| "quit" |
|00003ba0| 73 77 69 74 63 68 20 28 | 22 2d 71 22 29 20 63 61 |switch (|"-q") ca|
|00003bb0| 6e 20 62 65 20 75 73 65 | 64 3a 0a 77 68 65 6e 20 |n be use|d:.when |
|00003bc0| 61 6e 20 65 6e 64 2d 6f | 66 2d 66 69 6c 65 20 63 |an end-o|f-file c|
|00003bd0| 6f 6e 64 69 74 69 6f 6e | 20 6f 6e 20 73 74 64 69 |ondition| on stdi|
|00003be0| 6e 20 6f 63 63 75 72 73 | 2c 20 53 6f 63 6b 65 74 |n occurs|, Socket|
|00003bf0| 20 63 6c 6f 73 65 73 20 | 74 68 65 0a 63 6f 6e 6e | closes |the.conn|
|00003c00| 65 63 74 69 6f 6e 2e 0a | 58 0a 58 0a 58 45 78 65 |ection..|X.X.XExe|
|00003c10| 63 75 74 69 6e 67 20 61 | 20 70 72 6f 67 72 61 6d |cuting a| program|
|00003c20| 0a 58 0a 41 6e 20 69 6e | 74 65 72 65 73 74 69 6e |.X.An in|terestin|
|00003c30| 67 20 75 73 65 20 6f 66 | 20 61 20 73 65 72 76 65 |g use of| a serve|
|00003c40| 72 20 73 6f 63 6b 65 74 | 20 69 73 20 74 6f 20 65 |r socket| is to e|
|00003c50| 78 65 63 75 74 65 20 61 | 20 70 72 6f 67 72 61 6d |xecute a| program|
|00003c60| 20 77 68 65 6e 20 61 0a | 63 6c 69 65 6e 74 20 63 | when a.|client c|
|00003c70| 6f 6e 6e 65 63 74 73 20 | 74 6f 20 69 74 2e 20 20 |onnects |to it. |
|00003c80| 54 68 69 73 20 64 6f 6e | 65 20 77 69 74 68 20 74 |This don|e with t|
|00003c90| 68 65 20 22 2d 70 22 20 | 73 77 69 74 63 68 2e 20 |he "-p" |switch. |
|00003ca0| 20 53 74 64 69 6e 2c 0a | 73 74 64 6f 75 74 2c 20 | Stdin,.|stdout, |
|00003cb0| 61 6e 64 20 73 74 64 65 | 72 72 20 6f 66 20 74 68 |and stde|rr of th|
|00003cc0| 65 20 70 72 6f 67 72 61 | 6d 20 61 72 65 20 72 65 |e progra|m are re|
|00003cd0| 61 64 20 66 72 6f 6d 20 | 72 65 73 70 2e 20 77 72 |ad from |resp. wr|
|00003ce0| 69 74 74 65 6e 20 74 6f | 20 74 68 65 0a 73 6f 63 |itten to| the.soc|
|00003cf0| 6b 65 74 2e 20 20 53 69 | 6e 63 65 20 74 68 65 20 |ket. Si|nce the |
|00003d00| 73 65 72 76 65 72 20 69 | 73 20 75 73 75 61 6c 6c |server i|s usuall|
|00003d10| 79 20 65 78 70 65 63 74 | 65 64 20 74 6f 20 61 63 |y expect|ed to ac|
|00003d20| 63 65 70 74 20 61 6e 6f | 74 68 65 72 0a 63 6f 6e |cept ano|ther.con|
|00003d30| 6e 65 63 74 69 6f 6e 20 | 61 66 74 65 72 20 61 20 |nection |after a |
|00003d40| 63 6f 6e 6e 65 63 74 69 | 6f 6e 20 68 61 73 20 62 |connecti|on has b|
|00003d50| 65 65 6e 20 63 6c 6f 73 | 65 64 2c 20 74 68 65 20 |een clos|ed, the |
|00003d60| 22 6c 6f 6f 70 22 20 73 | 77 69 74 63 68 0a 58 28 |"loop" s|witch.X(|
|00003d70| 22 2d 6c 22 29 20 6d 61 | 6b 65 73 20 69 74 20 64 |"-l") ma|kes it d|
|00003d80| 6f 20 65 78 61 63 74 6c | 79 20 74 68 61 74 2e 0a |o exactl|y that..|
|00003d90| 58 0a 58 0a 43 52 4c 46 | 20 63 6f 6e 76 65 72 73 |X.X.CRLF| convers|
|00003da0| 69 6f 6e 0a 58 0a 54 68 | 65 20 49 6e 74 65 72 6e |ion.X.Th|e Intern|
|00003db0| 65 74 20 70 72 6f 74 6f | 63 6f 6c 73 20 73 70 65 |et proto|cols spe|
|00003dc0| 63 69 66 79 20 61 20 43 | 52 4c 46 20 73 65 71 75 |cify a C|RLF sequ|
|00003dd0| 65 6e 63 65 20 28 43 61 | 72 72 69 61 67 65 20 52 |ence (Ca|rriage R|
|00003de0| 65 74 75 72 6e 0a 4c 69 | 6e 65 66 65 65 64 29 20 |eturn.Li|nefeed) |
|00003df0| 74 6f 20 74 65 72 6d 69 | 6e 61 74 65 20 61 20 6c |to termi|nate a l|
|00003e00| 69 6e 65 2c 20 77 68 65 | 72 65 61 73 20 55 4e 49 |ine, whe|reas UNI|
|00003e10| 58 20 75 73 65 73 20 6f | 6e 6c 79 20 61 20 73 69 |X uses o|nly a si|
|00003e20| 6e 67 6c 65 20 4c 46 2e | 20 20 49 66 0a 74 68 65 |ngle LF.| If.the|
|00003e30| 20 75 73 65 72 20 73 70 | 65 63 69 66 69 65 73 20 | user sp|ecifies |
|00003e40| 74 68 65 20 22 63 72 6c | 66 22 20 73 77 69 74 63 |the "crl|f" switc|
|00003e50| 68 20 28 22 2d 63 22 29 | 2c 20 61 6c 6c 20 43 52 |h ("-c")|, all CR|
|00003e60| 4c 46 20 73 65 71 75 65 | 6e 63 65 73 20 74 68 61 |LF seque|nces tha|
|00003e70| 74 0a 61 72 65 20 72 65 | 61 64 20 66 72 6f 6d 20 |t.are re|ad from |
|00003e80| 74 68 65 20 73 6f 63 6b | 65 74 20 61 72 65 20 63 |the sock|et are c|
|00003e90| 6f 6e 76 65 72 74 65 64 | 20 74 6f 20 61 20 73 69 |onverted| to a si|
|00003ea0| 6e 67 6c 65 20 4c 46 20 | 6f 6e 20 6f 75 74 70 75 |ngle LF |on outpu|
|00003eb0| 74 2e 20 20 41 6c 6c 0a | 73 69 6e 67 6c 65 20 4c |t. All.|single L|
|00003ec0| 46 73 20 6f 6e 20 69 6e | 70 75 74 20 61 72 65 20 |Fs on in|put are |
|00003ed0| 63 6f 6e 76 65 72 74 65 | 64 20 74 6f 20 61 20 43 |converte|d to a C|
|00003ee0| 52 4c 46 20 73 65 71 75 | 65 6e 63 65 20 77 68 65 |RLF sequ|ence whe|
|00003ef0| 6e 20 77 72 69 74 74 65 | 6e 20 74 6f 0a 74 68 65 |n writte|n to.the|
|00003f00| 20 73 6f 63 6b 65 74 2e | 0a 58 0a 58 0a 42 61 63 | socket.|.X.X.Bac|
|00003f10| 6b 67 72 6f 75 6e 64 20 | 6d 6f 64 65 0a 58 0a 49 |kground |mode.X.I|
|00003f20| 74 20 6d 61 79 20 62 65 | 20 64 65 73 69 72 61 62 |t may be| desirab|
|00003f30| 6c 65 20 66 6f 72 20 61 | 20 73 65 72 76 65 72 20 |le for a| server |
|00003f40| 70 72 6f 67 72 61 6d 20 | 74 6f 20 72 75 6e 20 69 |program |to run i|
|00003f50| 6e 20 62 61 63 6b 67 72 | 6f 75 6e 64 2e 20 46 6f |n backgr|ound. Fo|
|00003f60| 72 0a 74 68 61 74 20 70 | 75 72 70 6f 73 65 20 74 |r.that p|urpose t|
|00003f70| 68 65 20 22 62 61 63 6b | 67 72 6f 75 6e 64 22 20 |he "back|ground" |
|00003f80| 73 77 69 74 63 68 20 28 | 22 2d 62 22 29 20 69 73 |switch (|"-b") is|
|00003f90| 20 70 72 6f 76 69 64 65 | 64 2e 20 20 49 66 20 69 | provide|d. If i|
|00003fa0| 74 20 69 73 0a 73 65 74 | 2c 20 53 6f 63 6b 65 74 |t is.set|, Socket|
|00003fb0| 20 72 75 6e 73 20 69 6e | 20 62 61 63 6b 67 72 6f | runs in| backgro|
|00003fc0| 75 6e 64 2c 20 64 65 74 | 61 63 68 65 73 20 69 74 |und, det|aches it|
|00003fd0| 73 65 6c 66 20 66 72 6f | 6d 20 74 68 65 20 63 6f |self fro|m the co|
|00003fe0| 6e 74 72 6f 6c 6c 69 6e | 67 0a 74 74 79 2c 20 63 |ntrollin|g.tty, c|
|00003ff0| 6c 6f 73 65 73 20 74 68 | 65 20 66 69 6c 65 20 64 |loses th|e file d|
|00004000| 65 73 63 72 69 70 74 6f | 72 73 20 61 73 73 6f 63 |escripto|rs assoc|
|00004010| 69 61 74 65 64 20 77 69 | 74 68 20 74 68 65 20 74 |iated wi|th the t|
|00004020| 74 79 2c 20 61 6e 64 20 | 63 68 61 6e 67 65 73 0a |ty, and |changes.|
|00004030| 69 74 20 63 75 72 72 65 | 6e 74 20 64 69 72 65 63 |it curre|nt direc|
|00004040| 74 6f 72 79 20 74 6f 20 | 74 68 65 20 72 6f 6f 74 |tory to |the root|
|00004050| 20 64 69 72 65 63 74 6f | 72 79 2e 20 20 49 74 20 | directo|ry. It |
|00004060| 69 73 20 73 74 69 6c 6c | 20 70 6f 73 73 69 62 6c |is still| possibl|
|00004070| 65 20 74 6f 0a 72 65 64 | 69 72 65 63 74 20 74 68 |e to.red|irect th|
|00004080| 65 20 73 74 61 6e 64 61 | 72 64 20 66 69 6c 65 20 |e standa|rd file |
|00004090| 64 65 73 63 72 69 70 74 | 6f 72 73 20 74 6f 20 61 |descript|ors to a|
|000040a0| 20 66 69 6c 65 2e 0a 58 | 0a 58 0a 58 46 6f 72 6b | file..X|.X.XFork|
|000040b0| 69 6e 67 20 63 68 69 6c | 64 20 74 6f 20 68 61 6e |ing chil|d to han|
|000040c0| 64 6c 65 20 63 6f 6e 6e | 65 63 74 69 6f 6e 0a 58 |dle conn|ection.X|
|000040d0| 0a 4f 66 74 65 6e 20 6f | 6e 65 20 77 61 6e 74 73 |.Often o|ne wants|
|000040e0| 20 74 68 65 20 73 65 72 | 76 65 72 20 74 6f 20 62 | the ser|ver to b|
|000040f0| 65 20 61 62 6c 65 20 74 | 6f 20 72 65 73 70 6f 6e |e able t|o respon|
|00004100| 64 20 74 6f 20 61 6e 6f | 74 68 65 72 20 63 6c 69 |d to ano|ther cli|
|00004110| 65 6e 74 0a 69 6d 6d 65 | 64 69 61 74 65 6c 79 2c |ent.imme|diately,|
|00004120| 20 65 76 65 6e 20 62 65 | 66 6f 72 65 20 74 68 65 | even be|fore the|
|00004130| 20 63 6f 6e 6e 65 63 74 | 69 6f 6e 20 74 6f 20 74 | connect|ion to t|
|00004140| 68 65 20 70 72 65 76 69 | 6f 75 73 20 63 6c 69 65 |he previ|ous clie|
|00004150| 6e 74 20 68 61 73 0a 62 | 65 65 6e 20 63 6c 6f 73 |nt has.b|een clos|
|00004160| 65 64 2e 20 20 46 6f 72 | 20 74 68 69 73 20 63 61 |ed. For| this ca|
|00004170| 73 65 2c 20 53 6f 63 6b | 65 74 20 63 61 6e 20 66 |se, Sock|et can f|
|00004180| 6f 72 6b 20 61 20 63 6c | 69 65 6e 74 20 74 6f 20 |ork a cl|ient to |
|00004190| 68 61 6e 64 6c 65 20 61 | 0a 63 6f 6e 6e 65 63 74 |handle a|.connect|
|000041a0| 69 6f 6e 20 77 68 69 6c | 65 20 74 68 65 20 66 61 |ion whil|e the fa|
|000041b0| 74 68 65 72 20 70 72 6f | 63 65 73 73 20 61 6c 72 |ther pro|cess alr|
|000041c0| 65 61 64 79 20 61 63 63 | 65 70 74 73 20 74 68 65 |eady acc|epts the|
|000041d0| 20 6e 65 78 74 0a 63 6f | 6e 6e 65 63 74 69 6f 6e | next.co|nnection|
|000041e0| 2e 20 20 54 6f 20 67 65 | 74 20 74 68 69 73 20 62 |. To ge|t this b|
|000041f0| 65 68 61 76 69 6f 75 72 | 2c 20 73 70 65 63 69 66 |ehaviour|, specif|
|00004200| 79 20 74 68 65 20 22 2d | 66 22 20 6f 70 74 69 6f |y the "-|f" optio|
|00004210| 6e 2e 0a 58 0a 58 0a 57 | 69 74 68 20 61 6c 6c 20 |n..X.X.W|ith all |
|00004220| 74 68 65 73 65 20 6f 70 | 74 69 6f 6e 73 2c 20 61 |these op|tions, a|
|00004230| 20 74 79 70 69 63 61 6c | 20 73 65 72 76 65 72 20 | typical| server |
|00004240| 63 61 6c 6c 20 77 6f 75 | 6c 64 20 6c 6f 6f 6b 20 |call wou|ld look |
|00004250| 6c 69 6b 65 0a 58 0a 58 | 09 25 20 73 6f 63 6b 65 |like.X.X|.% socke|
|00004260| 74 20 2d 62 63 66 73 6c | 71 70 20 70 72 6f 67 72 |t -bcfsl|qp progr|
|00004270| 61 6d 20 70 6f 72 74 0a | 58 0a 47 65 65 2c 20 49 |am port.|X.Gee, I|
|00004280| 20 6b 6e 6f 77 20 74 68 | 61 74 27 73 20 61 20 6c | know th|at's a l|
|00004290| 6f 74 20 6f 66 20 6f 70 | 74 69 6f 6e 73 20 66 6f |ot of op|tions fo|
|000042a0| 72 20 74 68 65 20 73 74 | 61 6e 64 61 72 64 20 63 |r the st|andard c|
|000042b0| 61 73 65 2c 20 62 75 74 | 20 49 0a 72 65 61 6c 6c |ase, but| I.reall|
|000042c0| 79 20 77 61 6e 74 20 74 | 6f 20 6d 61 6b 65 20 61 |y want t|o make a|
|000042d0| 6c 6c 20 74 68 65 73 65 | 20 74 68 69 6e 67 73 20 |ll these| things |
|000042e0| 2a 6f 70 74 69 6f 6e 61 | 6c 2a 2e 0a 58 0a 58 0a |*optiona|l*..X.X.|
|000042f0| 56 65 72 62 6f 73 65 0a | 58 0a 41 74 20 6c 61 73 |Verbose.|X.At las|
|00004300| 74 2c 20 74 68 65 72 65 | 20 69 73 20 61 6c 73 6f |t, there| is also|
|00004310| 20 61 20 22 76 65 72 62 | 6f 73 65 22 20 6f 70 74 | a "verb|ose" opt|
|00004320| 69 6f 6e 20 28 22 2d 76 | 22 29 2e 20 49 66 20 74 |ion ("-v|"). If t|
|00004330| 68 69 73 20 6f 70 74 69 | 6f 6e 20 69 73 0a 73 70 |his opti|on is.sp|
|00004340| 65 63 69 66 69 65 64 2c | 20 61 20 6d 65 73 73 61 |ecified,| a messa|
|00004350| 67 65 20 69 73 20 67 69 | 76 65 6e 20 66 6f 72 20 |ge is gi|ven for |
|00004360| 65 61 63 68 20 6f 70 65 | 6e 69 6e 67 20 61 6e 64 |each ope|ning and|
|00004370| 20 63 6c 6f 73 69 6e 67 | 20 6f 66 20 61 0a 63 6f | closing| of a.co|
|00004380| 6e 6e 65 63 74 69 6f 6e | 2e 20 20 54 68 69 73 20 |nnection|. This |
|00004390| 69 73 20 63 6f 6e 76 65 | 6e 69 65 6e 74 20 65 73 |is conve|nient es|
|000043a0| 70 65 63 69 61 6c 6c 79 | 20 69 6e 20 69 6e 74 65 |pecially| in inte|
|000043b0| 72 61 63 74 69 76 65 20 | 75 73 65 2c 20 62 75 74 |ractive |use, but|
|000043c0| 20 63 61 6e 0a 61 6c 73 | 6f 20 70 72 6f 76 69 64 | can.als|o provid|
|000043d0| 65 20 73 6f 6d 65 20 6b | 69 6e 64 20 6f 66 20 6c |e some k|ind of l|
|000043e0| 6f 67 67 69 6e 67 2e 20 | 20 53 65 65 20 66 69 6e |ogging. | See fin|
|000043f0| 67 65 72 64 2e 73 68 20 | 66 6f 72 20 61 6e 20 65 |gerd.sh |for an e|
|00004400| 78 61 6d 70 6c 65 2e 0a | 58 0a 58 0a 57 41 52 4e |xample..|X.X.WARN|
|00004410| 49 4e 47 0a 58 0a 4e 6f | 74 68 69 6e 67 20 70 72 |ING.X.No|thing pr|
|00004420| 65 76 65 6e 74 73 20 79 | 6f 75 20 66 72 6f 6d 20 |events y|ou from |
|00004430| 75 73 69 6e 67 20 53 6f | 63 6b 65 74 20 6c 69 6b |using So|cket lik|
|00004440| 65 20 74 68 69 73 3a 0a | 58 0a 58 09 25 20 73 6f |e this:.|X.X.% so|
|00004450| 63 6b 65 74 20 2d 73 6c | 71 70 20 73 68 20 35 36 |cket -sl|qp sh 56|
|00004460| 37 38 0a 58 0a 54 48 49 | 53 20 49 53 20 44 41 4e |78.X.THI|S IS DAN|
|00004470| 47 45 52 4f 55 53 21 20 | 49 66 20 79 6f 75 72 20 |GEROUS! |If your |
|00004480| 6d 61 63 68 69 6e 65 20 | 69 73 20 63 6f 6e 6e 65 |machine |is conne|
|00004490| 63 74 65 64 20 74 6f 20 | 74 68 65 20 49 6e 74 65 |cted to |the Inte|
|000044a0| 72 6e 65 74 2c 0a 58 2a | 61 6e 79 6f 6e 65 2a 20 |rnet,.X*|anyone* |
|000044b0| 6f 6e 20 74 68 65 20 49 | 6e 74 65 72 6e 65 74 20 |on the I|nternet |
|000044c0| 63 61 6e 20 63 6f 6e 6e | 65 63 74 20 74 6f 20 74 |can conn|ect to t|
|000044d0| 68 69 73 20 73 65 72 76 | 65 72 20 61 6e 64 20 69 |his serv|er and i|
|000044e0| 73 73 75 65 20 73 68 65 | 6c 6c 0a 63 6f 6d 6d 61 |ssue she|ll.comma|
|000044f0| 6e 64 73 20 74 6f 20 79 | 6f 75 72 20 73 68 65 6c |nds to y|our shel|
|00004500| 6c 2e 20 20 54 68 65 73 | 65 20 63 6f 6d 6d 61 6e |l. Thes|e comman|
|00004510| 64 73 20 61 72 65 20 65 | 78 65 63 75 74 65 64 20 |ds are e|xecuted |
|00004520| 77 69 74 68 20 79 6f 75 | 72 20 75 73 65 72 0a 49 |with you|r user.I|
|00004530| 44 2e 20 20 53 6f 6d 65 | 20 70 65 6f 70 6c 65 20 |D. Some| people |
|00004540| 6d 61 79 20 74 68 69 6e | 6b 20 6f 66 20 74 68 69 |may thin|k of thi|
|00004550| 73 20 70 72 6f 67 72 61 | 6d 20 61 73 20 61 20 42 |s progra|m as a B|
|00004560| 41 44 20 54 48 49 4e 47 | 2c 20 62 65 63 61 75 73 |AD THING|, becaus|
|00004570| 65 20 69 74 0a 61 6c 6c | 6f 77 73 20 69 74 73 20 |e it.all|ows its |
|00004580| 75 73 65 72 20 74 6f 20 | 6f 70 65 6e 20 68 69 73 |user to |open his|
|00004590| 20 6d 61 63 68 69 6e 65 | 20 66 6f 72 20 77 6f 72 | machine| for wor|
|000045a0| 6c 64 2d 77 69 64 65 20 | 61 63 63 65 73 73 20 74 |ld-wide |access t|
|000045b0| 6f 20 61 6c 6c 20 6b 69 | 6e 64 73 0a 6f 66 20 6d |o all ki|nds.of m|
|000045c0| 61 6c 69 63 69 6f 75 73 | 20 63 72 61 63 6b 65 72 |alicious| cracker|
|000045d0| 73 2c 20 63 72 61 73 68 | 65 72 73 2c 20 65 74 63 |s, crash|ers, etc|
|000045e0| 2e 20 20 49 20 64 6f 6e | 27 74 20 6b 6e 6f 77 20 |. I don|'t know |
|000045f0| 69 66 20 49 20 73 68 6f | 75 6c 64 0a 63 6f 6e 73 |if I sho|uld.cons|
|00004600| 69 64 65 72 20 74 68 69 | 73 20 61 73 20 61 20 72 |ider thi|s as a r|
|00004610| 65 61 6c 20 73 65 63 75 | 72 69 74 79 20 72 69 73 |eal secu|rity ris|
|00004620| 6b 20 6f 72 20 6e 6f 74 | 2e 20 20 41 6e 79 77 61 |k or not|. Anywa|
|00004630| 79 2c 20 69 74 20 69 73 | 20 6e 6f 74 20 6d 79 0a |y, it is| not my.|
|00004640| 70 72 6f 67 72 61 6d 20 | 77 68 69 63 68 20 69 73 |program |which is|
|00004650| 20 73 6f 20 64 61 6e 67 | 65 72 6f 75 73 20 2d 2d | so dang|erous --|
|00004660| 20 61 6e 79 6f 6e 65 20 | 77 69 74 68 20 6d 6f 64 | anyone |with mod|
|00004670| 65 72 61 74 65 20 70 72 | 6f 67 72 61 6d 6d 69 6e |erate pr|ogrammin|
|00004680| 67 0a 73 6b 69 6c 6c 20 | 63 61 6e 20 77 72 69 74 |g.skill |can writ|
|00004690| 65 20 61 20 73 6f 6d 65 | 74 68 69 6e 67 20 6c 69 |e a some|thing li|
|000046a0| 6b 65 20 74 68 69 73 2e | 0a 58 0a 41 6e 6f 74 68 |ke this.|.X.Anoth|
|000046b0| 65 72 20 70 72 6f 62 6c | 65 6d 20 69 73 20 74 68 |er probl|em is th|
|000046c0| 61 74 20 61 6e 79 20 73 | 65 72 76 65 72 20 70 72 |at any s|erver pr|
|000046d0| 6f 67 72 61 6d 20 74 68 | 61 74 20 75 73 65 73 20 |ogram th|at uses |
|000046e0| 53 6f 63 6b 65 74 20 6d | 61 79 20 6e 6f 74 20 62 |Socket m|ay not b|
|000046f0| 65 0a 73 65 63 75 72 65 | 2e 20 20 49 20 74 72 69 |e.secure|. I tri|
|00004700| 65 64 20 74 6f 20 61 76 | 6f 69 64 20 61 6e 79 20 |ed to av|oid any |
|00004710| 68 6f 6c 65 73 20 2d 2d | 20 65 73 70 65 63 69 61 |holes --| especia|
|00004720| 6c 6c 79 20 74 68 61 74 | 20 6f 6e 65 20 74 68 61 |lly that| one tha|
|00004730| 74 20 6d 61 64 65 0a 66 | 69 6e 67 65 72 64 20 76 |t made.f|ingerd v|
|00004740| 75 6c 6e 65 72 61 62 6c | 65 20 74 6f 20 74 68 65 |ulnerabl|e to the|
|00004750| 20 61 74 74 61 63 6b 20 | 6f 66 20 4d 6f 72 72 69 | attack |of Morri|
|00004760| 73 27 20 49 6e 74 65 72 | 6e 65 74 20 57 6f 72 6d |s' Inter|net Worm|
|00004770| 2c 20 62 75 74 20 49 20 | 64 6f 6e 27 74 0a 67 69 |, but I |don't.gi|
|00004780| 76 65 20 61 6e 79 20 77 | 61 72 72 61 6e 74 79 2e |ve any w|arranty.|
|00004790| 20 20 41 6c 73 6f 20 74 | 68 65 20 70 72 6f 67 72 | Also t|he progr|
|000047a0| 61 6d 20 72 75 6e 20 62 | 79 20 53 6f 63 6b 65 74 |am run b|y Socket|
|000047b0| 20 6d 61 79 20 68 61 76 | 65 20 73 65 63 75 72 69 | may hav|e securi|
|000047c0| 74 79 0a 68 6f 6c 65 73 | 2e 0a 58 0a 49 20 77 6f |ty.holes|..X.I wo|
|000047d0| 75 6c 64 20 6c 69 6b 65 | 20 74 6f 20 68 65 61 72 |uld like| to hear|
|000047e0| 20 79 6f 75 72 20 6f 70 | 69 6e 69 6f 6e 20 61 62 | your op|inion ab|
|000047f0| 6f 75 74 20 74 68 69 73 | 20 74 6f 70 69 63 2e 20 |out this| topic. |
|00004800| 20 44 6f 20 79 6f 75 20 | 63 6f 6e 73 69 64 65 72 | Do you |consider|
|00004810| 20 69 74 0a 61 20 73 65 | 63 75 72 69 74 79 20 72 | it.a se|curity r|
|00004820| 69 73 6b 20 74 6f 20 68 | 61 76 65 20 61 20 70 72 |isk to h|ave a pr|
|00004830| 6f 67 72 61 6d 20 6c 69 | 6b 65 20 53 6f 63 6b 65 |ogram li|ke Socke|
|00004840| 74 20 61 72 6f 75 6e 64 | 3f 0a 58 0a 58 0a 53 61 |t around|?.X.X.Sa|
|00004850| 6d 70 6c 65 20 70 72 6f | 67 72 61 6d 73 0a 58 0a |mple pro|grams.X.|
|00004860| 49 20 69 6e 63 6c 75 64 | 65 64 20 74 77 6f 20 73 |I includ|ed two s|
|00004870| 61 6d 70 6c 65 20 70 72 | 6f 67 72 61 6d 73 2c 20 |ample pr|ograms, |
|00004880| 77 68 69 63 68 20 6d 69 | 6d 69 63 20 74 68 65 20 |which mi|mic the |
|00004890| 62 65 68 61 76 69 6f 72 | 20 6f 66 20 66 69 6e 67 |behavior| of fing|
|000048a0| 65 72 28 31 29 0a 61 6e | 64 20 66 69 6e 67 65 72 |er(1).an|d finger|
|000048b0| 64 28 38 29 2c 20 69 6d | 70 6c 65 6d 65 6e 74 65 |d(8), im|plemente|
|000048c0| 64 20 61 73 20 73 68 65 | 6c 6c 20 73 63 72 69 70 |d as she|ll scrip|
|000048d0| 74 73 20 75 73 69 6e 67 | 20 53 6f 63 6b 65 74 2e |ts using| Socket.|
|000048e0| 20 20 72 66 69 6e 67 65 | 72 2e 73 68 0a 63 61 6e | rfinge|r.sh.can|
|000048f0| 20 6f 6e 6c 79 20 66 69 | 6e 67 65 72 20 72 65 6d | only fi|nger rem|
|00004900| 6f 74 65 20 68 6f 73 74 | 73 2e 20 20 66 69 6e 67 |ote host|s. fing|
|00004910| 65 72 64 2e 73 68 20 69 | 73 20 52 46 43 20 31 32 |erd.sh i|s RFC 12|
|00004920| 38 38 20 63 6f 6d 70 6c | 69 61 6e 74 20 61 6e 64 |88 compl|iant and|
|00004930| 0a 63 61 6e 20 62 65 20 | 75 73 65 64 20 69 6e 64 |.can be |used ind|
|00004940| 65 70 65 6e 64 65 6e 74 | 6c 79 20 6f 66 20 69 6e |ependent|ly of in|
|00004950| 65 74 64 28 38 29 2e 0a | 58 0a 58 0a 43 6f 6d 6d |etd(8)..|X.X.Comm|
|00004960| 65 6e 74 73 0a 58 0a 50 | 6c 65 61 73 65 20 73 65 |ents.X.P|lease se|
|00004970| 6e 64 20 61 6e 79 20 63 | 6f 6d 6d 65 6e 74 73 2c |nd any c|omments,|
|00004980| 20 73 75 67 67 65 73 74 | 69 6f 6e 73 2c 20 62 75 | suggest|ions, bu|
|00004990| 67 20 72 65 70 6f 72 74 | 73 20 65 74 63 2e 20 74 |g report|s etc. t|
|000049a0| 6f 20 6d 65 3a 0a 58 0a | 58 20 20 20 20 4a 75 65 |o me:.X.|X Jue|
|000049b0| 72 67 65 6e 20 4e 69 63 | 6b 65 6c 73 65 6e 0a 58 |rgen Nic|kelsen.X|
|000049c0| 20 20 20 20 53 65 6b 72 | 2e 20 46 52 20 35 2d 36 | Sekr|. FR 5-6|
|000049d0| 0a 58 20 20 20 20 54 55 | 20 42 65 72 6c 69 6e 0a |.X TU| Berlin.|
|000049e0| 58 20 20 20 20 46 72 61 | 6e 6b 6c 69 6e 73 74 72 |X Fra|nklinstr|
|000049f0| 2e 20 32 38 2d 32 39 0a | 58 20 20 20 20 31 30 30 |. 28-29.|X 100|
|00004a00| 30 20 42 65 72 6c 69 6e | 20 31 30 0a 58 20 20 20 |0 Berlin| 10.X |
|00004a10| 20 47 65 72 6d 61 6e 79 | 0a 58 0a 58 20 20 20 20 | Germany|.X.X |
|00004a20| 3c 6e 69 63 6b 65 6c 40 | 63 73 2e 74 75 2d 62 65 |<nickel@|cs.tu-be|
|00004a30| 72 6c 69 6e 2e 64 65 3e | 0a 45 4e 44 5f 4f 46 5f |rlin.de>|.END_OF_|
|00004a40| 46 49 4c 45 0a 69 66 20 | 74 65 73 74 20 36 30 34 |FILE.if |test 604|
|00004a50| 33 20 2d 6e 65 20 60 77 | 63 20 2d 63 20 3c 27 52 |3 -ne `w|c -c <'R|
|00004a60| 45 41 44 4d 45 27 60 3b | 20 74 68 65 6e 0a 20 20 |EADME'`;| then. |
|00004a70| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 5c 22 27 | echo s|har: \"'|
|00004a80| 52 45 41 44 4d 45 27 5c | 22 20 75 6e 70 61 63 6b |README'\|" unpack|
|00004a90| 65 64 20 77 69 74 68 20 | 77 72 6f 6e 67 20 73 69 |ed with |wrong si|
|00004aa0| 7a 65 21 0a 66 69 0a 23 | 20 65 6e 64 20 6f 66 20 |ze!.fi.#| end of |
|00004ab0| 27 52 45 41 44 4d 45 27 | 0a 66 69 0a 69 66 20 74 |'README'|.fi.if t|
|00004ac0| 65 73 74 20 2d 66 20 27 | 66 69 6e 67 65 72 64 2e |est -f '|fingerd.|
|00004ad0| 73 68 27 20 2d 61 20 22 | 24 7b 31 7d 22 20 21 3d |sh' -a "|${1}" !=|
|00004ae0| 20 22 2d 63 22 20 3b 20 | 74 68 65 6e 20 0a 20 20 | "-c" ; |then . |
|00004af0| 65 63 68 6f 20 73 68 61 | 72 3a 20 57 69 6c 6c 20 |echo sha|r: Will |
|00004b00| 6e 6f 74 20 63 6c 6f 62 | 62 65 72 20 65 78 69 73 |not clob|ber exis|
|00004b10| 74 69 6e 67 20 66 69 6c | 65 20 5c 22 27 66 69 6e |ting fil|e \"'fin|
|00004b20| 67 65 72 64 2e 73 68 27 | 5c 22 0a 65 6c 73 65 0a |gerd.sh'|\".else.|
|00004b30| 65 63 68 6f 20 73 68 61 | 72 3a 20 45 78 74 72 61 |echo sha|r: Extra|
|00004b40| 63 74 69 6e 67 20 5c 22 | 27 66 69 6e 67 65 72 64 |cting \"|'fingerd|
|00004b50| 2e 73 68 27 5c 22 20 5c | 28 33 37 31 20 63 68 61 |.sh'\" \|(371 cha|
|00004b60| 72 61 63 74 65 72 73 5c | 29 0a 73 65 64 20 22 73 |racters\|).sed "s|
|00004b70| 2f 5e 58 2f 2f 22 20 3e | 27 66 69 6e 67 65 72 64 |/^X//" >|'fingerd|
|00004b80| 2e 73 68 27 20 3c 3c 27 | 45 4e 44 5f 4f 46 5f 46 |.sh' <<'|END_OF_F|
|00004b90| 49 4c 45 27 0a 58 23 21 | 2f 62 69 6e 2f 73 68 0a |ILE'.X#!|/bin/sh.|
|00004ba0| 58 23 20 24 48 65 61 64 | 65 72 3a 20 66 69 6e 67 |X# $Head|er: fing|
|00004bb0| 65 72 64 2e 73 68 5b 31 | 2e 33 5d 20 53 75 6e 20 |erd.sh[1|.3] Sun |
|00004bc0| 41 75 67 20 20 39 20 30 | 33 3a 34 38 3a 30 36 20 |Aug 9 0|3:48:06 |
|00004bd0| 31 39 39 32 20 6e 69 63 | 6b 65 6c 40 63 73 2e 74 |1992 nic|kel@cs.t|
|00004be0| 75 2d 62 65 72 6c 69 6e | 2e 64 65 20 70 72 6f 70 |u-berlin|.de prop|
|00004bf0| 6f 73 65 64 20 24 0a 58 | 23 0a 58 23 20 66 69 6e |osed $.X|#.X# fin|
|00004c00| 67 65 72 20 64 61 65 6d | 6f 6e 20 70 72 6f 67 72 |ger daem|on progr|
|00004c10| 61 6d 20 75 73 69 6e 67 | 20 73 6f 63 6b 65 74 28 |am using| socket(|
|00004c20| 31 29 20 77 69 74 68 20 | 70 72 69 6d 69 74 69 76 |1) with |primitiv|
|00004c30| 65 20 6c 6f 67 67 69 6e | 67 2e 0a 58 23 20 53 65 |e loggin|g..X# Se|
|00004c40| 74 20 4c 4f 47 46 49 4c | 45 20 74 6f 20 61 20 66 |t LOGFIL|E to a f|
|00004c50| 69 6c 65 20 6f 66 20 79 | 6f 75 72 20 63 68 6f 69 |ile of y|our choi|
|00004c60| 63 65 2e 0a 58 0a 4c 4f | 47 46 49 4c 45 3d 2f 64 |ce..X.LO|GFILE=/d|
|00004c70| 65 76 2f 6e 75 6c 6c 0a | 58 0a 73 6f 63 6b 65 74 |ev/null.|X.socket|
|00004c80| 20 2d 73 71 6c 76 63 70 | 20 27 2f 75 73 72 2f 75 | -sqlvcp| '/usr/u|
|00004c90| 63 62 2f 66 69 6e 67 65 | 72 20 60 68 65 61 64 20 |cb/finge|r `head |
|00004ca0| 2d 31 20 7c 20 73 65 64 | 20 22 73 7c 2f 5b 57 77 |-1 | sed| "s|/[Ww|
|00004cb0| 5d 7c 2d 6c 7c 22 60 27 | 20 5c 0a 58 09 09 66 69 |]|-l|"`'| \.X..fi|
|00004cc0| 6e 67 65 72 20 32 3e 26 | 31 20 7c 20 0a 58 09 77 |nger 2>&|1 | .X.w|
|00004cd0| 68 69 6c 65 20 72 65 61 | 64 20 6c 69 6e 65 20 3b |hile rea|d line ;|
|00004ce0| 20 64 6f 20 0a 58 09 09 | 65 63 68 6f 20 2d 6e 20 | do .X..|echo -n |
|00004cf0| 24 6c 69 6e 65 3a 5c 20 | 3b 20 64 61 74 65 20 3b |$line:\ |; date ;|
|00004d00| 0a 58 09 64 6f 6e 65 20 | 3e 20 24 4c 4f 47 46 49 |.X.done |> $LOGFI|
|00004d10| 4c 45 0a 45 4e 44 5f 4f | 46 5f 46 49 4c 45 0a 69 |LE.END_O|F_FILE.i|
|00004d20| 66 20 74 65 73 74 20 33 | 37 31 20 2d 6e 65 20 60 |f test 3|71 -ne `|
|00004d30| 77 63 20 2d 63 20 3c 27 | 66 69 6e 67 65 72 64 2e |wc -c <'|fingerd.|
|00004d40| 73 68 27 60 3b 20 74 68 | 65 6e 0a 20 20 20 20 65 |sh'`; th|en. e|
|00004d50| 63 68 6f 20 73 68 61 72 | 3a 20 5c 22 27 66 69 6e |cho shar|: \"'fin|
|00004d60| 67 65 72 64 2e 73 68 27 | 5c 22 20 75 6e 70 61 63 |gerd.sh'|\" unpac|
|00004d70| 6b 65 64 20 77 69 74 68 | 20 77 72 6f 6e 67 20 73 |ked with| wrong s|
|00004d80| 69 7a 65 21 0a 66 69 0a | 63 68 6d 6f 64 20 2b 78 |ize!.fi.|chmod +x|
|00004d90| 20 27 66 69 6e 67 65 72 | 64 2e 73 68 27 0a 23 20 | 'finger|d.sh'.# |
|00004da0| 65 6e 64 20 6f 66 20 27 | 66 69 6e 67 65 72 64 2e |end of '|fingerd.|
|00004db0| 73 68 27 0a 66 69 0a 69 | 66 20 74 65 73 74 20 2d |sh'.fi.i|f test -|
|00004dc0| 66 20 27 67 6c 6f 62 61 | 6c 73 2e 68 27 20 2d 61 |f 'globa|ls.h' -a|
|00004dd0| 20 22 24 7b 31 7d 22 20 | 21 3d 20 22 2d 63 22 20 | "${1}" |!= "-c" |
|00004de0| 3b 20 74 68 65 6e 20 0a | 20 20 65 63 68 6f 20 73 |; then .| echo s|
|00004df0| 68 61 72 3a 20 57 69 6c | 6c 20 6e 6f 74 20 63 6c |har: Wil|l not cl|
|00004e00| 6f 62 62 65 72 20 65 78 | 69 73 74 69 6e 67 20 66 |obber ex|isting f|
|00004e10| 69 6c 65 20 5c 22 27 67 | 6c 6f 62 61 6c 73 2e 68 |ile \"'g|lobals.h|
|00004e20| 27 5c 22 0a 65 6c 73 65 | 0a 65 63 68 6f 20 73 68 |'\".else|.echo sh|
|00004e30| 61 72 3a 20 45 78 74 72 | 61 63 74 69 6e 67 20 5c |ar: Extr|acting \|
|00004e40| 22 27 67 6c 6f 62 61 6c | 73 2e 68 27 5c 22 20 5c |"'global|s.h'\" \|
|00004e50| 28 31 33 39 37 20 63 68 | 61 72 61 63 74 65 72 73 |(1397 ch|aracters|
|00004e60| 5c 29 0a 73 65 64 20 22 | 73 2f 5e 58 2f 2f 22 20 |\).sed "|s/^X//" |
|00004e70| 3e 27 67 6c 6f 62 61 6c | 73 2e 68 27 20 3c 3c 27 |>'global|s.h' <<'|
|00004e80| 45 4e 44 5f 4f 46 5f 46 | 49 4c 45 27 0a 58 2f 2a |END_OF_F|ILE'.X/*|
|00004e90| 0a 58 20 20 0a 58 24 48 | 65 61 64 65 72 3a 20 67 |.X .X$H|eader: g|
|00004ea0| 6c 6f 62 61 6c 73 2e 68 | 5b 31 2e 31 30 5d 20 53 |lobals.h|[1.10] S|
|00004eb0| 75 6e 20 41 75 67 20 33 | 30 20 32 31 3a 31 33 3a |un Aug 3|0 21:13:|
|00004ec0| 34 31 20 31 39 39 32 20 | 6e 69 63 6b 65 6c 40 63 |41 1992 |nickel@c|
|00004ed0| 73 2e 74 75 2d 62 65 72 | 6c 69 6e 2e 64 65 20 70 |s.tu-ber|lin.de p|
|00004ee0| 72 6f 70 6f 73 65 64 20 | 24 0a 54 68 69 73 20 66 |roposed |$.This f|
|00004ef0| 69 6c 65 20 69 73 20 70 | 61 72 74 20 6f 66 20 73 |ile is p|art of s|
|00004f00| 6f 63 6b 65 74 28 31 29 | 2e 0a 43 6f 70 79 72 69 |ocket(1)|..Copyri|
|00004f10| 67 68 74 20 28 43 29 20 | 31 39 39 32 20 62 79 20 |ght (C) |1992 by |
|00004f20| 4a 75 65 72 67 65 6e 20 | 4e 69 63 6b 65 6c 73 65 |Juergen |Nickelse|
|00004f30| 6e 20 3c 6e 69 63 6b 65 | 6c 40 63 73 2e 74 75 2d |n <nicke|l@cs.tu-|
|00004f40| 62 65 72 6c 69 6e 2e 64 | 65 3e 0a 50 6c 65 61 73 |berlin.d|e>.Pleas|
|00004f50| 65 20 72 65 61 64 20 74 | 68 65 20 66 69 6c 65 20 |e read t|he file |
|00004f60| 43 4f 50 59 52 49 47 48 | 54 20 66 6f 72 20 66 75 |COPYRIGH|T for fu|
|00004f70| 72 74 68 65 72 20 64 65 | 74 61 69 6c 73 2e 0a 58 |rther de|tails..X|
|00004f80| 0a 58 2a 2f 0a 58 0a 58 | 23 69 6e 63 6c 75 64 65 |.X*/.X.X|#include|
|00004f90| 20 22 70 61 74 63 68 6c | 65 76 65 6c 2e 68 22 0a | "patchl|evel.h".|
|00004fa0| 58 0a 58 2f 2a 20 67 6c | 6f 62 61 6c 73 20 66 6f |X.X/* gl|obals fo|
|00004fb0| 72 20 73 6f 63 6b 65 74 | 20 2a 2f 0a 58 0a 58 23 |r socket| */.X.X#|
|00004fc0| 64 65 66 69 6e 65 20 49 | 4e 09 30 09 09 2f 2a 20 |define I|N.0../* |
|00004fd0| 73 74 61 6e 64 61 72 64 | 20 69 6e 70 75 74 20 2a |standard| input *|
|00004fe0| 2f 0a 58 23 64 65 66 69 | 6e 65 20 4f 55 54 09 31 |/.X#defi|ne OUT.1|
|00004ff0| 09 09 2f 2a 20 73 74 61 | 6e 64 61 72 64 20 6f 75 |../* sta|ndard ou|
|00005000| 74 70 75 74 20 2a 2f 0a | 58 0a 58 23 64 65 66 69 |tput */.|X.X#defi|
|00005010| 6e 65 20 4c 4c 45 4e 09 | 31 30 30 09 09 2f 2a 20 |ne LLEN.|100../* |
|00005020| 62 75 66 66 65 72 20 73 | 69 7a 65 20 66 6f 20 70 |buffer s|ize fo p|
|00005030| 65 72 72 6f 72 32 28 29 | 20 2a 2f 0a 58 0a 58 23 |error2()| */.X.X#|
|00005040| 69 66 64 65 66 20 5f 5f | 53 54 44 43 5f 5f 0a 58 |ifdef __|STDC__.X|
|00005050| 23 64 65 66 69 6e 65 20 | 41 28 61 72 67 73 29 20 |#define |A(args) |
|00005060| 61 72 67 73 0a 58 23 65 | 6c 73 65 0a 58 23 64 65 |args.X#e|lse.X#de|
|00005070| 66 69 6e 65 20 41 28 61 | 72 67 73 29 20 28 29 0a |fine A(a|rgs) ().|
|00005080| 58 23 65 6e 64 69 66 0a | 58 0a 69 6e 74 20 63 72 |X#endif.|X.int cr|
|00005090| 65 61 74 65 5f 73 65 72 | 76 65 72 5f 73 6f 63 6b |eate_ser|ver_sock|
|000050a0| 65 74 20 41 28 28 69 6e | 74 20 70 6f 72 74 2c 20 |et A((in|t port, |
|000050b0| 69 6e 74 20 71 75 65 75 | 65 5f 6c 65 6e 67 74 68 |int queu|e_length|
|000050c0| 29 29 20 3b 0a 69 6e 74 | 20 63 72 65 61 74 65 5f |)) ;.int| create_|
|000050d0| 63 6c 69 65 6e 74 5f 73 | 6f 63 6b 65 74 20 41 28 |client_s|ocket A(|
|000050e0| 28 63 68 61 72 20 2a 2a | 68 6f 73 74 6e 61 6d 65 |(char **|hostname|
|000050f0| 2c 20 69 6e 74 20 70 6f | 72 74 29 29 20 3b 0a 69 |, int po|rt)) ;.i|
|00005100| 6e 74 20 72 65 73 6f 6c | 76 65 5f 73 65 72 76 69 |nt resol|ve_servi|
|00005110| 63 65 20 41 28 28 63 68 | 61 72 20 2a 6e 61 6d 65 |ce A((ch|ar *name|
|00005120| 5f 6f 72 5f 6e 75 6d 62 | 65 72 2c 20 63 68 61 72 |_or_numb|er, char|
|00005130| 20 2a 70 72 6f 74 6f 63 | 6f 6c 2c 20 63 68 61 72 | *protoc|ol, char|
|00005140| 20 2a 2a 6e 61 6d 65 29 | 29 20 3b 0a 76 6f 69 64 | **name)|) ;.void|
|00005150| 20 63 61 74 63 68 73 69 | 67 20 41 28 28 69 6e 74 | catchsi|g A((int|
|00005160| 20 73 69 67 29 29 20 3b | 0a 76 6f 69 64 20 75 73 | sig)) ;|.void us|
|00005170| 61 67 65 20 41 28 28 76 | 6f 69 64 29 29 20 3b 0a |age A((v|oid)) ;.|
|00005180| 69 6e 74 20 64 6f 5f 72 | 65 61 64 5f 77 72 69 74 |int do_r|ead_writ|
|00005190| 65 20 41 28 28 69 6e 74 | 20 66 72 6f 6d 2c 20 69 |e A((int| from, i|
|000051a0| 6e 74 20 74 6f 29 29 20 | 3b 0a 69 6e 74 20 64 6f |nt to)) |;.int do|
|000051b0| 5f 77 72 69 74 65 20 41 | 28 28 63 68 61 72 20 2a |_write A|((char *|
|000051c0| 62 75 66 66 65 72 2c 20 | 69 6e 74 20 73 69 7a 65 |buffer, |int size|
|000051d0| 2c 20 69 6e 74 20 74 6f | 29 29 20 3b 0a 63 68 61 |, int to|)) ;.cha|
|000051e0| 72 20 2a 73 6f 5f 72 65 | 6c 65 61 73 65 20 41 28 |r *so_re|lease A(|
|000051f0| 28 76 6f 69 64 29 29 20 | 3b 0a 76 6f 69 64 20 6f |(void)) |;.void o|
|00005200| 70 65 6e 5f 70 69 70 65 | 73 20 41 28 28 63 68 61 |pen_pipe|s A((cha|
|00005210| 72 20 2a 70 72 6f 67 29 | 29 20 3b 0a 76 6f 69 64 |r *prog)|) ;.void|
|00005220| 20 77 61 69 74 5f 66 6f | 72 5f 63 68 69 6c 64 72 | wait_fo|r_childr|
|00005230| 65 6e 20 41 28 28 76 6f | 69 64 29 29 20 3b 0a 76 |en A((vo|id)) ;.v|
|00005240| 6f 69 64 20 70 65 72 72 | 6f 72 32 20 41 28 28 63 |oid perr|or2 A((c|
|00005250| 68 61 72 20 2a 73 29 29 | 20 3b 0a 76 6f 69 64 20 |har *s))| ;.void |
|00005260| 61 64 64 5f 63 72 73 20 | 41 28 28 63 68 61 72 20 |add_crs |A((char |
|00005270| 2a 66 72 6f 6d 2c 20 63 | 68 61 72 20 2a 74 6f 2c |*from, c|har *to,|
|00005280| 20 69 6e 74 20 2a 73 69 | 7a 65 70 29 29 20 3b 0a | int *si|zep)) ;.|
|00005290| 76 6f 69 64 20 73 74 72 | 69 70 5f 63 72 73 20 41 |void str|ip_crs A|
|000052a0| 28 28 63 68 61 72 20 2a | 66 72 6f 6d 2c 20 63 68 |((char *|from, ch|
|000052b0| 61 72 20 2a 74 6f 2c 20 | 69 6e 74 20 2a 73 69 7a |ar *to, |int *siz|
|000052c0| 65 70 29 29 20 3b 0a 76 | 6f 69 64 20 62 61 63 6b |ep)) ;.v|oid back|
|000052d0| 67 72 6f 75 6e 64 20 41 | 28 28 76 6f 69 64 29 29 |ground A|((void))|
|000052e0| 20 3b 0a 58 0a 65 78 74 | 65 72 6e 20 69 6e 74 20 | ;.X.ext|ern int |
|000052f0| 65 72 72 6e 6f 20 3b 0a | 58 0a 58 2f 2a 20 67 6c |errno ;.|X.X/* gl|
|00005300| 6f 62 61 6c 20 76 61 72 | 69 61 62 6c 65 73 20 2a |obal var|iables *|
|00005310| 2f 0a 65 78 74 65 72 6e | 20 69 6e 74 20 73 65 72 |/.extern| int ser|
|00005320| 76 65 72 66 6c 61 67 20 | 3b 0a 65 78 74 65 72 6e |verflag |;.extern|
|00005330| 20 69 6e 74 20 6c 6f 6f | 70 66 6c 61 67 20 3b 0a | int loo|pflag ;.|
|00005340| 65 78 74 65 72 6e 20 69 | 6e 74 20 76 65 72 62 6f |extern i|nt verbo|
|00005350| 73 65 66 6c 61 67 20 3b | 0a 65 78 74 65 72 6e 20 |seflag ;|.extern |
|00005360| 69 6e 74 20 72 65 61 64 | 6f 6e 6c 79 66 6c 61 67 |int read|onlyflag|
|00005370| 20 3b 0a 65 78 74 65 72 | 6e 20 69 6e 74 20 77 72 | ;.exter|n int wr|
|00005380| 69 74 65 6f 6e 6c 79 66 | 6c 61 67 20 3b 0a 65 78 |iteonlyf|lag ;.ex|
|00005390| 74 65 72 6e 20 69 6e 74 | 20 71 75 69 74 66 6c 61 |tern int| quitfla|
|000053a0| 67 20 3b 0a 65 78 74 65 | 72 6e 20 69 6e 74 20 63 |g ;.exte|rn int c|
|000053b0| 72 6c 66 66 6c 61 67 20 | 3b 0a 65 78 74 65 72 6e |rlfflag |;.extern|
|000053c0| 20 69 6e 74 20 61 63 74 | 69 76 65 5f 73 6f 63 6b | int act|ive_sock|
|000053d0| 65 74 20 3b 0a 65 78 74 | 65 72 6e 20 63 68 61 72 |et ;.ext|ern char|
|000053e0| 20 2a 70 72 6f 67 6e 61 | 6d 65 20 3b 0a 65 78 74 | *progna|me ;.ext|
|000053f0| 65 72 6e 20 63 68 61 72 | 20 2a 73 79 73 5f 65 72 |ern char| *sys_er|
|00005400| 72 6c 69 73 74 5b 5d 2c | 20 2a 73 79 73 5f 73 69 |rlist[],| *sys_si|
|00005410| 67 6c 69 73 74 5b 5d 20 | 3b 0a 45 4e 44 5f 4f 46 |glist[] |;.END_OF|
|00005420| 5f 46 49 4c 45 0a 69 66 | 20 74 65 73 74 20 31 33 |_FILE.if| test 13|
|00005430| 39 37 20 2d 6e 65 20 60 | 77 63 20 2d 63 20 3c 27 |97 -ne `|wc -c <'|
|00005440| 67 6c 6f 62 61 6c 73 2e | 68 27 60 3b 20 74 68 65 |globals.|h'`; the|
|00005450| 6e 0a 20 20 20 20 65 63 | 68 6f 20 73 68 61 72 3a |n. ec|ho shar:|
|00005460| 20 5c 22 27 67 6c 6f 62 | 61 6c 73 2e 68 27 5c 22 | \"'glob|als.h'\"|
|00005470| 20 75 6e 70 61 63 6b 65 | 64 20 77 69 74 68 20 77 | unpacke|d with w|
|00005480| 72 6f 6e 67 20 73 69 7a | 65 21 0a 66 69 0a 23 20 |rong siz|e!.fi.# |
|00005490| 65 6e 64 20 6f 66 20 27 | 67 6c 6f 62 61 6c 73 2e |end of '|globals.|
|000054a0| 68 27 0a 66 69 0a 69 66 | 20 74 65 73 74 20 2d 66 |h'.fi.if| test -f|
|000054b0| 20 27 69 6f 2e 63 27 20 | 2d 61 20 22 24 7b 31 7d | 'io.c' |-a "${1}|
|000054c0| 22 20 21 3d 20 22 2d 63 | 22 20 3b 20 74 68 65 6e |" != "-c|" ; then|
|000054d0| 20 0a 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 57 | . echo| shar: W|
|000054e0| 69 6c 6c 20 6e 6f 74 20 | 63 6c 6f 62 62 65 72 20 |ill not |clobber |
|000054f0| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 20 5c 22 |existing| file \"|
|00005500| 27 69 6f 2e 63 27 5c 22 | 0a 65 6c 73 65 0a 65 63 |'io.c'\"|.else.ec|
|00005510| 68 6f 20 73 68 61 72 3a | 20 45 78 74 72 61 63 74 |ho shar:| Extract|
|00005520| 69 6e 67 20 5c 22 27 69 | 6f 2e 63 27 5c 22 20 5c |ing \"'i|o.c'\" \|
|00005530| 28 33 30 33 30 20 63 68 | 61 72 61 63 74 65 72 73 |(3030 ch|aracters|
|00005540| 5c 29 0a 73 65 64 20 22 | 73 2f 5e 58 2f 2f 22 20 |\).sed "|s/^X//" |
|00005550| 3e 27 69 6f 2e 63 27 20 | 3c 3c 27 45 4e 44 5f 4f |>'io.c' |<<'END_O|
|00005560| 46 5f 46 49 4c 45 27 0a | 58 2f 2a 0a 58 0a 58 24 |F_FILE'.|X/*.X.X$|
|00005570| 48 65 61 64 65 72 3a 20 | 69 6f 2e 63 5b 31 2e 31 |Header: |io.c[1.1|
|00005580| 30 5d 20 53 75 6e 20 41 | 75 67 20 33 30 20 31 39 |0] Sun A|ug 30 19|
|00005590| 3a 32 31 3a 31 38 20 31 | 39 39 32 20 6e 69 63 6b |:21:18 1|992 nick|
|000055a0| 65 6c 40 63 73 2e 74 75 | 2d 62 65 72 6c 69 6e 2e |el@cs.tu|-berlin.|
|000055b0| 64 65 20 70 72 6f 70 6f | 73 65 64 20 24 0a 54 68 |de propo|sed $.Th|
|000055c0| 69 73 20 66 69 6c 65 20 | 69 73 20 70 61 72 74 20 |is file |is part |
|000055d0| 6f 66 20 73 6f 63 6b 65 | 74 28 31 29 2e 0a 43 6f |of socke|t(1)..Co|
|000055e0| 70 79 72 69 67 68 74 20 | 28 43 29 20 31 39 39 32 |pyright |(C) 1992|
|000055f0| 20 62 79 20 4a 75 65 72 | 67 65 6e 20 4e 69 63 6b | by Juer|gen Nick|
|00005600| 65 6c 73 65 6e 20 3c 6e | 69 63 6b 65 6c 40 63 73 |elsen <n|ickel@cs|
|00005610| 2e 74 75 2d 62 65 72 6c | 69 6e 2e 64 65 3e 0a 50 |.tu-berl|in.de>.P|
|00005620| 6c 65 61 73 65 20 72 65 | 61 64 20 74 68 65 20 66 |lease re|ad the f|
|00005630| 69 6c 65 20 43 4f 50 59 | 52 49 47 48 54 20 66 6f |ile COPY|RIGHT fo|
|00005640| 72 20 66 75 72 74 68 65 | 72 20 64 65 74 61 69 6c |r furthe|r detail|
|00005650| 73 2e 0a 58 0a 58 2a 2f | 0a 58 0a 58 23 64 65 66 |s..X.X*/|.X.X#def|
|00005660| 69 6e 65 20 5f 42 53 44 | 09 09 09 2f 2a 20 41 49 |ine _BSD|.../* AI|
|00005670| 58 20 2a 6c 6f 76 65 73 | 2a 20 74 68 69 73 20 2a |X *loves|* this *|
|00005680| 2f 0a 58 0a 58 23 69 6e | 63 6c 75 64 65 20 3c 73 |/.X.X#in|clude <s|
|00005690| 79 73 2f 74 79 70 65 73 | 2e 68 3e 0a 58 23 69 6e |ys/types|.h>.X#in|
|000056a0| 63 6c 75 64 65 20 3c 73 | 79 73 2f 74 69 6d 65 2e |clude <s|ys/time.|
|000056b0| 68 3e 0a 58 23 69 66 64 | 65 66 20 49 53 43 0a 58 |h>.X#ifd|ef ISC.X|
|000056c0| 23 69 6e 63 6c 75 64 65 | 20 3c 73 79 73 2f 62 73 |#include| <sys/bs|
|000056d0| 64 74 79 70 65 73 2e 68 | 3e 0a 58 23 65 6e 64 69 |dtypes.h|>.X#endi|
|000056e0| 66 0a 58 23 69 6e 63 6c | 75 64 65 20 3c 65 72 72 |f.X#incl|ude <err|
|000056f0| 6e 6f 2e 68 3e 0a 58 23 | 69 6e 63 6c 75 64 65 20 |no.h>.X#|include |
|00005700| 3c 73 74 64 69 6f 2e 68 | 3e 0a 58 23 69 6e 63 6c |<stdio.h|>.X#incl|
|00005710| 75 64 65 20 22 67 6c 6f | 62 61 6c 73 2e 68 22 0a |ude "glo|bals.h".|
|00005720| 58 0a 58 2f 2a 20 72 65 | 61 64 20 66 72 6f 6d 20 |X.X/* re|ad from |
|00005730| 66 72 6f 6d 2c 20 77 72 | 69 74 65 20 74 6f 20 74 |from, wr|ite to t|
|00005740| 6f 2e 20 73 65 6c 65 63 | 74 28 32 29 20 68 61 73 |o. selec|t(2) has|
|00005750| 20 72 65 74 75 72 6e 65 | 64 2c 20 73 6f 20 69 6e | returne|d, so in|
|00005760| 70 75 74 0a 58 20 2a 20 | 6d 75 73 74 20 62 65 20 |put.X * |must be |
|00005770| 61 76 61 69 6c 61 62 6c | 65 2e 20 2a 2f 0a 69 6e |availabl|e. */.in|
|00005780| 74 20 64 6f 5f 72 65 61 | 64 5f 77 72 69 74 65 28 |t do_rea|d_write(|
|00005790| 66 72 6f 6d 2c 20 74 6f | 29 0a 69 6e 74 20 66 72 |from, to|).int fr|
|000057a0| 6f 6d 2c 20 74 6f 20 3b | 0a 58 7b 0a 58 20 20 20 |om, to ;|.X{.X |
|000057b0| 20 69 6e 74 20 73 69 7a | 65 20 3b 0a 58 20 20 20 | int siz|e ;.X |
|000057c0| 20 63 68 61 72 20 69 6e | 70 75 74 5f 62 75 66 66 | char in|put_buff|
|000057d0| 65 72 5b 42 55 46 53 49 | 5a 5d 20 3b 0a 58 20 20 |er[BUFSI|Z] ;.X |
|000057e0| 20 20 0a 58 20 20 20 20 | 69 66 20 28 28 73 69 7a | .X |if ((siz|
|000057f0| 65 20 3d 20 72 65 61 64 | 28 66 72 6f 6d 2c 20 69 |e = read|(from, i|
|00005800| 6e 70 75 74 5f 62 75 66 | 66 65 72 2c 20 42 55 46 |nput_buf|fer, BUF|
|00005810| 53 49 5a 29 29 20 3d 3d | 20 2d 31 29 20 7b 0a 58 |SIZ)) ==| -1) {.X|
|00005820| 09 70 65 72 72 6f 72 32 | 28 22 72 65 61 64 22 29 |.perror2|("read")|
|00005830| 20 3b 0a 58 09 72 65 74 | 75 72 6e 20 2d 31 20 3b | ;.X.ret|urn -1 ;|
|00005840| 0a 58 20 20 20 20 7d 0a | 58 20 20 20 20 69 66 20 |.X }.|X if |
|00005850| 28 73 69 7a 65 20 3d 3d | 20 30 29 20 7b 09 09 2f |(size ==| 0) {../|
|00005860| 2a 20 65 6e 64 2d 6f 66 | 2d 66 69 6c 65 20 63 6f |* end-of|-file co|
|00005870| 6e 64 69 74 69 6f 6e 20 | 2a 2f 0a 58 09 69 66 20 |ndition |*/.X.if |
|00005880| 28 66 72 6f 6d 20 3d 3d | 20 61 63 74 69 76 65 5f |(from ==| active_|
|00005890| 73 6f 63 6b 65 74 29 20 | 7b 0a 58 09 20 20 20 20 |socket) |{.X. |
|000058a0| 2f 2a 20 69 66 20 69 74 | 20 77 61 73 20 74 68 65 |/* if it| was the|
|000058b0| 20 73 6f 63 6b 65 74 2c | 20 74 68 65 20 63 6f 6e | socket,| the con|
|000058c0| 6e 65 63 74 69 6f 6e 20 | 69 73 20 63 6c 6f 73 65 |nection |is close|
|000058d0| 64 20 2a 2f 0a 58 09 20 | 20 20 20 69 66 20 28 76 |d */.X. | if (v|
|000058e0| 65 72 62 6f 73 65 66 6c | 61 67 29 20 7b 0a 58 09 |erbosefl|ag) {.X.|
|000058f0| 09 66 70 72 69 6e 74 66 | 28 73 74 64 65 72 72 2c |.fprintf|(stderr,|
|00005900| 20 22 63 6f 6e 6e 65 63 | 74 69 6f 6e 20 63 6c 6f | "connec|tion clo|
|00005910| 73 65 64 20 62 79 20 70 | 65 65 72 5c 6e 22 29 20 |sed by p|eer\n") |
|00005920| 3b 0a 58 09 20 20 20 20 | 7d 0a 58 09 20 20 20 20 |;.X. |}.X. |
|00005930| 72 65 74 75 72 6e 20 2d | 31 20 3b 0a 58 09 7d 20 |return -|1 ;.X.} |
|00005940| 65 6c 73 65 20 7b 0a 58 | 09 20 20 20 20 69 66 20 |else {.X|. if |
|00005950| 28 71 75 69 74 66 6c 61 | 67 29 20 7b 0a 58 09 09 |(quitfla|g) {.X..|
|00005960| 2f 2a 20 77 65 20 63 6c | 6f 73 65 20 63 6f 6e 6e |/* we cl|ose conn|
|00005970| 65 63 74 69 6f 6e 20 6c | 61 74 65 72 20 2a 2f 0a |ection l|ater */.|
|00005980| 58 09 09 69 66 20 28 76 | 65 72 62 6f 73 65 66 6c |X..if (v|erbosefl|
|00005990| 61 67 29 20 7b 0a 58 09 | 09 20 20 20 20 66 70 72 |ag) {.X.|. fpr|
|000059a0| 69 6e 74 66 28 73 74 64 | 65 72 72 2c 20 22 63 6f |intf(std|err, "co|
|000059b0| 6e 6e 65 63 74 69 6f 6e | 20 63 6c 6f 73 65 64 5c |nnection| closed\|
|000059c0| 6e 22 29 20 3b 0a 58 09 | 09 7d 0a 58 09 09 72 65 |n") ;.X.|.}.X..re|
|000059d0| 74 75 72 6e 20 2d 31 20 | 3b 0a 58 09 20 20 20 20 |turn -1 |;.X. |
|000059e0| 7d 20 65 6c 73 65 20 69 | 66 20 28 76 65 72 62 6f |} else i|f (verbo|
|000059f0| 73 65 66 6c 61 67 29 20 | 7b 0a 58 09 09 66 70 72 |seflag) |{.X..fpr|
|00005a00| 69 6e 74 66 28 73 74 64 | 65 72 72 2c 20 22 65 6e |intf(std|err, "en|
|00005a10| 64 20 6f 66 20 69 6e 70 | 75 74 20 6f 6e 20 73 74 |d of inp|ut on st|
|00005a20| 64 69 6e 5c 6e 22 29 20 | 3b 0a 58 09 20 20 20 20 |din\n") |;.X. |
|00005a30| 7d 0a 58 09 20 20 20 20 | 72 65 61 64 6f 6e 6c 79 |}.X. |readonly|
|00005a40| 66 6c 61 67 20 3d 20 31 | 20 3b 0a 58 09 20 20 20 |flag = 1| ;.X. |
|00005a50| 20 72 65 74 75 72 6e 20 | 31 20 3b 0a 58 09 7d 0a | return |1 ;.X.}.|
|00005a60| 58 20 20 20 20 7d 0a 58 | 20 20 20 20 72 65 74 75 |X }.X| retu|
|00005a70| 72 6e 20 64 6f 5f 77 72 | 69 74 65 28 69 6e 70 75 |rn do_wr|ite(inpu|
|00005a80| 74 5f 62 75 66 66 65 72 | 2c 20 73 69 7a 65 2c 20 |t_buffer|, size, |
|00005a90| 74 6f 29 20 3b 0a 58 0a | 58 7d 0a 58 0a 58 2f 2a |to) ;.X.|X}.X.X/*|
|00005aa0| 20 77 72 69 74 65 20 74 | 68 65 20 62 75 66 66 65 | write t|he buffe|
|00005ab0| 72 3b 20 69 6e 20 73 75 | 63 63 65 73 73 69 76 65 |r; in su|ccessive|
|00005ac0| 20 70 69 65 63 65 73 2c | 20 69 66 20 6e 65 63 65 | pieces,| if nece|
|00005ad0| 73 73 61 72 79 2e 20 2a | 2f 0a 69 6e 74 20 64 6f |ssary. *|/.int do|
|00005ae0| 5f 77 72 69 74 65 28 62 | 75 66 66 65 72 2c 20 73 |_write(b|uffer, s|
|00005af0| 69 7a 65 2c 20 74 6f 29 | 0a 63 68 61 72 20 2a 62 |ize, to)|.char *b|
|00005b00| 75 66 66 65 72 20 3b 0a | 69 6e 74 20 73 69 7a 65 |uffer ;.|int size|
|00005b10| 2c 20 74 6f 20 3b 0a 58 | 7b 0a 58 20 20 20 20 63 |, to ;.X|{.X c|
|00005b20| 68 61 72 20 62 75 66 66 | 65 72 32 5b 32 20 2a 20 |har buff|er2[2 * |
|00005b30| 42 55 46 53 49 5a 5d 20 | 3b 09 2f 2a 20 65 78 70 |BUFSIZ] |;./* exp|
|00005b40| 61 6e 64 69 6e 67 20 6c | 66 27 73 20 74 6f 20 63 |anding l|f's to c|
|00005b50| 72 6c 66 27 73 20 63 61 | 6e 0a 58 09 09 09 09 20 |rlf's ca|n.X.... |
|00005b60| 2a 20 6d 61 6b 65 20 74 | 68 65 20 62 6c 6f 63 6b |* make t|he block|
|00005b70| 20 74 77 69 63 65 20 61 | 73 20 62 69 67 20 61 74 | twice a|s big at|
|00005b80| 20 6d 6f 73 74 20 2a 2f | 0a 58 20 20 20 20 69 6e | most */|.X in|
|00005b90| 74 20 77 72 69 74 74 65 | 6e 20 3b 0a 58 0a 58 20 |t writte|n ;.X.X |
|00005ba0| 20 20 20 69 66 20 28 63 | 72 6c 66 66 6c 61 67 29 | if (c|rlfflag)|
|00005bb0| 20 7b 0a 58 09 69 66 20 | 28 74 6f 20 3d 3d 20 61 | {.X.if |(to == a|
|00005bc0| 63 74 69 76 65 5f 73 6f | 63 6b 65 74 29 20 7b 0a |ctive_so|cket) {.|
|00005bd0| 58 09 20 20 20 20 61 64 | 64 5f 63 72 73 28 62 75 |X. ad|d_crs(bu|
|00005be0| 66 66 65 72 2c 20 62 75 | 66 66 65 72 32 2c 20 26 |ffer, bu|ffer2, &|
|00005bf0| 73 69 7a 65 29 20 3b 0a | 58 09 7d 20 65 6c 73 65 |size) ;.|X.} else|
|00005c00| 20 7b 0a 58 09 20 20 20 | 20 73 74 72 69 70 5f 63 | {.X. | strip_c|
|00005c10| 72 73 28 62 75 66 66 65 | 72 2c 20 62 75 66 66 65 |rs(buffe|r, buffe|
|00005c20| 72 32 2c 20 26 73 69 7a | 65 29 20 3b 0a 58 09 7d |r2, &siz|e) ;.X.}|
|00005c30| 0a 58 20 20 20 20 7d 20 | 65 6c 73 65 20 7b 0a 58 |.X } |else {.X|
|00005c40| 09 62 63 6f 70 79 28 62 | 75 66 66 65 72 2c 20 62 |.bcopy(b|uffer, b|
|00005c50| 75 66 66 65 72 32 2c 20 | 73 69 7a 65 29 20 3b 0a |uffer2, |size) ;.|
|00005c60| 58 20 20 20 20 7d 0a 58 | 20 20 20 20 77 68 69 6c |X }.X| whil|
|00005c70| 65 20 28 73 69 7a 65 20 | 3e 20 30 29 20 7b 0a 58 |e (size |> 0) {.X|
|00005c80| 09 77 72 69 74 74 65 6e | 20 3d 20 77 72 69 74 65 |.written| = write|
|00005c90| 28 74 6f 2c 20 62 75 66 | 66 65 72 32 2c 20 73 69 |(to, buf|fer2, si|
|00005ca0| 7a 65 29 20 3b 0a 58 09 | 69 66 20 28 77 72 69 74 |ze) ;.X.|if (writ|
|00005cb0| 74 65 6e 20 3d 3d 20 2d | 31 29 20 7b 0a 58 09 20 |ten == -|1) {.X. |
|00005cc0| 20 20 20 2f 2a 20 74 68 | 69 73 20 73 68 6f 75 6c | /* th|is shoul|
|00005cd0| 64 20 6e 6f 74 20 68 61 | 70 70 65 6e 20 2a 2f 0a |d not ha|ppen */.|
|00005ce0| 58 09 20 20 20 20 70 65 | 72 72 6f 72 32 28 22 77 |X. pe|rror2("w|
|00005cf0| 72 69 74 65 22 29 20 3b | 0a 58 09 20 20 20 20 66 |rite") ;|.X. f|
|00005d00| 70 72 69 6e 74 66 28 73 | 74 64 65 72 72 2c 20 22 |printf(s|tderr, "|
|00005d10| 25 73 3a 20 65 72 72 6f | 72 20 77 72 69 74 69 6e |%s: erro|r writin|
|00005d20| 67 20 74 6f 20 25 73 5c | 6e 22 2c 0a 58 09 09 20 |g to %s\|n",.X.. |
|00005d30| 20 20 20 70 72 6f 67 6e | 61 6d 65 2c 0a 58 09 09 | progn|ame,.X..|
|00005d40| 20 20 20 20 74 6f 20 3d | 3d 20 61 63 74 69 76 65 | to =|= active|
|00005d50| 5f 73 6f 63 6b 65 74 20 | 3f 20 22 73 6f 63 6b 65 |_socket |? "socke|
|00005d60| 74 22 20 3a 20 22 73 74 | 64 6f 75 74 22 29 20 3b |t" : "st|dout") ;|
|00005d70| 0a 58 09 20 20 20 20 72 | 65 74 75 72 6e 20 2d 31 |.X. r|eturn -1|
|00005d80| 20 3b 0a 58 09 7d 0a 58 | 09 73 69 7a 65 20 2d 3d | ;.X.}.X|.size -=|
|00005d90| 20 77 72 69 74 74 65 6e | 20 3b 0a 58 20 20 20 20 | written| ;.X |
|00005da0| 7d 0a 58 20 20 20 20 72 | 65 74 75 72 6e 20 31 20 |}.X r|eturn 1 |
|00005db0| 3b 0a 58 7d 0a 58 0a 58 | 2f 2a 20 61 6c 6c 20 49 |;.X}.X.X|/* all I|
|00005dc0| 4f 20 74 6f 20 61 6e 64 | 20 66 72 6f 6d 20 74 68 |O to and| from th|
|00005dd0| 65 20 73 6f 63 6b 65 74 | 20 69 73 20 68 61 6e 64 |e socket| is hand|
|00005de0| 6c 65 64 20 68 65 72 65 | 2e 20 54 68 65 20 6d 61 |led here|. The ma|
|00005df0| 69 6e 20 70 61 72 74 20 | 69 73 0a 58 20 2a 20 61 |in part |is.X * a|
|00005e00| 20 6c 6f 6f 70 20 61 72 | 6f 75 6e 64 20 73 65 6c | loop ar|ound sel|
|00005e10| 65 63 74 28 32 29 2e 20 | 2a 2f 0a 64 6f 5f 69 6f |ect(2). |*/.do_io|
|00005e20| 28 29 0a 58 7b 0a 58 20 | 20 20 20 66 64 5f 73 65 |().X{.X | fd_se|
|00005e30| 74 20 72 65 61 64 66 64 | 73 20 3b 0a 58 20 20 20 |t readfd|s ;.X |
|00005e40| 20 69 6e 74 20 66 64 73 | 65 74 5f 77 69 64 74 68 | int fds|et_width|
|00005e50| 20 3b 0a 58 20 20 20 20 | 69 6e 74 20 73 65 6c 72 | ;.X |int selr|
|00005e60| 65 74 20 3b 0a 58 0a 58 | 20 20 20 20 66 64 73 65 |et ;.X.X| fdse|
|00005e70| 74 5f 77 69 64 74 68 20 | 3d 20 28 49 4e 20 3e 20 |t_width |= (IN > |
|00005e80| 61 63 74 69 76 65 5f 73 | 6f 63 6b 65 74 20 3f 20 |active_s|ocket ? |
|00005e90| 49 4e 20 3a 20 61 63 74 | 69 76 65 5f 73 6f 63 6b |IN : act|ive_sock|
|00005ea0| 65 74 29 20 2b 20 31 20 | 3b 0a 58 20 20 20 20 77 |et) + 1 |;.X w|
|00005eb0| 68 69 6c 65 20 28 31 29 | 20 7b 09 09 09 2f 2a 20 |hile (1)| {.../* |
|00005ec0| 74 68 69 73 20 6c 6f 6f | 70 20 69 73 20 65 78 69 |this loo|p is exi|
|00005ed0| 74 65 64 20 73 69 64 65 | 77 61 79 73 20 2a 2f 0a |ted side|ways */.|
|00005ee0| 58 09 2f 2a 20 73 65 74 | 20 75 70 20 66 69 6c 65 |X./* set| up file|
|00005ef0| 20 64 65 73 63 72 69 70 | 74 6f 72 20 73 65 74 20 | descrip|tor set |
|00005f00| 66 6f 72 20 73 65 6c 65 | 63 74 28 32 29 20 2a 2f |for sele|ct(2) */|
|00005f10| 0a 58 09 46 44 5f 5a 45 | 52 4f 28 26 72 65 61 64 |.X.FD_ZE|RO(&read|
|00005f20| 66 64 73 29 20 3b 0a 58 | 09 69 66 20 28 21 72 65 |fds) ;.X|.if (!re|
|00005f30| 61 64 6f 6e 6c 79 66 6c | 61 67 29 20 7b 0a 58 09 |adonlyfl|ag) {.X.|
|00005f40| 20 20 20 20 46 44 5f 53 | 45 54 28 49 4e 2c 20 26 | FD_S|ET(IN, &|
|00005f50| 72 65 61 64 66 64 73 29 | 20 3b 0a 58 09 7d 0a 58 |readfds)| ;.X.}.X|
|00005f60| 09 69 66 20 28 21 77 72 | 69 74 65 6f 6e 6c 79 66 |.if (!wr|iteonlyf|
|00005f70| 6c 61 67 29 20 7b 0a 58 | 09 20 20 20 20 46 44 5f |lag) {.X|. FD_|
|00005f80| 53 45 54 28 61 63 74 69 | 76 65 5f 73 6f 63 6b 65 |SET(acti|ve_socke|
|00005f90| 74 2c 20 26 72 65 61 64 | 66 64 73 29 20 3b 0a 58 |t, &read|fds) ;.X|
|00005fa0| 09 7d 0a 58 0a 58 09 64 | 6f 20 7b 0a 58 09 20 20 |.}.X.X.d|o {.X. |
|00005fb0| 20 20 2f 2a 20 77 61 69 | 74 20 75 6e 74 69 6c 20 | /* wai|t until |
|00005fc0| 69 6e 70 75 74 20 69 73 | 20 61 76 61 69 6c 61 62 |input is| availab|
|00005fd0| 6c 65 20 2a 2f 0a 58 09 | 20 20 20 20 73 65 6c 72 |le */.X.| selr|
|00005fe0| 65 74 20 3d 20 73 65 6c | 65 63 74 28 66 64 73 65 |et = sel|ect(fdse|
|00005ff0| 74 5f 77 69 64 74 68 2c | 20 26 72 65 61 64 66 64 |t_width,| &readfd|
|00006000| 73 2c 20 4e 55 4c 4c 2c | 20 4e 55 4c 4c 2c 20 4e |s, NULL,| NULL, N|
|00006010| 55 4c 4c 29 20 3b 0a 58 | 09 20 20 20 20 2f 2a 20 |ULL) ;.X|. /* |
|00006020| 45 49 4e 54 52 20 68 61 | 70 70 65 6e 73 20 77 68 |EINTR ha|ppens wh|
|00006030| 65 6e 20 74 68 65 20 70 | 72 6f 63 65 73 73 20 69 |en the p|rocess i|
|00006040| 73 20 73 74 6f 70 70 65 | 64 20 2a 2f 0a 58 09 20 |s stoppe|d */.X. |
|00006050| 20 20 20 69 66 20 28 73 | 65 6c 72 65 74 20 3c 20 | if (s|elret < |
|00006060| 30 20 26 26 20 65 72 72 | 6e 6f 20 21 3d 20 45 49 |0 && err|no != EI|
|00006070| 4e 54 52 29 20 7b 0a 58 | 09 09 70 65 72 72 6f 72 |NTR) {.X|..perror|
|00006080| 32 28 22 73 65 6c 65 63 | 74 22 29 20 3b 0a 58 09 |2("selec|t") ;.X.|
|00006090| 09 65 78 69 74 28 31 29 | 20 3b 0a 58 09 20 20 20 |.exit(1)| ;.X. |
|000060a0| 20 7d 0a 58 09 7d 20 77 | 68 69 6c 65 20 28 73 65 | }.X.} w|hile (se|
|000060b0| 6c 72 65 74 20 3c 3d 20 | 30 29 20 3b 0a 58 0a 58 |lret <= |0) ;.X.X|
|000060c0| 09 2f 2a 20 64 6f 20 74 | 68 65 20 61 70 70 72 6f |./* do t|he appro|
|000060d0| 70 72 69 61 74 65 20 72 | 65 61 64 20 61 6e 64 20 |priate r|ead and |
|000060e0| 77 72 69 74 65 20 2a 2f | 0a 58 09 69 66 20 28 46 |write */|.X.if (F|
|000060f0| 44 5f 49 53 53 45 54 28 | 61 63 74 69 76 65 5f 73 |D_ISSET(|active_s|
|00006100| 6f 63 6b 65 74 2c 20 26 | 72 65 61 64 66 64 73 29 |ocket, &|readfds)|
|00006110| 29 20 7b 0a 58 09 20 20 | 20 20 69 66 20 28 64 6f |) {.X. | if (do|
|00006120| 5f 72 65 61 64 5f 77 72 | 69 74 65 28 61 63 74 69 |_read_wr|ite(acti|
|00006130| 76 65 5f 73 6f 63 6b 65 | 74 2c 20 4f 55 54 29 20 |ve_socke|t, OUT) |
|00006140| 3c 20 30 29 20 7b 0a 58 | 09 09 62 72 65 61 6b 20 |< 0) {.X|..break |
|00006150| 3b 0a 58 09 20 20 20 20 | 7d 0a 58 09 7d 20 65 6c |;.X. |}.X.} el|
|00006160| 73 65 20 7b 0a 58 09 20 | 20 20 20 69 66 20 28 64 |se {.X. | if (d|
|00006170| 6f 5f 72 65 61 64 5f 77 | 72 69 74 65 28 49 4e 2c |o_read_w|rite(IN,|
|00006180| 20 61 63 74 69 76 65 5f | 73 6f 63 6b 65 74 29 20 | active_|socket) |
|00006190| 3c 20 30 29 20 7b 0a 58 | 09 09 62 72 65 61 6b 20 |< 0) {.X|..break |
|000061a0| 3b 0a 58 09 20 20 20 20 | 7d 0a 58 09 7d 0a 58 20 |;.X. |}.X.}.X |
|000061b0| 20 20 20 7d 0a 58 7d 0a | 45 4e 44 5f 4f 46 5f 46 | }.X}.|END_OF_F|
|000061c0| 49 4c 45 0a 69 66 20 74 | 65 73 74 20 33 30 33 30 |ILE.if t|est 3030|
|000061d0| 20 2d 6e 65 20 60 77 63 | 20 2d 63 20 3c 27 69 6f | -ne `wc| -c <'io|
|000061e0| 2e 63 27 60 3b 20 74 68 | 65 6e 0a 20 20 20 20 65 |.c'`; th|en. e|
|000061f0| 63 68 6f 20 73 68 61 72 | 3a 20 5c 22 27 69 6f 2e |cho shar|: \"'io.|
|00006200| 63 27 5c 22 20 75 6e 70 | 61 63 6b 65 64 20 77 69 |c'\" unp|acked wi|
|00006210| 74 68 20 77 72 6f 6e 67 | 20 73 69 7a 65 21 0a 66 |th wrong| size!.f|
|00006220| 69 0a 23 20 65 6e 64 20 | 6f 66 20 27 69 6f 2e 63 |i.# end |of 'io.c|
|00006230| 27 0a 66 69 0a 69 66 20 | 74 65 73 74 20 2d 66 20 |'.fi.if |test -f |
|00006240| 27 70 61 74 63 68 6c 65 | 76 65 6c 2e 68 27 20 2d |'patchle|vel.h' -|
|00006250| 61 20 22 24 7b 31 7d 22 | 20 21 3d 20 22 2d 63 22 |a "${1}"| != "-c"|
|00006260| 20 3b 20 74 68 65 6e 20 | 0a 20 20 65 63 68 6f 20 | ; then |. echo |
|00006270| 73 68 61 72 3a 20 57 69 | 6c 6c 20 6e 6f 74 20 63 |shar: Wi|ll not c|
|00006280| 6c 6f 62 62 65 72 20 65 | 78 69 73 74 69 6e 67 20 |lobber e|xisting |
|00006290| 66 69 6c 65 20 5c 22 27 | 70 61 74 63 68 6c 65 76 |file \"'|patchlev|
|000062a0| 65 6c 2e 68 27 5c 22 0a | 65 6c 73 65 0a 65 63 68 |el.h'\".|else.ech|
|000062b0| 6f 20 73 68 61 72 3a 20 | 45 78 74 72 61 63 74 69 |o shar: |Extracti|
|000062c0| 6e 67 20 5c 22 27 70 61 | 74 63 68 6c 65 76 65 6c |ng \"'pa|tchlevel|
|000062d0| 2e 68 27 5c 22 20 5c 28 | 32 31 20 63 68 61 72 61 |.h'\" \(|21 chara|
|000062e0| 63 74 65 72 73 5c 29 0a | 73 65 64 20 22 73 2f 5e |cters\).|sed "s/^|
|000062f0| 58 2f 2f 22 20 3e 27 70 | 61 74 63 68 6c 65 76 65 |X//" >'p|atchleve|
|00006300| 6c 2e 68 27 20 3c 3c 27 | 45 4e 44 5f 4f 46 5f 46 |l.h' <<'|END_OF_F|
|00006310| 49 4c 45 27 0a 58 23 64 | 65 66 69 6e 65 20 50 41 |ILE'.X#d|efine PA|
|00006320| 54 43 48 4c 45 56 45 4c | 20 30 0a 45 4e 44 5f 4f |TCHLEVEL| 0.END_O|
|00006330| 46 5f 46 49 4c 45 0a 69 | 66 20 74 65 73 74 20 32 |F_FILE.i|f test 2|
|00006340| 31 20 2d 6e 65 20 60 77 | 63 20 2d 63 20 3c 27 70 |1 -ne `w|c -c <'p|
|00006350| 61 74 63 68 6c 65 76 65 | 6c 2e 68 27 60 3b 20 74 |atchleve|l.h'`; t|
|00006360| 68 65 6e 0a 20 20 20 20 | 65 63 68 6f 20 73 68 61 |hen. |echo sha|
|00006370| 72 3a 20 5c 22 27 70 61 | 74 63 68 6c 65 76 65 6c |r: \"'pa|tchlevel|
|00006380| 2e 68 27 5c 22 20 75 6e | 70 61 63 6b 65 64 20 77 |.h'\" un|packed w|
|00006390| 69 74 68 20 77 72 6f 6e | 67 20 73 69 7a 65 21 0a |ith wron|g size!.|
|000063a0| 66 69 0a 23 20 65 6e 64 | 20 6f 66 20 27 70 61 74 |fi.# end| of 'pat|
|000063b0| 63 68 6c 65 76 65 6c 2e | 68 27 0a 66 69 0a 69 66 |chlevel.|h'.fi.if|
|000063c0| 20 74 65 73 74 20 2d 66 | 20 27 72 66 69 6e 67 65 | test -f| 'rfinge|
|000063d0| 72 2e 73 68 27 20 2d 61 | 20 22 24 7b 31 7d 22 20 |r.sh' -a| "${1}" |
|000063e0| 21 3d 20 22 2d 63 22 20 | 3b 20 74 68 65 6e 20 0a |!= "-c" |; then .|
|000063f0| 20 20 65 63 68 6f 20 73 | 68 61 72 3a 20 57 69 6c | echo s|har: Wil|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.