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
| Newsgroup Content (archive/news)
| magic
| Supported |
100%
| dexvert
| SHell self-extracting ARchive (archive/shar)
| magic
| Supported |
100%
| dexvert
| Internet Message Format (text/imf)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| news or mail, 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)
| |
100%
| xdgMime
| message/rfc822
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 53 75 62 6a 65 63 74 3a | 20 20 76 30 36 69 30 39 |Subject:| v06i09|
|00000010| 35 3a 20 20 53 75 6e 20 | 52 50 43 20 53 6f 75 72 |5: Sun |RPC Sour|
|00000020| 63 65 20 28 72 70 63 32 | 29 2c 20 50 61 72 74 30 |ce (rpc2|), Part0|
|00000030| 37 2f 31 31 0a 4e 65 77 | 73 67 72 6f 75 70 73 3a |7/11.New|sgroups:|
|00000040| 20 6d 6f 64 2e 73 6f 75 | 72 63 65 73 0a 41 70 70 | mod.sou|rces.App|
|00000050| 72 6f 76 65 64 3a 20 72 | 73 40 6d 69 72 72 6f 72 |roved: r|s@mirror|
|00000060| 2e 55 55 43 50 0a 0a 53 | 75 62 6d 69 74 74 65 64 |.UUCP..S|ubmitted|
|00000070| 20 62 79 3a 20 63 63 61 | 21 53 55 4e 2e 43 4f 4d | by: cca|!SUN.COM|
|00000080| 21 6d 61 72 6b 73 20 28 | 4d 61 72 6b 20 53 74 65 |!marks (|Mark Ste|
|00000090| 69 6e 29 0a 4d 6f 64 2e | 73 6f 75 72 63 65 73 3a |in).Mod.|sources:|
|000000a0| 20 56 6f 6c 75 6d 65 20 | 36 2c 20 49 73 73 75 65 | Volume |6, Issue|
|000000b0| 20 39 35 0a 41 72 63 68 | 69 76 65 2d 6e 61 6d 65 | 95.Arch|ive-name|
|000000c0| 3a 20 72 70 63 32 2f 50 | 61 72 74 30 37 0a 0a 5b |: rpc2/P|art07..[|
|000000d0| 20 20 22 44 6f 6e 27 74 | 20 62 6c 61 6d 65 20 6d | "Don't| blame m|
|000000e0| 65 2c 20 49 27 6d 20 6f | 6e 6c 79 20 74 68 65 20 |e, I'm o|nly the |
|000000f0| 6d 65 73 73 65 6e 67 65 | 72 2e 22 20 20 2d 72 24 |messenge|r." -r$|
|00000100| 20 20 5d 0a 0a 53 75 6e | 20 52 50 43 20 73 6f 75 | ]..Sun| RPC sou|
|00000110| 72 63 65 20 28 70 61 72 | 74 20 37 20 6f 66 20 31 |rce (par|t 7 of 1|
|00000120| 31 29 2e 20 20 54 68 69 | 73 20 73 6f 66 74 77 61 |1). Thi|s softwa|
|00000130| 72 65 20 70 61 63 6b 61 | 67 65 20 63 6f 6e 74 61 |re packa|ge conta|
|00000140| 69 6e 73 20 63 6f 64 65 | 0a 61 6e 64 20 64 6f 63 |ins code|.and doc|
|00000150| 75 6d 65 6e 74 61 74 69 | 6f 6e 20 66 6f 72 20 52 |umentati|on for R|
|00000160| 65 76 69 73 69 6f 6e 20 | 33 2e 30 20 6f 66 20 74 |evision |3.0 of t|
|00000170| 68 65 20 53 75 6e 20 52 | 65 6d 6f 74 65 20 50 72 |he Sun R|emote Pr|
|00000180| 6f 63 65 64 75 72 65 20 | 43 61 6c 6c 0a 6c 69 62 |ocedure |Call.lib|
|00000190| 72 61 72 79 2e 20 20 49 | 6e 20 61 64 64 69 74 69 |rary. I|n additi|
|000001a0| 6f 6e 2c 20 61 20 62 65 | 74 61 20 76 65 72 73 69 |on, a be|ta versi|
|000001b0| 6f 6e 20 6f 66 20 74 68 | 65 20 58 44 52 2f 52 50 |on of th|e XDR/RP|
|000001c0| 43 20 70 72 6f 74 6f 63 | 6f 6c 20 63 6f 6d 70 69 |C protoc|ol compi|
|000001d0| 6c 65 72 0a 69 73 20 69 | 6e 63 6c 75 64 65 64 2e |ler.is i|ncluded.|
|000001e0| 20 20 43 6f 6d 6d 65 6e | 74 73 20 61 62 6f 75 74 | Commen|ts about|
|000001f0| 20 74 68 69 73 20 6c 61 | 74 65 73 74 20 72 65 6c | this la|test rel|
|00000200| 65 61 73 65 20 6d 61 79 | 20 62 65 20 6d 61 69 6c |ease may| be mail|
|00000210| 65 64 20 74 6f 0a 73 75 | 6e 21 72 70 63 20 6f 72 |ed to.su|n!rpc or|
|00000220| 20 72 70 63 40 73 75 6e | 2e 63 6f 6d 2e 0a 0a 53 | rpc@sun|.com...S|
|00000230| 75 6e 20 52 50 43 20 69 | 73 20 61 20 70 72 6f 64 |un RPC i|s a prod|
|00000240| 75 63 74 20 6f 66 20 53 | 75 6e 20 4d 69 63 72 6f |uct of S|un Micro|
|00000250| 73 79 73 74 65 6d 73 2c | 20 49 6e 63 2e 20 61 6e |systems,| Inc. an|
|00000260| 64 20 69 73 20 70 72 6f | 76 69 64 65 64 20 66 6f |d is pro|vided fo|
|00000270| 72 0a 75 6e 72 65 73 74 | 72 69 63 74 65 64 20 75 |r.unrest|ricted u|
|00000280| 73 65 20 70 72 6f 76 69 | 64 65 64 20 74 68 61 74 |se provi|ded that|
|00000290| 20 74 68 69 73 20 6c 65 | 67 65 6e 64 20 69 73 20 | this le|gend is |
|000002a0| 69 6e 63 6c 75 64 65 64 | 20 6f 6e 20 61 6c 6c 20 |included| on all |
|000002b0| 74 61 70 65 0a 6d 65 64 | 69 61 20 61 6e 64 20 61 |tape.med|ia and a|
|000002c0| 73 20 61 20 70 61 72 74 | 20 6f 66 20 74 68 65 20 |s a part| of the |
|000002d0| 73 6f 66 74 77 61 72 65 | 20 70 72 6f 67 72 61 6d |software| program|
|000002e0| 20 69 6e 20 77 68 6f 6c | 65 20 6f 72 20 70 61 72 | in whol|e or par|
|000002f0| 74 2e 20 20 55 73 65 72 | 73 0a 6d 61 79 20 63 6f |t. User|s.may co|
|00000300| 70 79 20 6f 72 20 6d 6f | 64 69 66 79 20 53 75 6e |py or mo|dify Sun|
|00000310| 20 52 50 43 20 77 69 74 | 68 6f 75 74 20 63 68 61 | RPC wit|hout cha|
|00000320| 72 67 65 2c 20 62 75 74 | 20 61 72 65 20 6e 6f 74 |rge, but| are not|
|00000330| 20 61 75 74 68 6f 72 69 | 7a 65 64 20 74 6f 0a 6c | authori|zed to.l|
|00000340| 69 63 65 6e 73 65 20 6f | 72 20 64 69 73 74 72 69 |icense o|r distri|
|00000350| 62 75 74 65 20 69 74 20 | 74 6f 20 61 6e 79 6f 6e |bute it |to anyon|
|00000360| 65 20 65 6c 73 65 20 65 | 78 63 65 70 74 20 61 73 |e else e|xcept as|
|00000370| 20 70 61 72 74 20 6f 66 | 20 61 20 70 72 6f 64 75 | part of| a produ|
|00000380| 63 74 20 6f 72 0a 70 72 | 6f 67 72 61 6d 20 64 65 |ct or.pr|ogram de|
|00000390| 76 65 6c 6f 70 65 64 20 | 62 79 20 74 68 65 20 75 |veloped |by the u|
|000003a0| 73 65 72 2e 0a 0a 2d 20 | 2d 20 2d 20 2d 20 2d 20 |ser...- |- - - - |
|000003b0| 2d 20 2d 20 2d 20 2d 20 | 43 20 55 20 54 20 2d 20 |- - - - |C U T - |
|000003c0| 48 20 45 20 52 20 45 20 | 2d 20 2d 20 2d 20 2d 20 |H E R E |- - - - |
|000003d0| 2d 20 2d 20 2d 20 2d 20 | 2d 20 2d 20 2d 20 2d 20 |- - - - |- - - - |
|000003e0| 2d 20 2d 20 2d 20 2d 20 | 2d 20 2d 0a 23 21 20 2f |- - - - |- -.#! /|
|000003f0| 62 69 6e 2f 73 68 0a 23 | 20 54 68 69 73 20 69 73 |bin/sh.#| This is|
|00000400| 20 61 20 73 68 65 6c 6c | 20 61 72 63 68 69 76 65 | a shell| archive|
|00000410| 2c 20 6d 65 61 6e 69 6e | 67 3a 0a 23 20 31 2e 20 |, meanin|g:.# 1. |
|00000420| 52 65 6d 6f 76 65 20 65 | 76 65 72 79 74 68 69 6e |Remove e|verythin|
|00000430| 67 20 61 62 6f 76 65 20 | 74 68 65 20 23 21 20 2f |g above |the #! /|
|00000440| 62 69 6e 2f 73 68 20 6c | 69 6e 65 2e 0a 23 20 32 |bin/sh l|ine..# 2|
|00000450| 2e 20 53 61 76 65 20 74 | 68 65 20 72 65 73 75 6c |. Save t|he resul|
|00000460| 74 69 6e 67 20 74 65 78 | 74 20 69 6e 20 61 20 66 |ting tex|t in a f|
|00000470| 69 6c 65 2e 0a 23 20 33 | 2e 20 45 78 65 63 75 74 |ile..# 3|. Execut|
|00000480| 65 20 74 68 65 20 66 69 | 6c 65 20 77 69 74 68 20 |e the fi|le with |
|00000490| 2f 62 69 6e 2f 73 68 20 | 28 6e 6f 74 20 63 73 68 |/bin/sh |(not csh|
|000004a0| 29 20 74 6f 20 63 72 65 | 61 74 65 3a 0a 23 09 72 |) to cre|ate:.#.r|
|000004b0| 70 63 2f 72 70 63 6c 69 | 62 2f 70 6d 61 70 5f 63 |pc/rpcli|b/pmap_c|
|000004c0| 6c 6e 74 2e 63 0a 23 09 | 72 70 63 2f 72 70 63 6c |lnt.c.#.|rpc/rpcl|
|000004d0| 69 62 2f 70 6d 61 70 5f | 67 65 74 6d 61 70 73 2e |ib/pmap_|getmaps.|
|000004e0| 63 0a 23 09 72 70 63 2f | 72 70 63 6c 69 62 2f 70 |c.#.rpc/|rpclib/p|
|000004f0| 6d 61 70 5f 67 65 74 70 | 6f 72 74 2e 63 0a 23 09 |map_getp|ort.c.#.|
|00000500| 72 70 63 2f 72 70 63 6c | 69 62 2f 70 6d 61 70 5f |rpc/rpcl|ib/pmap_|
|00000510| 70 72 6f 74 2e 63 0a 23 | 09 72 70 63 2f 72 70 63 |prot.c.#|.rpc/rpc|
|00000520| 6c 69 62 2f 70 6d 61 70 | 5f 72 6d 74 2e 63 0a 23 |lib/pmap|_rmt.c.#|
|00000530| 09 72 70 63 2f 72 70 63 | 6c 69 62 2f 72 70 63 5f |.rpc/rpc|lib/rpc_|
|00000540| 70 72 6f 74 2e 63 0a 23 | 09 72 70 63 2f 72 70 63 |prot.c.#|.rpc/rpc|
|00000550| 6c 69 62 2f 73 76 63 2e | 63 0a 23 20 54 68 69 73 |lib/svc.|c.# This|
|00000560| 20 61 72 63 68 69 76 65 | 20 63 72 65 61 74 65 64 | archive| created|
|00000570| 3a 20 4d 6f 6e 20 4a 75 | 6c 20 31 34 20 31 36 3a |: Mon Ju|l 14 16:|
|00000580| 35 35 3a 32 37 20 31 39 | 38 36 0a 65 78 70 6f 72 |55:27 19|86.expor|
|00000590| 74 20 50 41 54 48 3b 20 | 50 41 54 48 3d 2f 62 69 |t PATH; |PATH=/bi|
|000005a0| 6e 3a 2f 75 73 72 2f 62 | 69 6e 3a 24 50 41 54 48 |n:/usr/b|in:$PATH|
|000005b0| 0a 66 6f 72 20 64 20 69 | 6e 20 72 70 63 20 72 70 |.for d i|n rpc rp|
|000005c0| 63 2f 64 6f 63 20 72 70 | 63 2f 72 70 63 6c 69 62 |c/doc rp|c/rpclib|
|000005d0| 20 72 70 63 2f 74 6f 6f | 6c 73 20 72 70 63 2f 74 | rpc/too|ls rpc/t|
|000005e0| 6f 79 73 20 72 70 63 2f | 72 70 63 6c 69 62 2f 70 |oys rpc/|rpclib/p|
|000005f0| 72 6f 66 69 6c 65 64 20 | 72 70 63 2f 72 70 63 67 |rofiled |rpc/rpcg|
|00000600| 65 6e 20 72 70 63 2f 72 | 70 63 67 65 6e 2f 74 65 |en rpc/r|pcgen/te|
|00000610| 73 74 0a 64 6f 0a 09 69 | 66 20 74 65 73 74 20 21 |st.do..i|f test !|
|00000620| 20 2d 64 20 24 64 0a 09 | 74 68 65 6e 0a 09 09 65 | -d $d..|then...e|
|00000630| 63 68 6f 20 22 73 68 61 | 72 3a 20 4d 61 6b 69 6e |cho "sha|r: Makin|
|00000640| 67 20 64 69 72 65 63 74 | 6f 72 79 20 24 64 22 0a |g direct|ory $d".|
|00000650| 09 09 6d 6b 64 69 72 20 | 24 64 0a 09 09 63 68 6d |..mkdir |$d...chm|
|00000660| 6f 64 20 37 35 35 20 24 | 64 0a 09 66 69 0a 64 6f |od 755 $|d..fi.do|
|00000670| 6e 65 0a 65 63 68 6f 20 | 73 68 61 72 3a 20 22 65 |ne.echo |shar: "e|
|00000680| 78 74 72 61 63 74 69 6e | 67 20 27 72 70 63 2f 72 |xtractin|g 'rpc/r|
|00000690| 70 63 6c 69 62 2f 70 6d | 61 70 5f 63 6c 6e 74 2e |pclib/pm|ap_clnt.|
|000006a0| 63 27 22 20 27 28 34 34 | 34 31 20 63 68 61 72 61 |c'" '(44|41 chara|
|000006b0| 63 74 65 72 73 29 27 0a | 69 66 20 74 65 73 74 20 |cters)'.|if test |
|000006c0| 2d 66 20 27 72 70 63 2f | 72 70 63 6c 69 62 2f 70 |-f 'rpc/|rpclib/p|
|000006d0| 6d 61 70 5f 63 6c 6e 74 | 2e 63 27 0a 74 68 65 6e |map_clnt|.c'.then|
|000006e0| 0a 09 65 63 68 6f 20 73 | 68 61 72 3a 20 22 77 69 |..echo s|har: "wi|
|000006f0| 6c 6c 20 6e 6f 74 20 6f | 76 65 72 2d 77 72 69 74 |ll not o|ver-writ|
|00000700| 65 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |e existi|ng file |
|00000710| 27 72 70 63 2f 72 70 63 | 6c 69 62 2f 70 6d 61 70 |'rpc/rpc|lib/pmap|
|00000720| 5f 63 6c 6e 74 2e 63 27 | 22 0a 65 6c 73 65 0a 73 |_clnt.c'|".else.s|
|00000730| 65 64 20 27 73 2f 5e 58 | 2f 2f 27 20 3c 3c 20 5c |ed 's/^X|//' << \|
|00000740| 53 48 41 52 5f 45 4f 46 | 20 3e 20 27 72 70 63 2f |SHAR_EOF| > 'rpc/|
|00000750| 72 70 63 6c 69 62 2f 70 | 6d 61 70 5f 63 6c 6e 74 |rpclib/p|map_clnt|
|00000760| 2e 63 27 0a 58 2f 2a 0a | 58 20 2a 20 53 75 6e 20 |.c'.X/*.|X * Sun |
|00000770| 52 50 43 20 69 73 20 61 | 20 70 72 6f 64 75 63 74 |RPC is a| product|
|00000780| 20 6f 66 20 53 75 6e 20 | 4d 69 63 72 6f 73 79 73 | of Sun |Microsys|
|00000790| 74 65 6d 73 2c 20 49 6e | 63 2e 20 61 6e 64 20 69 |tems, In|c. and i|
|000007a0| 73 20 70 72 6f 76 69 64 | 65 64 20 66 6f 72 0a 58 |s provid|ed for.X|
|000007b0| 20 2a 20 75 6e 72 65 73 | 74 72 69 63 74 65 64 20 | * unres|tricted |
|000007c0| 75 73 65 20 70 72 6f 76 | 69 64 65 64 20 74 68 61 |use prov|ided tha|
|000007d0| 74 20 74 68 69 73 20 6c | 65 67 65 6e 64 20 69 73 |t this l|egend is|
|000007e0| 20 69 6e 63 6c 75 64 65 | 64 20 6f 6e 20 61 6c 6c | include|d on all|
|000007f0| 20 74 61 70 65 0a 58 20 | 2a 20 6d 65 64 69 61 20 | tape.X |* media |
|00000800| 61 6e 64 20 61 73 20 61 | 20 70 61 72 74 20 6f 66 |and as a| part of|
|00000810| 20 74 68 65 20 73 6f 66 | 74 77 61 72 65 20 70 72 | the sof|tware pr|
|00000820| 6f 67 72 61 6d 20 69 6e | 20 77 68 6f 6c 65 20 6f |ogram in| whole o|
|00000830| 72 20 70 61 72 74 2e 20 | 20 55 73 65 72 73 0a 58 |r part. | Users.X|
|00000840| 20 2a 20 6d 61 79 20 63 | 6f 70 79 20 6f 72 20 6d | * may c|opy or m|
|00000850| 6f 64 69 66 79 20 53 75 | 6e 20 52 50 43 20 77 69 |odify Su|n RPC wi|
|00000860| 74 68 6f 75 74 20 63 68 | 61 72 67 65 2c 20 62 75 |thout ch|arge, bu|
|00000870| 74 20 61 72 65 20 6e 6f | 74 20 61 75 74 68 6f 72 |t are no|t author|
|00000880| 69 7a 65 64 0a 58 20 2a | 20 74 6f 20 6c 69 63 65 |ized.X *| to lice|
|00000890| 6e 73 65 20 6f 72 20 64 | 69 73 74 72 69 62 75 74 |nse or d|istribut|
|000008a0| 65 20 69 74 20 74 6f 20 | 61 6e 79 6f 6e 65 20 65 |e it to |anyone e|
|000008b0| 6c 73 65 20 65 78 63 65 | 70 74 20 61 73 20 70 61 |lse exce|pt as pa|
|000008c0| 72 74 20 6f 66 20 61 20 | 70 72 6f 64 75 63 74 20 |rt of a |product |
|000008d0| 6f 72 0a 58 20 2a 20 70 | 72 6f 67 72 61 6d 20 64 |or.X * p|rogram d|
|000008e0| 65 76 65 6c 6f 70 65 64 | 20 62 79 20 74 68 65 20 |eveloped| by the |
|000008f0| 75 73 65 72 2e 0a 58 20 | 2a 20 0a 58 20 2a 20 53 |user..X |* .X * S|
|00000900| 55 4e 20 52 50 43 20 49 | 53 20 50 52 4f 56 49 44 |UN RPC I|S PROVID|
|00000910| 45 44 20 41 53 20 49 53 | 20 57 49 54 48 20 4e 4f |ED AS IS| WITH NO|
|00000920| 20 57 41 52 52 41 4e 54 | 49 45 53 20 4f 46 20 41 | WARRANT|IES OF A|
|00000930| 4e 59 20 4b 49 4e 44 20 | 49 4e 43 4c 55 44 49 4e |NY KIND |INCLUDIN|
|00000940| 47 20 54 48 45 0a 58 20 | 2a 20 57 41 52 52 41 4e |G THE.X |* WARRAN|
|00000950| 54 49 45 53 20 4f 46 20 | 44 45 53 49 47 4e 2c 20 |TIES OF |DESIGN, |
|00000960| 4d 45 52 43 48 41 4e 54 | 49 42 49 4c 49 54 59 20 |MERCHANT|IBILITY |
|00000970| 41 4e 44 20 46 49 54 4e | 45 53 53 20 46 4f 52 20 |AND FITN|ESS FOR |
|00000980| 41 20 50 41 52 54 49 43 | 55 4c 41 52 0a 58 20 2a |A PARTIC|ULAR.X *|
|00000990| 20 50 55 52 50 4f 53 45 | 2c 20 4f 52 20 41 52 49 | PURPOSE|, OR ARI|
|000009a0| 53 49 4e 47 20 46 52 4f | 4d 20 41 20 43 4f 55 52 |SING FRO|M A COUR|
|000009b0| 53 45 20 4f 46 20 44 45 | 41 4c 49 4e 47 2c 20 55 |SE OF DE|ALING, U|
|000009c0| 53 41 47 45 20 4f 52 20 | 54 52 41 44 45 20 50 52 |SAGE OR |TRADE PR|
|000009d0| 41 43 54 49 43 45 2e 0a | 58 20 2a 20 0a 58 20 2a |ACTICE..|X * .X *|
|000009e0| 20 53 75 6e 20 52 50 43 | 20 69 73 20 70 72 6f 76 | Sun RPC| is prov|
|000009f0| 69 64 65 64 20 77 69 74 | 68 20 6e 6f 20 73 75 70 |ided wit|h no sup|
|00000a00| 70 6f 72 74 20 61 6e 64 | 20 77 69 74 68 6f 75 74 |port and| without|
|00000a10| 20 61 6e 79 20 6f 62 6c | 69 67 61 74 69 6f 6e 20 | any obl|igation |
|00000a20| 6f 6e 20 74 68 65 0a 58 | 20 2a 20 70 61 72 74 20 |on the.X| * part |
|00000a30| 6f 66 20 53 75 6e 20 4d | 69 63 72 6f 73 79 73 74 |of Sun M|icrosyst|
|00000a40| 65 6d 73 2c 20 49 6e 63 | 2e 20 74 6f 20 61 73 73 |ems, Inc|. to ass|
|00000a50| 69 73 74 20 69 6e 20 69 | 74 73 20 75 73 65 2c 20 |ist in i|ts use, |
|00000a60| 63 6f 72 72 65 63 74 69 | 6f 6e 2c 0a 58 20 2a 20 |correcti|on,.X * |
|00000a70| 6d 6f 64 69 66 69 63 61 | 74 69 6f 6e 20 6f 72 20 |modifica|tion or |
|00000a80| 65 6e 68 61 6e 63 65 6d | 65 6e 74 2e 0a 58 20 2a |enhancem|ent..X *|
|00000a90| 20 0a 58 20 2a 20 53 55 | 4e 20 4d 49 43 52 4f 53 | .X * SU|N MICROS|
|00000aa0| 59 53 54 45 4d 53 2c 20 | 49 4e 43 2e 20 53 48 41 |YSTEMS, |INC. SHA|
|00000ab0| 4c 4c 20 48 41 56 45 20 | 4e 4f 20 4c 49 41 42 49 |LL HAVE |NO LIABI|
|00000ac0| 4c 49 54 59 20 57 49 54 | 48 20 52 45 53 50 45 43 |LITY WIT|H RESPEC|
|00000ad0| 54 20 54 4f 20 54 48 45 | 0a 58 20 2a 20 49 4e 46 |T TO THE|.X * INF|
|00000ae0| 52 49 4e 47 45 4d 45 4e | 54 20 4f 46 20 43 4f 50 |RINGEMEN|T OF COP|
|00000af0| 59 52 49 47 48 54 53 2c | 20 54 52 41 44 45 20 53 |YRIGHTS,| TRADE S|
|00000b00| 45 43 52 45 54 53 20 4f | 52 20 41 4e 59 20 50 41 |ECRETS O|R ANY PA|
|00000b10| 54 45 4e 54 53 20 42 59 | 20 53 55 4e 20 52 50 43 |TENTS BY| SUN RPC|
|00000b20| 0a 58 20 2a 20 4f 52 20 | 41 4e 59 20 50 41 52 54 |.X * OR |ANY PART|
|00000b30| 20 54 48 45 52 45 4f 46 | 2e 0a 58 20 2a 20 0a 58 | THEREOF|..X * .X|
|00000b40| 20 2a 20 49 6e 20 6e 6f | 20 65 76 65 6e 74 20 77 | * In no| event w|
|00000b50| 69 6c 6c 20 53 75 6e 20 | 4d 69 63 72 6f 73 79 73 |ill Sun |Microsys|
|00000b60| 74 65 6d 73 2c 20 49 6e | 63 2e 20 62 65 20 6c 69 |tems, In|c. be li|
|00000b70| 61 62 6c 65 20 66 6f 72 | 20 61 6e 79 20 6c 6f 73 |able for| any los|
|00000b80| 74 20 72 65 76 65 6e 75 | 65 0a 58 20 2a 20 6f 72 |t revenu|e.X * or|
|00000b90| 20 70 72 6f 66 69 74 73 | 20 6f 72 20 6f 74 68 65 | profits| or othe|
|00000ba0| 72 20 73 70 65 63 69 61 | 6c 2c 20 69 6e 64 69 72 |r specia|l, indir|
|00000bb0| 65 63 74 20 61 6e 64 20 | 63 6f 6e 73 65 71 75 65 |ect and |conseque|
|00000bc0| 6e 74 69 61 6c 20 64 61 | 6d 61 67 65 73 2c 20 65 |ntial da|mages, e|
|00000bd0| 76 65 6e 20 69 66 0a 58 | 20 2a 20 53 75 6e 20 68 |ven if.X| * Sun h|
|00000be0| 61 73 20 62 65 65 6e 20 | 61 64 76 69 73 65 64 20 |as been |advised |
|00000bf0| 6f 66 20 74 68 65 20 70 | 6f 73 73 69 62 69 6c 69 |of the p|ossibili|
|00000c00| 74 79 20 6f 66 20 73 75 | 63 68 20 64 61 6d 61 67 |ty of su|ch damag|
|00000c10| 65 73 2e 0a 58 20 2a 20 | 0a 58 20 2a 20 53 75 6e |es..X * |.X * Sun|
|00000c20| 20 4d 69 63 72 6f 73 79 | 73 74 65 6d 73 2c 20 49 | Microsy|stems, I|
|00000c30| 6e 63 2e 0a 58 20 2a 20 | 32 35 35 30 20 47 61 72 |nc..X * |2550 Gar|
|00000c40| 63 69 61 20 41 76 65 6e | 75 65 0a 58 20 2a 20 4d |cia Aven|ue.X * M|
|00000c50| 6f 75 6e 74 61 69 6e 20 | 56 69 65 77 2c 20 43 61 |ountain |View, Ca|
|00000c60| 6c 69 66 6f 72 6e 69 61 | 20 20 39 34 30 34 33 0a |lifornia| 94043.|
|00000c70| 58 20 2a 2f 0a 58 23 69 | 66 6e 64 65 66 20 6c 69 |X */.X#i|fndef li|
|00000c80| 6e 74 0a 58 73 74 61 74 | 69 63 20 63 68 61 72 20 |nt.Xstat|ic char |
|00000c90| 73 63 63 73 69 64 5b 5d | 20 3d 20 22 40 28 23 29 |sccsid[]| = "@(#)|
|00000ca0| 70 6d 61 70 5f 63 6c 6e | 74 2e 63 20 31 2e 31 20 |pmap_cln|t.c 1.1 |
|00000cb0| 38 36 2f 30 32 2f 30 33 | 20 43 6f 70 79 72 20 31 |86/02/03| Copyr 1|
|00000cc0| 39 38 34 20 53 75 6e 20 | 4d 69 63 72 6f 22 3b 0a |984 Sun |Micro";.|
|00000cd0| 58 23 65 6e 64 69 66 0a | 58 0a 58 2f 2a 0a 58 20 |X#endif.|X.X/*.X |
|00000ce0| 2a 20 70 6d 61 70 5f 63 | 6c 6e 74 2e 63 0a 58 20 |* pmap_c|lnt.c.X |
|00000cf0| 2a 20 43 6c 69 65 6e 74 | 20 69 6e 74 65 72 66 61 |* Client| interfa|
|00000d00| 63 65 20 74 6f 20 70 6d | 61 70 20 72 70 63 20 73 |ce to pm|ap rpc s|
|00000d10| 65 72 76 69 63 65 2e 0a | 58 20 2a 0a 58 20 2a 20 |ervice..|X *.X * |
|00000d20| 43 6f 70 79 72 69 67 68 | 74 20 28 43 29 20 31 39 |Copyrigh|t (C) 19|
|00000d30| 38 34 2c 20 53 75 6e 20 | 4d 69 63 72 6f 73 79 73 |84, Sun |Microsys|
|00000d40| 74 65 6d 73 2c 20 49 6e | 63 2e 0a 58 20 2a 2f 0a |tems, In|c..X */.|
|00000d50| 58 0a 58 23 69 6e 63 6c | 75 64 65 20 22 74 79 70 |X.X#incl|ude "typ|
|00000d60| 65 73 2e 68 22 0a 58 23 | 69 6e 63 6c 75 64 65 20 |es.h".X#|include |
|00000d70| 3c 6e 65 74 69 6e 65 74 | 2f 69 6e 2e 68 3e 0a 58 |<netinet|/in.h>.X|
|00000d80| 23 69 6e 63 6c 75 64 65 | 20 22 78 64 72 2e 68 22 |#include| "xdr.h"|
|00000d90| 0a 58 23 69 6e 63 6c 75 | 64 65 20 22 61 75 74 68 |.X#inclu|de "auth|
|00000da0| 2e 68 22 0a 58 23 69 6e | 63 6c 75 64 65 20 22 63 |.h".X#in|clude "c|
|00000db0| 6c 6e 74 2e 68 22 0a 58 | 23 69 6e 63 6c 75 64 65 |lnt.h".X|#include|
|00000dc0| 20 22 72 70 63 5f 6d 73 | 67 2e 68 22 0a 58 23 69 | "rpc_ms|g.h".X#i|
|00000dd0| 6e 63 6c 75 64 65 20 22 | 70 6d 61 70 5f 70 72 6f |nclude "|pmap_pro|
|00000de0| 74 2e 68 22 20 0a 58 23 | 69 6e 63 6c 75 64 65 20 |t.h" .X#|include |
|00000df0| 22 70 6d 61 70 5f 63 6c | 6e 74 2e 68 22 0a 58 23 |"pmap_cl|nt.h".X#|
|00000e00| 69 6e 63 6c 75 64 65 20 | 3c 73 79 73 2f 73 6f 63 |include |<sys/soc|
|00000e10| 6b 65 74 2e 68 3e 0a 58 | 23 69 6e 63 6c 75 64 65 |ket.h>.X|#include|
|00000e20| 20 3c 73 79 73 2f 74 69 | 6d 65 2e 68 3e 0a 58 23 | <sys/ti|me.h>.X#|
|00000e30| 69 6e 63 6c 75 64 65 20 | 3c 73 74 64 69 6f 2e 68 |include |<stdio.h|
|00000e40| 3e 0a 58 23 69 6e 63 6c | 75 64 65 20 3c 6e 65 74 |>.X#incl|ude <net|
|00000e50| 2f 69 66 2e 68 3e 0a 58 | 23 69 6e 63 6c 75 64 65 |/if.h>.X|#include|
|00000e60| 20 3c 73 79 73 2f 69 6f | 63 74 6c 2e 68 3e 0a 58 | <sys/io|ctl.h>.X|
|00000e70| 23 69 6e 63 6c 75 64 65 | 20 3c 61 72 70 61 2f 69 |#include| <arpa/i|
|00000e80| 6e 65 74 2e 68 3e 0a 58 | 23 64 65 66 69 6e 65 20 |net.h>.X|#define |
|00000e90| 4e 41 4d 45 4c 45 4e 20 | 32 35 35 0a 58 0a 58 73 |NAMELEN |255.X.Xs|
|00000ea0| 74 61 74 69 63 20 73 74 | 72 75 63 74 20 74 69 6d |tatic st|ruct tim|
|00000eb0| 65 76 61 6c 20 74 69 6d | 65 6f 75 74 20 3d 20 7b |eval tim|eout = {|
|00000ec0| 20 35 2c 20 30 20 7d 3b | 0a 58 73 74 61 74 69 63 | 5, 0 };|.Xstatic|
|00000ed0| 20 73 74 72 75 63 74 20 | 74 69 6d 65 76 61 6c 20 | struct |timeval |
|00000ee0| 74 6f 74 74 69 6d 65 6f | 75 74 20 3d 20 7b 20 36 |tottimeo|ut = { 6|
|00000ef0| 30 2c 20 30 20 7d 3b 0a | 58 73 74 61 74 69 63 20 |0, 0 };.|Xstatic |
|00000f00| 73 74 72 75 63 74 20 73 | 6f 63 6b 61 64 64 72 5f |struct s|ockaddr_|
|00000f10| 69 6e 20 6d 79 61 64 64 | 72 65 73 73 3b 0a 58 0a |in myadd|ress;.X.|
|00000f20| 58 76 6f 69 64 20 63 6c | 6e 74 5f 70 65 72 72 6f |Xvoid cl|nt_perro|
|00000f30| 72 28 29 3b 0a 58 0a 58 | 0a 58 2f 2a 0a 58 20 2a |r();.X.X|.X/*.X *|
|00000f40| 20 53 65 74 20 61 20 6d | 61 70 70 69 6e 67 20 62 | Set a m|apping b|
|00000f50| 65 74 77 65 65 6e 20 70 | 72 6f 67 72 61 6d 2c 76 |etween p|rogram,v|
|00000f60| 65 72 73 69 6f 6e 20 61 | 6e 64 20 70 6f 72 74 2e |ersion a|nd port.|
|00000f70| 0a 58 20 2a 20 43 61 6c | 6c 73 20 74 68 65 20 70 |.X * Cal|ls the p|
|00000f80| 6d 61 70 20 73 65 72 76 | 69 63 65 20 72 65 6d 6f |map serv|ice remo|
|00000f90| 74 65 6c 79 20 74 6f 20 | 64 6f 20 74 68 65 20 6d |tely to |do the m|
|00000fa0| 61 70 70 69 6e 67 2e 0a | 58 20 2a 2f 0a 58 62 6f |apping..|X */.Xbo|
|00000fb0| 6f 6c 5f 74 0a 58 70 6d | 61 70 5f 73 65 74 28 70 |ol_t.Xpm|ap_set(p|
|00000fc0| 72 6f 67 72 61 6d 2c 20 | 76 65 72 73 69 6f 6e 2c |rogram, |version,|
|00000fd0| 20 70 72 6f 74 6f 63 6f | 6c 2c 20 70 6f 72 74 29 | protoco|l, port)|
|00000fe0| 0a 58 09 75 5f 6c 6f 6e | 67 20 70 72 6f 67 72 61 |.X.u_lon|g progra|
|00000ff0| 6d 3b 0a 58 09 75 5f 6c | 6f 6e 67 20 76 65 72 73 |m;.X.u_l|ong vers|
|00001000| 69 6f 6e 3b 0a 58 09 75 | 5f 6c 6f 6e 67 20 70 72 |ion;.X.u|_long pr|
|00001010| 6f 74 6f 63 6f 6c 3b 0a | 58 09 75 5f 73 68 6f 72 |otocol;.|X.u_shor|
|00001020| 74 20 70 6f 72 74 3b 0a | 58 7b 0a 58 09 73 74 72 |t port;.|X{.X.str|
|00001030| 75 63 74 20 73 6f 63 6b | 61 64 64 72 5f 69 6e 20 |uct sock|addr_in |
|00001040| 6d 79 61 64 64 72 65 73 | 73 3b 0a 58 09 69 6e 74 |myaddres|s;.X.int|
|00001050| 20 73 6f 63 6b 65 74 20 | 3d 20 2d 31 3b 0a 58 09 | socket |= -1;.X.|
|00001060| 72 65 67 69 73 74 65 72 | 20 43 4c 49 45 4e 54 20 |register| CLIENT |
|00001070| 2a 63 6c 69 65 6e 74 3b | 0a 58 09 73 74 72 75 63 |*client;|.X.struc|
|00001080| 74 20 70 6d 61 70 20 70 | 61 72 6d 73 3b 0a 58 09 |t pmap p|arms;.X.|
|00001090| 62 6f 6f 6c 5f 74 20 72 | 73 6c 74 3b 0a 58 0a 58 |bool_t r|slt;.X.X|
|000010a0| 09 67 65 74 5f 6d 79 61 | 64 64 72 65 73 73 28 26 |.get_mya|ddress(&|
|000010b0| 6d 79 61 64 64 72 65 73 | 73 29 3b 0a 58 09 63 6c |myaddres|s);.X.cl|
|000010c0| 69 65 6e 74 20 3d 20 63 | 6c 6e 74 75 64 70 5f 62 |ient = c|lntudp_b|
|000010d0| 75 66 63 72 65 61 74 65 | 28 26 6d 79 61 64 64 72 |ufcreate|(&myaddr|
|000010e0| 65 73 73 2c 20 50 4d 41 | 50 50 52 4f 47 2c 20 50 |ess, PMA|PPROG, P|
|000010f0| 4d 41 50 56 45 52 53 2c | 0a 58 09 20 20 20 20 74 |MAPVERS,|.X. t|
|00001100| 69 6d 65 6f 75 74 2c 20 | 26 73 6f 63 6b 65 74 2c |imeout, |&socket,|
|00001110| 20 52 50 43 53 4d 41 4c | 4c 4d 53 47 53 49 5a 45 | RPCSMAL|LMSGSIZE|
|00001120| 2c 20 52 50 43 53 4d 41 | 4c 4c 4d 53 47 53 49 5a |, RPCSMA|LLMSGSIZ|
|00001130| 45 29 3b 0a 58 09 69 66 | 20 28 63 6c 69 65 6e 74 |E);.X.if| (client|
|00001140| 20 3d 3d 20 28 43 4c 49 | 45 4e 54 20 2a 29 4e 55 | == (CLI|ENT *)NU|
|00001150| 4c 4c 29 0a 58 09 09 72 | 65 74 75 72 6e 20 28 46 |LL).X..r|eturn (F|
|00001160| 41 4c 53 45 29 3b 0a 58 | 09 70 61 72 6d 73 2e 70 |ALSE);.X|.parms.p|
|00001170| 6d 5f 70 72 6f 67 20 3d | 20 70 72 6f 67 72 61 6d |m_prog =| program|
|00001180| 3b 0a 58 09 70 61 72 6d | 73 2e 70 6d 5f 76 65 72 |;.X.parm|s.pm_ver|
|00001190| 73 20 3d 20 76 65 72 73 | 69 6f 6e 3b 0a 58 09 70 |s = vers|ion;.X.p|
|000011a0| 61 72 6d 73 2e 70 6d 5f | 70 72 6f 74 20 3d 20 70 |arms.pm_|prot = p|
|000011b0| 72 6f 74 6f 63 6f 6c 3b | 0a 58 09 70 61 72 6d 73 |rotocol;|.X.parms|
|000011c0| 2e 70 6d 5f 70 6f 72 74 | 20 3d 20 70 6f 72 74 3b |.pm_port| = port;|
|000011d0| 0a 58 09 69 66 20 28 43 | 4c 4e 54 5f 43 41 4c 4c |.X.if (C|LNT_CALL|
|000011e0| 28 63 6c 69 65 6e 74 2c | 20 50 4d 41 50 50 52 4f |(client,| PMAPPRO|
|000011f0| 43 5f 53 45 54 2c 20 78 | 64 72 5f 70 6d 61 70 2c |C_SET, x|dr_pmap,|
|00001200| 20 26 70 61 72 6d 73 2c | 20 78 64 72 5f 62 6f 6f | &parms,| xdr_boo|
|00001210| 6c 2c 20 26 72 73 6c 74 | 2c 0a 58 09 20 20 20 20 |l, &rslt|,.X. |
|00001220| 74 6f 74 74 69 6d 65 6f | 75 74 29 20 21 3d 20 52 |tottimeo|ut) != R|
|00001230| 50 43 5f 53 55 43 43 45 | 53 53 29 20 7b 0a 58 09 |PC_SUCCE|SS) {.X.|
|00001240| 09 63 6c 6e 74 5f 70 65 | 72 72 6f 72 28 63 6c 69 |.clnt_pe|rror(cli|
|00001250| 65 6e 74 2c 20 22 43 61 | 6e 6e 6f 74 20 72 65 67 |ent, "Ca|nnot reg|
|00001260| 69 73 74 65 72 20 73 65 | 72 76 69 63 65 22 29 3b |ister se|rvice");|
|00001270| 0a 58 09 09 72 65 74 75 | 72 6e 20 28 46 41 4c 53 |.X..retu|rn (FALS|
|00001280| 45 29 3b 0a 58 09 7d 0a | 58 09 43 4c 4e 54 5f 44 |E);.X.}.|X.CLNT_D|
|00001290| 45 53 54 52 4f 59 28 63 | 6c 69 65 6e 74 29 3b 0a |ESTROY(c|lient);.|
|000012a0| 58 09 28 76 6f 69 64 29 | 63 6c 6f 73 65 28 73 6f |X.(void)|close(so|
|000012b0| 63 6b 65 74 29 3b 0a 58 | 09 72 65 74 75 72 6e 20 |cket);.X|.return |
|000012c0| 28 72 73 6c 74 29 3b 0a | 58 7d 0a 58 0a 58 2f 2a |(rslt);.|X}.X.X/*|
|000012d0| 0a 58 20 2a 20 52 65 6d | 6f 76 65 20 74 68 65 20 |.X * Rem|ove the |
|000012e0| 6d 61 70 70 69 6e 67 20 | 62 65 74 77 65 65 6e 20 |mapping |between |
|000012f0| 70 72 6f 67 72 61 6d 2c | 76 65 72 73 69 6f 6e 20 |program,|version |
|00001300| 61 6e 64 20 70 6f 72 74 | 2e 0a 58 20 2a 20 43 61 |and port|..X * Ca|
|00001310| 6c 6c 73 20 74 68 65 20 | 70 6d 61 70 20 73 65 72 |lls the |pmap ser|
|00001320| 76 69 63 65 20 72 65 6d | 6f 74 65 6c 79 20 74 6f |vice rem|otely to|
|00001330| 20 64 6f 20 74 68 65 20 | 75 6e 2d 6d 61 70 70 69 | do the |un-mappi|
|00001340| 6e 67 2e 0a 58 20 2a 2f | 0a 58 62 6f 6f 6c 5f 74 |ng..X */|.Xbool_t|
|00001350| 0a 58 70 6d 61 70 5f 75 | 6e 73 65 74 28 70 72 6f |.Xpmap_u|nset(pro|
|00001360| 67 72 61 6d 2c 20 76 65 | 72 73 69 6f 6e 29 0a 58 |gram, ve|rsion).X|
|00001370| 09 75 5f 6c 6f 6e 67 20 | 70 72 6f 67 72 61 6d 3b |.u_long |program;|
|00001380| 0a 58 09 75 5f 6c 6f 6e | 67 20 76 65 72 73 69 6f |.X.u_lon|g versio|
|00001390| 6e 3b 0a 58 7b 0a 58 09 | 73 74 72 75 63 74 20 73 |n;.X{.X.|struct s|
|000013a0| 6f 63 6b 61 64 64 72 5f | 69 6e 20 6d 79 61 64 64 |ockaddr_|in myadd|
|000013b0| 72 65 73 73 3b 0a 58 09 | 69 6e 74 20 73 6f 63 6b |ress;.X.|int sock|
|000013c0| 65 74 20 3d 20 2d 31 3b | 0a 58 09 72 65 67 69 73 |et = -1;|.X.regis|
|000013d0| 74 65 72 20 43 4c 49 45 | 4e 54 20 2a 63 6c 69 65 |ter CLIE|NT *clie|
|000013e0| 6e 74 3b 0a 58 09 73 74 | 72 75 63 74 20 70 6d 61 |nt;.X.st|ruct pma|
|000013f0| 70 20 70 61 72 6d 73 3b | 0a 58 09 62 6f 6f 6c 5f |p parms;|.X.bool_|
|00001400| 74 20 72 73 6c 74 3b 0a | 58 0a 58 09 67 65 74 5f |t rslt;.|X.X.get_|
|00001410| 6d 79 61 64 64 72 65 73 | 73 28 26 6d 79 61 64 64 |myaddres|s(&myadd|
|00001420| 72 65 73 73 29 3b 0a 58 | 09 63 6c 69 65 6e 74 20 |ress);.X|.client |
|00001430| 3d 20 63 6c 6e 74 75 64 | 70 5f 62 75 66 63 72 65 |= clntud|p_bufcre|
|00001440| 61 74 65 28 26 6d 79 61 | 64 64 72 65 73 73 2c 20 |ate(&mya|ddress, |
|00001450| 50 4d 41 50 50 52 4f 47 | 2c 20 50 4d 41 50 56 45 |PMAPPROG|, PMAPVE|
|00001460| 52 53 2c 0a 58 09 20 20 | 20 20 74 69 6d 65 6f 75 |RS,.X. | timeou|
|00001470| 74 2c 20 26 73 6f 63 6b | 65 74 2c 20 52 50 43 53 |t, &sock|et, RPCS|
|00001480| 4d 41 4c 4c 4d 53 47 53 | 49 5a 45 2c 20 52 50 43 |MALLMSGS|IZE, RPC|
|00001490| 53 4d 41 4c 4c 4d 53 47 | 53 49 5a 45 29 3b 0a 58 |SMALLMSG|SIZE);.X|
|000014a0| 09 69 66 20 28 63 6c 69 | 65 6e 74 20 3d 3d 20 28 |.if (cli|ent == (|
|000014b0| 43 4c 49 45 4e 54 20 2a | 29 4e 55 4c 4c 29 0a 58 |CLIENT *|)NULL).X|
|000014c0| 09 09 72 65 74 75 72 6e | 20 28 46 41 4c 53 45 29 |..return| (FALSE)|
|000014d0| 3b 0a 58 09 70 61 72 6d | 73 2e 70 6d 5f 70 72 6f |;.X.parm|s.pm_pro|
|000014e0| 67 20 3d 20 70 72 6f 67 | 72 61 6d 3b 0a 58 09 70 |g = prog|ram;.X.p|
|000014f0| 61 72 6d 73 2e 70 6d 5f | 76 65 72 73 20 3d 20 76 |arms.pm_|vers = v|
|00001500| 65 72 73 69 6f 6e 3b 0a | 58 09 70 61 72 6d 73 2e |ersion;.|X.parms.|
|00001510| 70 6d 5f 70 6f 72 74 20 | 3d 20 70 61 72 6d 73 2e |pm_port |= parms.|
|00001520| 70 6d 5f 70 72 6f 74 20 | 3d 20 30 3b 0a 58 09 43 |pm_prot |= 0;.X.C|
|00001530| 4c 4e 54 5f 43 41 4c 4c | 28 63 6c 69 65 6e 74 2c |LNT_CALL|(client,|
|00001540| 20 50 4d 41 50 50 52 4f | 43 5f 55 4e 53 45 54 2c | PMAPPRO|C_UNSET,|
|00001550| 20 78 64 72 5f 70 6d 61 | 70 2c 20 26 70 61 72 6d | xdr_pma|p, &parm|
|00001560| 73 2c 20 78 64 72 5f 62 | 6f 6f 6c 2c 20 26 72 73 |s, xdr_b|ool, &rs|
|00001570| 6c 74 2c 0a 58 09 20 20 | 20 20 74 6f 74 74 69 6d |lt,.X. | tottim|
|00001580| 65 6f 75 74 29 3b 0a 58 | 09 43 4c 4e 54 5f 44 45 |eout);.X|.CLNT_DE|
|00001590| 53 54 52 4f 59 28 63 6c | 69 65 6e 74 29 3b 0a 58 |STROY(cl|ient);.X|
|000015a0| 09 28 76 6f 69 64 29 63 | 6c 6f 73 65 28 73 6f 63 |.(void)c|lose(soc|
|000015b0| 6b 65 74 29 3b 0a 58 09 | 72 65 74 75 72 6e 20 28 |ket);.X.|return (|
|000015c0| 72 73 6c 74 29 3b 0a 58 | 7d 0a 58 0a 58 2f 2a 20 |rslt);.X|}.X.X/* |
|000015d0| 0a 58 20 2a 20 64 6f 6e | 27 74 20 75 73 65 20 67 |.X * don|'t use g|
|000015e0| 65 74 68 6f 73 74 62 79 | 6e 61 6d 65 2c 20 77 68 |ethostby|name, wh|
|000015f0| 69 63 68 20 77 6f 75 6c | 64 20 69 6e 76 6f 6b 65 |ich woul|d invoke|
|00001600| 20 79 65 6c 6c 6f 77 20 | 70 61 67 65 73 0a 58 20 | yellow |pages.X |
|00001610| 2a 2f 0a 58 67 65 74 5f | 6d 79 61 64 64 72 65 73 |*/.Xget_|myaddres|
|00001620| 73 28 61 64 64 72 29 0a | 58 09 73 74 72 75 63 74 |s(addr).|X.struct|
|00001630| 20 73 6f 63 6b 61 64 64 | 72 5f 69 6e 20 2a 61 64 | sockadd|r_in *ad|
|00001640| 64 72 3b 0a 58 7b 0a 58 | 09 69 6e 74 20 73 3b 0a |dr;.X{.X|.int s;.|
|00001650| 58 09 63 68 61 72 20 62 | 75 66 5b 42 55 46 53 49 |X.char b|uf[BUFSI|
|00001660| 5a 5d 3b 0a 58 09 73 74 | 72 75 63 74 20 69 66 63 |Z];.X.st|ruct ifc|
|00001670| 6f 6e 66 20 69 66 63 3b | 0a 58 09 73 74 72 75 63 |onf ifc;|.X.struc|
|00001680| 74 20 69 66 72 65 71 20 | 69 66 72 65 71 2c 20 2a |t ifreq |ifreq, *|
|00001690| 69 66 72 3b 0a 58 09 69 | 6e 74 20 6c 65 6e 3b 0a |ifr;.X.i|nt len;.|
|000016a0| 58 0a 58 09 69 66 20 28 | 28 73 20 3d 20 73 6f 63 |X.X.if (|(s = soc|
|000016b0| 6b 65 74 28 41 46 5f 49 | 4e 45 54 2c 20 53 4f 43 |ket(AF_I|NET, SOC|
|000016c0| 4b 5f 44 47 52 41 4d 2c | 20 30 29 29 20 3c 20 30 |K_DGRAM,| 0)) < 0|
|000016d0| 29 20 7b 0a 58 09 20 20 | 20 20 70 65 72 72 6f 72 |) {.X. | perror|
|000016e0| 28 22 67 65 74 5f 6d 79 | 61 64 64 72 65 73 73 3a |("get_my|address:|
|000016f0| 20 73 6f 63 6b 65 74 22 | 29 3b 0a 58 09 20 20 20 | socket"|);.X. |
|00001700| 20 65 78 69 74 28 31 29 | 3b 0a 58 09 7d 0a 58 09 | exit(1)|;.X.}.X.|
|00001710| 69 66 63 2e 69 66 63 5f | 6c 65 6e 20 3d 20 73 69 |ifc.ifc_|len = si|
|00001720| 7a 65 6f 66 20 28 62 75 | 66 29 3b 0a 58 09 69 66 |zeof (bu|f);.X.if|
|00001730| 63 2e 69 66 63 5f 62 75 | 66 20 3d 20 62 75 66 3b |c.ifc_bu|f = buf;|
|00001740| 0a 58 09 69 66 20 28 69 | 6f 63 74 6c 28 73 2c 20 |.X.if (i|octl(s, |
|00001750| 53 49 4f 43 47 49 46 43 | 4f 4e 46 2c 20 28 63 68 |SIOCGIFC|ONF, (ch|
|00001760| 61 72 20 2a 29 26 69 66 | 63 29 20 3c 20 30 29 20 |ar *)&if|c) < 0) |
|00001770| 7b 0a 58 09 09 70 65 72 | 72 6f 72 28 22 67 65 74 |{.X..per|ror("get|
|00001780| 5f 6d 79 61 64 64 72 65 | 73 73 3a 20 69 6f 63 74 |_myaddre|ss: ioct|
|00001790| 6c 20 28 67 65 74 20 69 | 6e 74 65 72 66 61 63 65 |l (get i|nterface|
|000017a0| 20 63 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 29 22 | configu|ration)"|
|000017b0| 29 3b 0a 58 09 09 65 78 | 69 74 28 31 29 3b 0a 58 |);.X..ex|it(1);.X|
|000017c0| 09 7d 0a 58 09 69 66 72 | 20 3d 20 69 66 63 2e 69 |.}.X.ifr| = ifc.i|
|000017d0| 66 63 5f 72 65 71 3b 0a | 58 09 66 6f 72 20 28 6c |fc_req;.|X.for (l|
|000017e0| 65 6e 20 3d 20 69 66 63 | 2e 69 66 63 5f 6c 65 6e |en = ifc|.ifc_len|
|000017f0| 3b 20 6c 65 6e 3b 20 6c | 65 6e 20 2d 3d 20 73 69 |; len; l|en -= si|
|00001800| 7a 65 6f 66 20 69 66 72 | 65 71 29 20 7b 0a 58 09 |zeof ifr|eq) {.X.|
|00001810| 09 69 66 72 65 71 20 3d | 20 2a 69 66 72 3b 0a 58 |.ifreq =| *ifr;.X|
|00001820| 09 09 69 66 20 28 69 6f | 63 74 6c 28 73 2c 20 53 |..if (io|ctl(s, S|
|00001830| 49 4f 43 47 49 46 46 4c | 41 47 53 2c 20 28 63 68 |IOCGIFFL|AGS, (ch|
|00001840| 61 72 20 2a 29 26 69 66 | 72 65 71 29 20 3c 20 30 |ar *)&if|req) < 0|
|00001850| 29 20 7b 0a 58 09 09 09 | 70 65 72 72 6f 72 28 22 |) {.X...|perror("|
|00001860| 67 65 74 5f 6d 79 61 64 | 64 72 65 73 73 3a 20 69 |get_myad|dress: i|
|00001870| 6f 63 74 6c 22 29 3b 0a | 58 09 09 09 65 78 69 74 |octl");.|X...exit|
|00001880| 28 31 29 3b 0a 58 09 09 | 7d 0a 58 09 09 69 66 20 |(1);.X..|}.X..if |
|00001890| 28 28 69 66 72 65 71 2e | 69 66 72 5f 66 6c 61 67 |((ifreq.|ifr_flag|
|000018a0| 73 20 26 20 49 46 46 5f | 55 50 29 20 26 26 0a 58 |s & IFF_|UP) &&.X|
|000018b0| 09 09 20 20 20 20 69 66 | 72 2d 3e 69 66 72 5f 61 |.. if|r->ifr_a|
|000018c0| 64 64 72 2e 73 61 5f 66 | 61 6d 69 6c 79 20 3d 3d |ddr.sa_f|amily ==|
|000018d0| 20 41 46 5f 49 4e 45 54 | 29 20 7b 0a 58 09 09 09 | AF_INET|) {.X...|
|000018e0| 2a 61 64 64 72 20 3d 20 | 2a 28 28 73 74 72 75 63 |*addr = |*((struc|
|000018f0| 74 20 73 6f 63 6b 61 64 | 64 72 5f 69 6e 20 2a 29 |t sockad|dr_in *)|
|00001900| 26 69 66 72 2d 3e 69 66 | 72 5f 61 64 64 72 29 3b |&ifr->if|r_addr);|
|00001910| 0a 58 09 09 09 61 64 64 | 72 2d 3e 73 69 6e 5f 70 |.X...add|r->sin_p|
|00001920| 6f 72 74 20 3d 20 68 74 | 6f 6e 73 28 50 4d 41 50 |ort = ht|ons(PMAP|
|00001930| 50 4f 52 54 29 3b 0a 58 | 09 09 09 62 72 65 61 6b |PORT);.X|...break|
|00001940| 3b 0a 58 09 09 7d 0a 58 | 09 09 69 66 72 2b 2b 3b |;.X..}.X|..ifr++;|
|00001950| 0a 58 09 7d 0a 58 09 63 | 6c 6f 73 65 28 73 29 3b |.X.}.X.c|lose(s);|
|00001960| 0a 58 7d 0a 53 48 41 52 | 5f 45 4f 46 0a 69 66 20 |.X}.SHAR|_EOF.if |
|00001970| 74 65 73 74 20 34 34 34 | 31 20 2d 6e 65 20 22 60 |test 444|1 -ne "`|
|00001980| 77 63 20 2d 63 20 3c 20 | 27 72 70 63 2f 72 70 63 |wc -c < |'rpc/rpc|
|00001990| 6c 69 62 2f 70 6d 61 70 | 5f 63 6c 6e 74 2e 63 27 |lib/pmap|_clnt.c'|
|000019a0| 60 22 0a 74 68 65 6e 0a | 09 65 63 68 6f 20 73 68 |`".then.|.echo sh|
|000019b0| 61 72 3a 20 22 65 72 72 | 6f 72 20 74 72 61 6e 73 |ar: "err|or trans|
|000019c0| 6d 69 74 74 69 6e 67 20 | 27 72 70 63 2f 72 70 63 |mitting |'rpc/rpc|
|000019d0| 6c 69 62 2f 70 6d 61 70 | 5f 63 6c 6e 74 2e 63 27 |lib/pmap|_clnt.c'|
|000019e0| 22 20 27 28 73 68 6f 75 | 6c 64 20 68 61 76 65 20 |" '(shou|ld have |
|000019f0| 62 65 65 6e 20 34 34 34 | 31 20 63 68 61 72 61 63 |been 444|1 charac|
|00001a00| 74 65 72 73 29 27 0a 66 | 69 0a 63 68 6d 6f 64 20 |ters)'.f|i.chmod |
|00001a10| 34 34 34 20 27 72 70 63 | 2f 72 70 63 6c 69 62 2f |444 'rpc|/rpclib/|
|00001a20| 70 6d 61 70 5f 63 6c 6e | 74 2e 63 27 0a 66 69 0a |pmap_cln|t.c'.fi.|
|00001a30| 65 63 68 6f 20 73 68 61 | 72 3a 20 22 65 78 74 72 |echo sha|r: "extr|
|00001a40| 61 63 74 69 6e 67 20 27 | 72 70 63 2f 72 70 63 6c |acting '|rpc/rpcl|
|00001a50| 69 62 2f 70 6d 61 70 5f | 67 65 74 6d 61 70 73 2e |ib/pmap_|getmaps.|
|00001a60| 63 27 22 20 27 28 32 37 | 33 32 20 63 68 61 72 61 |c'" '(27|32 chara|
|00001a70| 63 74 65 72 73 29 27 0a | 69 66 20 74 65 73 74 20 |cters)'.|if test |
|00001a80| 2d 66 20 27 72 70 63 2f | 72 70 63 6c 69 62 2f 70 |-f 'rpc/|rpclib/p|
|00001a90| 6d 61 70 5f 67 65 74 6d | 61 70 73 2e 63 27 0a 74 |map_getm|aps.c'.t|
|00001aa0| 68 65 6e 0a 09 65 63 68 | 6f 20 73 68 61 72 3a 20 |hen..ech|o shar: |
|00001ab0| 22 77 69 6c 6c 20 6e 6f | 74 20 6f 76 65 72 2d 77 |"will no|t over-w|
|00001ac0| 72 69 74 65 20 65 78 69 | 73 74 69 6e 67 20 66 69 |rite exi|sting fi|
|00001ad0| 6c 65 20 27 72 70 63 2f | 72 70 63 6c 69 62 2f 70 |le 'rpc/|rpclib/p|
|00001ae0| 6d 61 70 5f 67 65 74 6d | 61 70 73 2e 63 27 22 0a |map_getm|aps.c'".|
|00001af0| 65 6c 73 65 0a 73 65 64 | 20 27 73 2f 5e 58 2f 2f |else.sed| 's/^X//|
|00001b00| 27 20 3c 3c 20 5c 53 48 | 41 52 5f 45 4f 46 20 3e |' << \SH|AR_EOF >|
|00001b10| 20 27 72 70 63 2f 72 70 | 63 6c 69 62 2f 70 6d 61 | 'rpc/rp|clib/pma|
|00001b20| 70 5f 67 65 74 6d 61 70 | 73 2e 63 27 0a 58 2f 2a |p_getmap|s.c'.X/*|
|00001b30| 0a 58 20 2a 20 53 75 6e | 20 52 50 43 20 69 73 20 |.X * Sun| RPC is |
|00001b40| 61 20 70 72 6f 64 75 63 | 74 20 6f 66 20 53 75 6e |a produc|t of Sun|
|00001b50| 20 4d 69 63 72 6f 73 79 | 73 74 65 6d 73 2c 20 49 | Microsy|stems, I|
|00001b60| 6e 63 2e 20 61 6e 64 20 | 69 73 20 70 72 6f 76 69 |nc. and |is provi|
|00001b70| 64 65 64 20 66 6f 72 0a | 58 20 2a 20 75 6e 72 65 |ded for.|X * unre|
|00001b80| 73 74 72 69 63 74 65 64 | 20 75 73 65 20 70 72 6f |stricted| use pro|
|00001b90| 76 69 64 65 64 20 74 68 | 61 74 20 74 68 69 73 20 |vided th|at this |
|00001ba0| 6c 65 67 65 6e 64 20 69 | 73 20 69 6e 63 6c 75 64 |legend i|s includ|
|00001bb0| 65 64 20 6f 6e 20 61 6c | 6c 20 74 61 70 65 0a 58 |ed on al|l tape.X|
|00001bc0| 20 2a 20 6d 65 64 69 61 | 20 61 6e 64 20 61 73 20 | * media| and as |
|00001bd0| 61 20 70 61 72 74 20 6f | 66 20 74 68 65 20 73 6f |a part o|f the so|
|00001be0| 66 74 77 61 72 65 20 70 | 72 6f 67 72 61 6d 20 69 |ftware p|rogram i|
|00001bf0| 6e 20 77 68 6f 6c 65 20 | 6f 72 20 70 61 72 74 2e |n whole |or part.|
|00001c00| 20 20 55 73 65 72 73 0a | 58 20 2a 20 6d 61 79 20 | Users.|X * may |
|00001c10| 63 6f 70 79 20 6f 72 20 | 6d 6f 64 69 66 79 20 53 |copy or |modify S|
|00001c20| 75 6e 20 52 50 43 20 77 | 69 74 68 6f 75 74 20 63 |un RPC w|ithout c|
|00001c30| 68 61 72 67 65 2c 20 62 | 75 74 20 61 72 65 20 6e |harge, b|ut are n|
|00001c40| 6f 74 20 61 75 74 68 6f | 72 69 7a 65 64 0a 58 20 |ot autho|rized.X |
|00001c50| 2a 20 74 6f 20 6c 69 63 | 65 6e 73 65 20 6f 72 20 |* to lic|ense or |
|00001c60| 64 69 73 74 72 69 62 75 | 74 65 20 69 74 20 74 6f |distribu|te it to|
|00001c70| 20 61 6e 79 6f 6e 65 20 | 65 6c 73 65 20 65 78 63 | anyone |else exc|
|00001c80| 65 70 74 20 61 73 20 70 | 61 72 74 20 6f 66 20 61 |ept as p|art of a|
|00001c90| 20 70 72 6f 64 75 63 74 | 20 6f 72 0a 58 20 2a 20 | product| or.X * |
|00001ca0| 70 72 6f 67 72 61 6d 20 | 64 65 76 65 6c 6f 70 65 |program |develope|
|00001cb0| 64 20 62 79 20 74 68 65 | 20 75 73 65 72 2e 0a 58 |d by the| user..X|
|00001cc0| 20 2a 20 0a 58 20 2a 20 | 53 55 4e 20 52 50 43 20 | * .X * |SUN RPC |
|00001cd0| 49 53 20 50 52 4f 56 49 | 44 45 44 20 41 53 20 49 |IS PROVI|DED AS I|
|00001ce0| 53 20 57 49 54 48 20 4e | 4f 20 57 41 52 52 41 4e |S WITH N|O WARRAN|
|00001cf0| 54 49 45 53 20 4f 46 20 | 41 4e 59 20 4b 49 4e 44 |TIES OF |ANY KIND|
|00001d00| 20 49 4e 43 4c 55 44 49 | 4e 47 20 54 48 45 0a 58 | INCLUDI|NG THE.X|
|00001d10| 20 2a 20 57 41 52 52 41 | 4e 54 49 45 53 20 4f 46 | * WARRA|NTIES OF|
|00001d20| 20 44 45 53 49 47 4e 2c | 20 4d 45 52 43 48 41 4e | DESIGN,| MERCHAN|
|00001d30| 54 49 42 49 4c 49 54 59 | 20 41 4e 44 20 46 49 54 |TIBILITY| AND FIT|
|00001d40| 4e 45 53 53 20 46 4f 52 | 20 41 20 50 41 52 54 49 |NESS FOR| A PARTI|
|00001d50| 43 55 4c 41 52 0a 58 20 | 2a 20 50 55 52 50 4f 53 |CULAR.X |* PURPOS|
|00001d60| 45 2c 20 4f 52 20 41 52 | 49 53 49 4e 47 20 46 52 |E, OR AR|ISING FR|
|00001d70| 4f 4d 20 41 20 43 4f 55 | 52 53 45 20 4f 46 20 44 |OM A COU|RSE OF D|
|00001d80| 45 41 4c 49 4e 47 2c 20 | 55 53 41 47 45 20 4f 52 |EALING, |USAGE OR|
|00001d90| 20 54 52 41 44 45 20 50 | 52 41 43 54 49 43 45 2e | TRADE P|RACTICE.|
|00001da0| 0a 58 20 2a 20 0a 58 20 | 2a 20 53 75 6e 20 52 50 |.X * .X |* Sun RP|
|00001db0| 43 20 69 73 20 70 72 6f | 76 69 64 65 64 20 77 69 |C is pro|vided wi|
|00001dc0| 74 68 20 6e 6f 20 73 75 | 70 70 6f 72 74 20 61 6e |th no su|pport an|
|00001dd0| 64 20 77 69 74 68 6f 75 | 74 20 61 6e 79 20 6f 62 |d withou|t any ob|
|00001de0| 6c 69 67 61 74 69 6f 6e | 20 6f 6e 20 74 68 65 0a |ligation| on the.|
|00001df0| 58 20 2a 20 70 61 72 74 | 20 6f 66 20 53 75 6e 20 |X * part| of Sun |
|00001e00| 4d 69 63 72 6f 73 79 73 | 74 65 6d 73 2c 20 49 6e |Microsys|tems, In|
|00001e10| 63 2e 20 74 6f 20 61 73 | 73 69 73 74 20 69 6e 20 |c. to as|sist in |
|00001e20| 69 74 73 20 75 73 65 2c | 20 63 6f 72 72 65 63 74 |its use,| correct|
|00001e30| 69 6f 6e 2c 0a 58 20 2a | 20 6d 6f 64 69 66 69 63 |ion,.X *| modific|
|00001e40| 61 74 69 6f 6e 20 6f 72 | 20 65 6e 68 61 6e 63 65 |ation or| enhance|
|00001e50| 6d 65 6e 74 2e 0a 58 20 | 2a 20 0a 58 20 2a 20 53 |ment..X |* .X * S|
|00001e60| 55 4e 20 4d 49 43 52 4f | 53 59 53 54 45 4d 53 2c |UN MICRO|SYSTEMS,|
|00001e70| 20 49 4e 43 2e 20 53 48 | 41 4c 4c 20 48 41 56 45 | INC. SH|ALL HAVE|
|00001e80| 20 4e 4f 20 4c 49 41 42 | 49 4c 49 54 59 20 57 49 | NO LIAB|ILITY WI|
|00001e90| 54 48 20 52 45 53 50 45 | 43 54 20 54 4f 20 54 48 |TH RESPE|CT TO TH|
|00001ea0| 45 0a 58 20 2a 20 49 4e | 46 52 49 4e 47 45 4d 45 |E.X * IN|FRINGEME|
|00001eb0| 4e 54 20 4f 46 20 43 4f | 50 59 52 49 47 48 54 53 |NT OF CO|PYRIGHTS|
|00001ec0| 2c 20 54 52 41 44 45 20 | 53 45 43 52 45 54 53 20 |, TRADE |SECRETS |
|00001ed0| 4f 52 20 41 4e 59 20 50 | 41 54 45 4e 54 53 20 42 |OR ANY P|ATENTS B|
|00001ee0| 59 20 53 55 4e 20 52 50 | 43 0a 58 20 2a 20 4f 52 |Y SUN RP|C.X * OR|
|00001ef0| 20 41 4e 59 20 50 41 52 | 54 20 54 48 45 52 45 4f | ANY PAR|T THEREO|
|00001f00| 46 2e 0a 58 20 2a 20 0a | 58 20 2a 20 49 6e 20 6e |F..X * .|X * In n|
|00001f10| 6f 20 65 76 65 6e 74 20 | 77 69 6c 6c 20 53 75 6e |o event |will Sun|
|00001f20| 20 4d 69 63 72 6f 73 79 | 73 74 65 6d 73 2c 20 49 | Microsy|stems, I|
|00001f30| 6e 63 2e 20 62 65 20 6c | 69 61 62 6c 65 20 66 6f |nc. be l|iable fo|
|00001f40| 72 20 61 6e 79 20 6c 6f | 73 74 20 72 65 76 65 6e |r any lo|st reven|
|00001f50| 75 65 0a 58 20 2a 20 6f | 72 20 70 72 6f 66 69 74 |ue.X * o|r profit|
|00001f60| 73 20 6f 72 20 6f 74 68 | 65 72 20 73 70 65 63 69 |s or oth|er speci|
|00001f70| 61 6c 2c 20 69 6e 64 69 | 72 65 63 74 20 61 6e 64 |al, indi|rect and|
|00001f80| 20 63 6f 6e 73 65 71 75 | 65 6e 74 69 61 6c 20 64 | consequ|ential d|
|00001f90| 61 6d 61 67 65 73 2c 20 | 65 76 65 6e 20 69 66 0a |amages, |even if.|
|00001fa0| 58 20 2a 20 53 75 6e 20 | 68 61 73 20 62 65 65 6e |X * Sun |has been|
|00001fb0| 20 61 64 76 69 73 65 64 | 20 6f 66 20 74 68 65 20 | advised| of the |
|00001fc0| 70 6f 73 73 69 62 69 6c | 69 74 79 20 6f 66 20 73 |possibil|ity of s|
|00001fd0| 75 63 68 20 64 61 6d 61 | 67 65 73 2e 0a 58 20 2a |uch dama|ges..X *|
|00001fe0| 20 0a 58 20 2a 20 53 75 | 6e 20 4d 69 63 72 6f 73 | .X * Su|n Micros|
|00001ff0| 79 73 74 65 6d 73 2c 20 | 49 6e 63 2e 0a 58 20 2a |ystems, |Inc..X *|
|00002000| 20 32 35 35 30 20 47 61 | 72 63 69 61 20 41 76 65 | 2550 Ga|rcia Ave|
|00002010| 6e 75 65 0a 58 20 2a 20 | 4d 6f 75 6e 74 61 69 6e |nue.X * |Mountain|
|00002020| 20 56 69 65 77 2c 20 43 | 61 6c 69 66 6f 72 6e 69 | View, C|aliforni|
|00002030| 61 20 20 39 34 30 34 33 | 0a 58 20 2a 2f 0a 58 23 |a 94043|.X */.X#|
|00002040| 69 66 6e 64 65 66 20 6c | 69 6e 74 0a 58 73 74 61 |ifndef l|int.Xsta|
|00002050| 74 69 63 20 63 68 61 72 | 20 73 63 63 73 69 64 5b |tic char| sccsid[|
|00002060| 5d 20 3d 20 22 40 28 23 | 29 70 6d 61 70 5f 67 65 |] = "@(#|)pmap_ge|
|00002070| 74 6d 61 70 73 2e 63 20 | 31 2e 31 20 38 36 2f 30 |tmaps.c |1.1 86/0|
|00002080| 32 2f 30 33 20 43 6f 70 | 79 72 20 31 39 38 34 20 |2/03 Cop|yr 1984 |
|00002090| 53 75 6e 20 4d 69 63 72 | 6f 22 3b 0a 58 23 65 6e |Sun Micr|o";.X#en|
|000020a0| 64 69 66 0a 58 0a 58 2f | 2a 0a 58 20 2a 20 70 6d |dif.X.X/|*.X * pm|
|000020b0| 61 70 5f 67 65 74 6d 61 | 70 2e 63 0a 58 20 2a 20 |ap_getma|p.c.X * |
|000020c0| 43 6c 69 65 6e 74 20 69 | 6e 74 65 72 66 61 63 65 |Client i|nterface|
|000020d0| 20 74 6f 20 70 6d 61 70 | 20 72 70 63 20 73 65 72 | to pmap| rpc ser|
|000020e0| 76 69 63 65 2e 0a 58 20 | 2a 20 63 6f 6e 74 61 69 |vice..X |* contai|
|000020f0| 6e 73 20 70 6d 61 70 5f | 67 65 74 6d 61 70 73 2c |ns pmap_|getmaps,|
|00002100| 20 77 68 69 63 68 20 69 | 73 20 6f 6e 6c 79 20 74 | which i|s only t|
|00002110| 63 70 20 73 65 72 76 69 | 63 65 20 69 6e 76 6f 6c |cp servi|ce invol|
|00002120| 76 65 64 0a 58 20 2a 0a | 58 20 2a 20 43 6f 70 79 |ved.X *.|X * Copy|
|00002130| 72 69 67 68 74 20 28 43 | 29 20 31 39 38 34 2c 20 |right (C|) 1984, |
|00002140| 53 75 6e 20 4d 69 63 72 | 6f 73 79 73 74 65 6d 73 |Sun Micr|osystems|
|00002150| 2c 20 49 6e 63 2e 0a 58 | 20 2a 2f 0a 58 0a 58 23 |, Inc..X| */.X.X#|
|00002160| 69 6e 63 6c 75 64 65 20 | 22 74 79 70 65 73 2e 68 |include |"types.h|
|00002170| 22 0a 58 23 69 6e 63 6c | 75 64 65 20 3c 6e 65 74 |".X#incl|ude <net|
|00002180| 69 6e 65 74 2f 69 6e 2e | 68 3e 0a 58 23 69 6e 63 |inet/in.|h>.X#inc|
|00002190| 6c 75 64 65 20 22 78 64 | 72 2e 68 22 0a 58 23 69 |lude "xd|r.h".X#i|
|000021a0| 6e 63 6c 75 64 65 20 22 | 61 75 74 68 2e 68 22 0a |nclude "|auth.h".|
|000021b0| 58 23 69 6e 63 6c 75 64 | 65 20 22 63 6c 6e 74 2e |X#includ|e "clnt.|
|000021c0| 68 22 0a 58 23 69 6e 63 | 6c 75 64 65 20 22 72 70 |h".X#inc|lude "rp|
|000021d0| 63 5f 6d 73 67 2e 68 22 | 0a 58 23 69 6e 63 6c 75 |c_msg.h"|.X#inclu|
|000021e0| 64 65 20 22 70 6d 61 70 | 5f 70 72 6f 74 2e 68 22 |de "pmap|_prot.h"|
|000021f0| 20 0a 58 23 69 6e 63 6c | 75 64 65 20 22 70 6d 61 | .X#incl|ude "pma|
|00002200| 70 5f 63 6c 6e 74 2e 68 | 22 0a 58 23 69 6e 63 6c |p_clnt.h|".X#incl|
|00002210| 75 64 65 20 3c 73 79 73 | 2f 73 6f 63 6b 65 74 2e |ude <sys|/socket.|
|00002220| 68 3e 0a 58 23 69 6e 63 | 6c 75 64 65 20 3c 73 79 |h>.X#inc|lude <sy|
|00002230| 73 2f 74 69 6d 65 2e 68 | 3e 0a 58 23 69 6e 63 6c |s/time.h|>.X#incl|
|00002240| 75 64 65 20 3c 6e 65 74 | 64 62 2e 68 3e 0a 58 23 |ude <net|db.h>.X#|
|00002250| 69 6e 63 6c 75 64 65 20 | 3c 73 74 64 69 6f 2e 68 |include |<stdio.h|
|00002260| 3e 0a 58 23 69 6e 63 6c | 75 64 65 20 3c 65 72 72 |>.X#incl|ude <err|
|00002270| 6e 6f 2e 68 3e 0a 58 23 | 69 6e 63 6c 75 64 65 20 |no.h>.X#|include |
|00002280| 3c 6e 65 74 2f 69 66 2e | 68 3e 0a 58 23 69 6e 63 |<net/if.|h>.X#inc|
|00002290| 6c 75 64 65 20 3c 73 79 | 73 2f 69 6f 63 74 6c 2e |lude <sy|s/ioctl.|
|000022a0| 68 3e 0a 58 23 64 65 66 | 69 6e 65 20 4e 41 4d 45 |h>.X#def|ine NAME|
|000022b0| 4c 45 4e 20 32 35 35 0a | 58 23 64 65 66 69 6e 65 |LEN 255.|X#define|
|000022c0| 20 4d 41 58 5f 42 52 4f | 41 44 43 41 53 54 5f 53 | MAX_BRO|ADCAST_S|
|000022d0| 49 5a 45 20 31 34 30 30 | 0a 58 0a 58 65 78 74 65 |IZE 1400|.X.Xexte|
|000022e0| 72 6e 20 69 6e 74 20 65 | 72 72 6e 6f 3b 0a 58 73 |rn int e|rrno;.Xs|
|000022f0| 74 61 74 69 63 20 73 74 | 72 75 63 74 20 73 6f 63 |tatic st|ruct soc|
|00002300| 6b 61 64 64 72 5f 69 6e | 20 6d 79 61 64 64 72 65 |kaddr_in| myaddre|
|00002310| 73 73 3b 0a 58 0a 58 2f | 2a 0a 58 20 2a 20 47 65 |ss;.X.X/|*.X * Ge|
|00002320| 74 20 61 20 63 6f 70 79 | 20 6f 66 20 74 68 65 20 |t a copy| of the |
|00002330| 63 75 72 72 65 6e 74 20 | 70 6f 72 74 20 6d 61 70 |current |port map|
|00002340| 73 2e 0a 58 20 2a 20 43 | 61 6c 6c 73 20 74 68 65 |s..X * C|alls the|
|00002350| 20 70 6d 61 70 20 73 65 | 72 76 69 63 65 20 72 65 | pmap se|rvice re|
|00002360| 6d 6f 74 65 6c 79 20 74 | 6f 20 64 6f 20 67 65 74 |motely t|o do get|
|00002370| 20 74 68 65 20 6d 61 70 | 73 2e 0a 58 20 2a 2f 0a | the map|s..X */.|
|00002380| 58 73 74 72 75 63 74 20 | 70 6d 61 70 6c 69 73 74 |Xstruct |pmaplist|
|00002390| 20 2a 0a 58 70 6d 61 70 | 5f 67 65 74 6d 61 70 73 | *.Xpmap|_getmaps|
|000023a0| 28 61 64 64 72 65 73 73 | 29 0a 58 09 20 73 74 72 |(address|).X. str|
|000023b0| 75 63 74 20 73 6f 63 6b | 61 64 64 72 5f 69 6e 20 |uct sock|addr_in |
|000023c0| 2a 61 64 64 72 65 73 73 | 3b 0a 58 7b 0a 58 09 73 |*address|;.X{.X.s|
|000023d0| 74 72 75 63 74 20 70 6d | 61 70 6c 69 73 74 20 2a |truct pm|aplist *|
|000023e0| 68 65 61 64 20 3d 20 28 | 73 74 72 75 63 74 20 70 |head = (|struct p|
|000023f0| 6d 61 70 6c 69 73 74 20 | 2a 29 4e 55 4c 4c 3b 0a |maplist |*)NULL;.|
|00002400| 58 09 69 6e 74 20 73 6f | 63 6b 65 74 20 3d 20 2d |X.int so|cket = -|
|00002410| 31 3b 0a 58 09 73 74 72 | 75 63 74 20 74 69 6d 65 |1;.X.str|uct time|
|00002420| 76 61 6c 20 6d 69 6e 75 | 74 65 74 69 6d 65 6f 75 |val minu|tetimeou|
|00002430| 74 3b 0a 58 09 72 65 67 | 69 73 74 65 72 20 43 4c |t;.X.reg|ister CL|
|00002440| 49 45 4e 54 20 2a 63 6c | 69 65 6e 74 3b 0a 58 0a |IENT *cl|ient;.X.|
|00002450| 58 09 6d 69 6e 75 74 65 | 74 69 6d 65 6f 75 74 2e |X.minute|timeout.|
|00002460| 74 76 5f 73 65 63 20 3d | 20 36 30 3b 0a 58 09 6d |tv_sec =| 60;.X.m|
|00002470| 69 6e 75 74 65 74 69 6d | 65 6f 75 74 2e 74 76 5f |inutetim|eout.tv_|
|00002480| 75 73 65 63 20 3d 20 30 | 3b 0a 58 09 61 64 64 72 |usec = 0|;.X.addr|
|00002490| 65 73 73 2d 3e 73 69 6e | 5f 70 6f 72 74 20 3d 20 |ess->sin|_port = |
|000024a0| 68 74 6f 6e 73 28 50 4d | 41 50 50 4f 52 54 29 3b |htons(PM|APPORT);|
|000024b0| 0a 58 09 63 6c 69 65 6e | 74 20 3d 20 63 6c 6e 74 |.X.clien|t = clnt|
|000024c0| 74 63 70 5f 63 72 65 61 | 74 65 28 61 64 64 72 65 |tcp_crea|te(addre|
|000024d0| 73 73 2c 20 50 4d 41 50 | 50 52 4f 47 2c 0a 58 09 |ss, PMAP|PROG,.X.|
|000024e0| 20 20 20 20 50 4d 41 50 | 56 45 52 53 2c 20 26 73 | PMAP|VERS, &s|
|000024f0| 6f 63 6b 65 74 2c 20 35 | 30 2c 20 35 30 30 29 3b |ocket, 5|0, 500);|
|00002500| 0a 58 09 69 66 20 28 63 | 6c 69 65 6e 74 20 21 3d |.X.if (c|lient !=|
|00002510| 20 28 43 4c 49 45 4e 54 | 20 2a 29 4e 55 4c 4c 29 | (CLIENT| *)NULL)|
|00002520| 20 7b 0a 58 09 09 69 66 | 20 28 43 4c 4e 54 5f 43 | {.X..if| (CLNT_C|
|00002530| 41 4c 4c 28 63 6c 69 65 | 6e 74 2c 20 50 4d 41 50 |ALL(clie|nt, PMAP|
|00002540| 50 52 4f 43 5f 44 55 4d | 50 2c 20 78 64 72 5f 76 |PROC_DUM|P, xdr_v|
|00002550| 6f 69 64 2c 20 4e 55 4c | 4c 2c 20 78 64 72 5f 70 |oid, NUL|L, xdr_p|
|00002560| 6d 61 70 6c 69 73 74 2c | 0a 58 09 09 20 20 20 20 |maplist,|.X.. |
|00002570| 26 68 65 61 64 2c 20 6d | 69 6e 75 74 65 74 69 6d |&head, m|inutetim|
|00002580| 65 6f 75 74 29 20 21 3d | 20 52 50 43 5f 53 55 43 |eout) !=| RPC_SUC|
|00002590| 43 45 53 53 29 20 7b 0a | 58 09 09 09 63 6c 6e 74 |CESS) {.|X...clnt|
|000025a0| 5f 70 65 72 72 6f 72 28 | 63 6c 69 65 6e 74 2c 20 |_perror(|client, |
|000025b0| 22 70 6d 61 70 5f 67 65 | 74 6d 61 70 73 20 72 70 |"pmap_ge|tmaps rp|
|000025c0| 63 20 70 72 6f 62 6c 65 | 6d 22 29 3b 0a 58 09 09 |c proble|m");.X..|
|000025d0| 7d 0a 58 09 09 43 4c 4e | 54 5f 44 45 53 54 52 4f |}.X..CLN|T_DESTRO|
|000025e0| 59 28 63 6c 69 65 6e 74 | 29 3b 0a 58 09 7d 0a 58 |Y(client|);.X.}.X|
|000025f0| 09 28 76 6f 69 64 29 63 | 6c 6f 73 65 28 73 6f 63 |.(void)c|lose(soc|
|00002600| 6b 65 74 29 3b 0a 58 09 | 61 64 64 72 65 73 73 2d |ket);.X.|address-|
|00002610| 3e 73 69 6e 5f 70 6f 72 | 74 20 3d 20 30 3b 0a 58 |>sin_por|t = 0;.X|
|00002620| 09 72 65 74 75 72 6e 20 | 28 68 65 61 64 29 3b 0a |.return |(head);.|
|00002630| 58 7d 0a 53 48 41 52 5f | 45 4f 46 0a 69 66 20 74 |X}.SHAR_|EOF.if t|
|00002640| 65 73 74 20 32 37 33 32 | 20 2d 6e 65 20 22 60 77 |est 2732| -ne "`w|
|00002650| 63 20 2d 63 20 3c 20 27 | 72 70 63 2f 72 70 63 6c |c -c < '|rpc/rpcl|
|00002660| 69 62 2f 70 6d 61 70 5f | 67 65 74 6d 61 70 73 2e |ib/pmap_|getmaps.|
|00002670| 63 27 60 22 0a 74 68 65 | 6e 0a 09 65 63 68 6f 20 |c'`".the|n..echo |
|00002680| 73 68 61 72 3a 20 22 65 | 72 72 6f 72 20 74 72 61 |shar: "e|rror tra|
|00002690| 6e 73 6d 69 74 74 69 6e | 67 20 27 72 70 63 2f 72 |nsmittin|g 'rpc/r|
|000026a0| 70 63 6c 69 62 2f 70 6d | 61 70 5f 67 65 74 6d 61 |pclib/pm|ap_getma|
|000026b0| 70 73 2e 63 27 22 20 27 | 28 73 68 6f 75 6c 64 20 |ps.c'" '|(should |
|000026c0| 68 61 76 65 20 62 65 65 | 6e 20 32 37 33 32 20 63 |have bee|n 2732 c|
|000026d0| 68 61 72 61 63 74 65 72 | 73 29 27 0a 66 69 0a 63 |haracter|s)'.fi.c|
|000026e0| 68 6d 6f 64 20 34 34 34 | 20 27 72 70 63 2f 72 70 |hmod 444| 'rpc/rp|
|000026f0| 63 6c 69 62 2f 70 6d 61 | 70 5f 67 65 74 6d 61 70 |clib/pma|p_getmap|
|00002700| 73 2e 63 27 0a 66 69 0a | 65 63 68 6f 20 73 68 61 |s.c'.fi.|echo sha|
|00002710| 72 3a 20 22 65 78 74 72 | 61 63 74 69 6e 67 20 27 |r: "extr|acting '|
|00002720| 72 70 63 2f 72 70 63 6c | 69 62 2f 70 6d 61 70 5f |rpc/rpcl|ib/pmap_|
|00002730| 67 65 74 70 6f 72 74 2e | 63 27 22 20 27 28 32 39 |getport.|c'" '(29|
|00002740| 34 36 20 63 68 61 72 61 | 63 74 65 72 73 29 27 0a |46 chara|cters)'.|
|00002750| 69 66 20 74 65 73 74 20 | 2d 66 20 27 72 70 63 2f |if test |-f 'rpc/|
|00002760| 72 70 63 6c 69 62 2f 70 | 6d 61 70 5f 67 65 74 70 |rpclib/p|map_getp|
|00002770| 6f 72 74 2e 63 27 0a 74 | 68 65 6e 0a 09 65 63 68 |ort.c'.t|hen..ech|
|00002780| 6f 20 73 68 61 72 3a 20 | 22 77 69 6c 6c 20 6e 6f |o shar: |"will no|
|00002790| 74 20 6f 76 65 72 2d 77 | 72 69 74 65 20 65 78 69 |t over-w|rite exi|
|000027a0| 73 74 69 6e 67 20 66 69 | 6c 65 20 27 72 70 63 2f |sting fi|le 'rpc/|
|000027b0| 72 70 63 6c 69 62 2f 70 | 6d 61 70 5f 67 65 74 70 |rpclib/p|map_getp|
|000027c0| 6f 72 74 2e 63 27 22 0a | 65 6c 73 65 0a 73 65 64 |ort.c'".|else.sed|
|000027d0| 20 27 73 2f 5e 58 2f 2f | 27 20 3c 3c 20 5c 53 48 | 's/^X//|' << \SH|
|000027e0| 41 52 5f 45 4f 46 20 3e | 20 27 72 70 63 2f 72 70 |AR_EOF >| 'rpc/rp|
|000027f0| 63 6c 69 62 2f 70 6d 61 | 70 5f 67 65 74 70 6f 72 |clib/pma|p_getpor|
|00002800| 74 2e 63 27 0a 58 2f 2a | 0a 58 20 2a 20 53 75 6e |t.c'.X/*|.X * Sun|
|00002810| 20 52 50 43 20 69 73 20 | 61 20 70 72 6f 64 75 63 | RPC is |a produc|
|00002820| 74 20 6f 66 20 53 75 6e | 20 4d 69 63 72 6f 73 79 |t of Sun| Microsy|
|00002830| 73 74 65 6d 73 2c 20 49 | 6e 63 2e 20 61 6e 64 20 |stems, I|nc. and |
|00002840| 69 73 20 70 72 6f 76 69 | 64 65 64 20 66 6f 72 0a |is provi|ded for.|
|00002850| 58 20 2a 20 75 6e 72 65 | 73 74 72 69 63 74 65 64 |X * unre|stricted|
|00002860| 20 75 73 65 20 70 72 6f | 76 69 64 65 64 20 74 68 | use pro|vided th|
|00002870| 61 74 20 74 68 69 73 20 | 6c 65 67 65 6e 64 20 69 |at this |legend i|
|00002880| 73 20 69 6e 63 6c 75 64 | 65 64 20 6f 6e 20 61 6c |s includ|ed on al|
|00002890| 6c 20 74 61 70 65 0a 58 | 20 2a 20 6d 65 64 69 61 |l tape.X| * media|
|000028a0| 20 61 6e 64 20 61 73 20 | 61 20 70 61 72 74 20 6f | and as |a part o|
|000028b0| 66 20 74 68 65 20 73 6f | 66 74 77 61 72 65 20 70 |f the so|ftware p|
|000028c0| 72 6f 67 72 61 6d 20 69 | 6e 20 77 68 6f 6c 65 20 |rogram i|n whole |
|000028d0| 6f 72 20 70 61 72 74 2e | 20 20 55 73 65 72 73 0a |or part.| Users.|
|000028e0| 58 20 2a 20 6d 61 79 20 | 63 6f 70 79 20 6f 72 20 |X * may |copy or |
|000028f0| 6d 6f 64 69 66 79 20 53 | 75 6e 20 52 50 43 20 77 |modify S|un RPC w|
|00002900| 69 74 68 6f 75 74 20 63 | 68 61 72 67 65 2c 20 62 |ithout c|harge, b|
|00002910| 75 74 20 61 72 65 20 6e | 6f 74 20 61 75 74 68 6f |ut are n|ot autho|
|00002920| 72 69 7a 65 64 0a 58 20 | 2a 20 74 6f 20 6c 69 63 |rized.X |* to lic|
|00002930| 65 6e 73 65 20 6f 72 20 | 64 69 73 74 72 69 62 75 |ense or |distribu|
|00002940| 74 65 20 69 74 20 74 6f | 20 61 6e 79 6f 6e 65 20 |te it to| anyone |
|00002950| 65 6c 73 65 20 65 78 63 | 65 70 74 20 61 73 20 70 |else exc|ept as p|
|00002960| 61 72 74 20 6f 66 20 61 | 20 70 72 6f 64 75 63 74 |art of a| product|
|00002970| 20 6f 72 0a 58 20 2a 20 | 70 72 6f 67 72 61 6d 20 | or.X * |program |
|00002980| 64 65 76 65 6c 6f 70 65 | 64 20 62 79 20 74 68 65 |develope|d by the|
|00002990| 20 75 73 65 72 2e 0a 58 | 20 2a 20 0a 58 20 2a 20 | user..X| * .X * |
|000029a0| 53 55 4e 20 52 50 43 20 | 49 53 20 50 52 4f 56 49 |SUN RPC |IS PROVI|
|000029b0| 44 45 44 20 41 53 20 49 | 53 20 57 49 54 48 20 4e |DED AS I|S WITH N|
|000029c0| 4f 20 57 41 52 52 41 4e | 54 49 45 53 20 4f 46 20 |O WARRAN|TIES OF |
|000029d0| 41 4e 59 20 4b 49 4e 44 | 20 49 4e 43 4c 55 44 49 |ANY KIND| INCLUDI|
|000029e0| 4e 47 20 54 48 45 0a 58 | 20 2a 20 57 41 52 52 41 |NG THE.X| * WARRA|
|000029f0| 4e 54 49 45 53 20 4f 46 | 20 44 45 53 49 47 4e 2c |NTIES OF| DESIGN,|
|00002a00| 20 4d 45 52 43 48 41 4e | 54 49 42 49 4c 49 54 59 | MERCHAN|TIBILITY|
|00002a10| 20 41 4e 44 20 46 49 54 | 4e 45 53 53 20 46 4f 52 | AND FIT|NESS FOR|
|00002a20| 20 41 20 50 41 52 54 49 | 43 55 4c 41 52 0a 58 20 | A PARTI|CULAR.X |
|00002a30| 2a 20 50 55 52 50 4f 53 | 45 2c 20 4f 52 20 41 52 |* PURPOS|E, OR AR|
|00002a40| 49 53 49 4e 47 20 46 52 | 4f 4d 20 41 20 43 4f 55 |ISING FR|OM A COU|
|00002a50| 52 53 45 20 4f 46 20 44 | 45 41 4c 49 4e 47 2c 20 |RSE OF D|EALING, |
|00002a60| 55 53 41 47 45 20 4f 52 | 20 54 52 41 44 45 20 50 |USAGE OR| TRADE P|
|00002a70| 52 41 43 54 49 43 45 2e | 0a 58 20 2a 20 0a 58 20 |RACTICE.|.X * .X |
|00002a80| 2a 20 53 75 6e 20 52 50 | 43 20 69 73 20 70 72 6f |* Sun RP|C is pro|
|00002a90| 76 69 64 65 64 20 77 69 | 74 68 20 6e 6f 20 73 75 |vided wi|th no su|
|00002aa0| 70 70 6f 72 74 20 61 6e | 64 20 77 69 74 68 6f 75 |pport an|d withou|
|00002ab0| 74 20 61 6e 79 20 6f 62 | 6c 69 67 61 74 69 6f 6e |t any ob|ligation|
|00002ac0| 20 6f 6e 20 74 68 65 0a | 58 20 2a 20 70 61 72 74 | on the.|X * part|
|00002ad0| 20 6f 66 20 53 75 6e 20 | 4d 69 63 72 6f 73 79 73 | of Sun |Microsys|
|00002ae0| 74 65 6d 73 2c 20 49 6e | 63 2e 20 74 6f 20 61 73 |tems, In|c. to as|
|00002af0| 73 69 73 74 20 69 6e 20 | 69 74 73 20 75 73 65 2c |sist in |its use,|
|00002b00| 20 63 6f 72 72 65 63 74 | 69 6f 6e 2c 0a 58 20 2a | correct|ion,.X *|
|00002b10| 20 6d 6f 64 69 66 69 63 | 61 74 69 6f 6e 20 6f 72 | modific|ation or|
|00002b20| 20 65 6e 68 61 6e 63 65 | 6d 65 6e 74 2e 0a 58 20 | enhance|ment..X |
|00002b30| 2a 20 0a 58 20 2a 20 53 | 55 4e 20 4d 49 43 52 4f |* .X * S|UN MICRO|
|00002b40| 53 59 53 54 45 4d 53 2c | 20 49 4e 43 2e 20 53 48 |SYSTEMS,| INC. SH|
|00002b50| 41 4c 4c 20 48 41 56 45 | 20 4e 4f 20 4c 49 41 42 |ALL HAVE| NO LIAB|
|00002b60| 49 4c 49 54 59 20 57 49 | 54 48 20 52 45 53 50 45 |ILITY WI|TH RESPE|
|00002b70| 43 54 20 54 4f 20 54 48 | 45 0a 58 20 2a 20 49 4e |CT TO TH|E.X * IN|
|00002b80| 46 52 49 4e 47 45 4d 45 | 4e 54 20 4f 46 20 43 4f |FRINGEME|NT OF CO|
|00002b90| 50 59 52 49 47 48 54 53 | 2c 20 54 52 41 44 45 20 |PYRIGHTS|, TRADE |
|00002ba0| 53 45 43 52 45 54 53 20 | 4f 52 20 41 4e 59 20 50 |SECRETS |OR ANY P|
|00002bb0| 41 54 45 4e 54 53 20 42 | 59 20 53 55 4e 20 52 50 |ATENTS B|Y SUN RP|
|00002bc0| 43 0a 58 20 2a 20 4f 52 | 20 41 4e 59 20 50 41 52 |C.X * OR| ANY PAR|
|00002bd0| 54 20 54 48 45 52 45 4f | 46 2e 0a 58 20 2a 20 0a |T THEREO|F..X * .|
|00002be0| 58 20 2a 20 49 6e 20 6e | 6f 20 65 76 65 6e 74 20 |X * In n|o event |
|00002bf0| 77 69 6c 6c 20 53 75 6e | 20 4d 69 63 72 6f 73 79 |will Sun| Microsy|
|00002c00| 73 74 65 6d 73 2c 20 49 | 6e 63 2e 20 62 65 20 6c |stems, I|nc. be l|
|00002c10| 69 61 62 6c 65 20 66 6f | 72 20 61 6e 79 20 6c 6f |iable fo|r any lo|
|00002c20| 73 74 20 72 65 76 65 6e | 75 65 0a 58 20 2a 20 6f |st reven|ue.X * o|
|00002c30| 72 20 70 72 6f 66 69 74 | 73 20 6f 72 20 6f 74 68 |r profit|s or oth|
|00002c40| 65 72 20 73 70 65 63 69 | 61 6c 2c 20 69 6e 64 69 |er speci|al, indi|
|00002c50| 72 65 63 74 20 61 6e 64 | 20 63 6f 6e 73 65 71 75 |rect and| consequ|
|00002c60| 65 6e 74 69 61 6c 20 64 | 61 6d 61 67 65 73 2c 20 |ential d|amages, |
|00002c70| 65 76 65 6e 20 69 66 0a | 58 20 2a 20 53 75 6e 20 |even if.|X * Sun |
|00002c80| 68 61 73 20 62 65 65 6e | 20 61 64 76 69 73 65 64 |has been| advised|
|00002c90| 20 6f 66 20 74 68 65 20 | 70 6f 73 73 69 62 69 6c | of the |possibil|
|00002ca0| 69 74 79 20 6f 66 20 73 | 75 63 68 20 64 61 6d 61 |ity of s|uch dama|
|00002cb0| 67 65 73 2e 0a 58 20 2a | 20 0a 58 20 2a 20 53 75 |ges..X *| .X * Su|
|00002cc0| 6e 20 4d 69 63 72 6f 73 | 79 73 74 65 6d 73 2c 20 |n Micros|ystems, |
|00002cd0| 49 6e 63 2e 0a 58 20 2a | 20 32 35 35 30 20 47 61 |Inc..X *| 2550 Ga|
|00002ce0| 72 63 69 61 20 41 76 65 | 6e 75 65 0a 58 20 2a 20 |rcia Ave|nue.X * |
|00002cf0| 4d 6f 75 6e 74 61 69 6e | 20 56 69 65 77 2c 20 43 |Mountain| View, C|
|00002d00| 61 6c 69 66 6f 72 6e 69 | 61 20 20 39 34 30 34 33 |aliforni|a 94043|
|00002d10| 0a 58 20 2a 2f 0a 58 23 | 69 66 6e 64 65 66 20 6c |.X */.X#|ifndef l|
|00002d20| 69 6e 74 0a 58 73 74 61 | 74 69 63 20 63 68 61 72 |int.Xsta|tic char|
|00002d30| 20 73 63 63 73 69 64 5b | 5d 20 3d 20 22 40 28 23 | sccsid[|] = "@(#|
|00002d40| 29 70 6d 61 70 5f 67 65 | 74 70 6f 72 74 2e 63 20 |)pmap_ge|tport.c |
|00002d50| 31 2e 31 20 38 36 2f 30 | 32 2f 30 33 20 43 6f 70 |1.1 86/0|2/03 Cop|
|00002d60| 79 72 20 31 39 38 34 20 | 53 75 6e 20 4d 69 63 72 |yr 1984 |Sun Micr|
|00002d70| 6f 22 3b 0a 58 23 65 6e | 64 69 66 0a 58 0a 58 2f |o";.X#en|dif.X.X/|
|00002d80| 2a 0a 58 20 2a 20 70 6d | 61 70 5f 67 65 74 70 6f |*.X * pm|ap_getpo|
|00002d90| 72 74 2e 63 0a 58 20 2a | 20 43 6c 69 65 6e 74 20 |rt.c.X *| Client |
|00002da0| 69 6e 74 65 72 66 61 63 | 65 20 74 6f 20 70 6d 61 |interfac|e to pma|
|00002db0| 70 20 72 70 63 20 73 65 | 72 76 69 63 65 2e 0a 58 |p rpc se|rvice..X|
|00002dc0| 20 2a 0a 58 20 2a 20 43 | 6f 70 79 72 69 67 68 74 | *.X * C|opyright|
|00002dd0| 20 28 43 29 20 31 39 38 | 34 2c 20 53 75 6e 20 4d | (C) 198|4, Sun M|
|00002de0| 69 63 72 6f 73 79 73 74 | 65 6d 73 2c 20 49 6e 63 |icrosyst|ems, Inc|
|00002df0| 2e 0a 58 20 2a 2f 0a 58 | 0a 58 23 69 6e 63 6c 75 |..X */.X|.X#inclu|
|00002e00| 64 65 20 22 74 79 70 65 | 73 2e 68 22 0a 58 23 69 |de "type|s.h".X#i|
|00002e10| 6e 63 6c 75 64 65 20 3c | 6e 65 74 69 6e 65 74 2f |nclude <|netinet/|
|00002e20| 69 6e 2e 68 3e 0a 58 23 | 69 6e 63 6c 75 64 65 20 |in.h>.X#|include |
|00002e30| 22 78 64 72 2e 68 22 0a | 58 23 69 6e 63 6c 75 64 |"xdr.h".|X#includ|
|00002e40| 65 20 22 61 75 74 68 2e | 68 22 0a 58 23 69 6e 63 |e "auth.|h".X#inc|
|00002e50| 6c 75 64 65 20 22 63 6c | 6e 74 2e 68 22 0a 58 23 |lude "cl|nt.h".X#|
|00002e60| 69 6e 63 6c 75 64 65 20 | 22 72 70 63 5f 6d 73 67 |include |"rpc_msg|
|00002e70| 2e 68 22 0a 58 23 69 6e | 63 6c 75 64 65 20 22 70 |.h".X#in|clude "p|
|00002e80| 6d 61 70 5f 70 72 6f 74 | 2e 68 22 20 0a 58 23 69 |map_prot|.h" .X#i|
|00002e90| 6e 63 6c 75 64 65 20 22 | 70 6d 61 70 5f 63 6c 6e |nclude "|pmap_cln|
|00002ea0| 74 2e 68 22 0a 58 23 69 | 6e 63 6c 75 64 65 20 3c |t.h".X#i|nclude <|
|00002eb0| 73 79 73 2f 73 6f 63 6b | 65 74 2e 68 3e 0a 58 23 |sys/sock|et.h>.X#|
|00002ec0| 69 6e 63 6c 75 64 65 20 | 3c 73 79 73 2f 74 69 6d |include |<sys/tim|
|00002ed0| 65 2e 68 3e 0a 58 23 69 | 6e 63 6c 75 64 65 20 3c |e.h>.X#i|nclude <|
|00002ee0| 73 74 64 69 6f 2e 68 3e | 0a 58 23 69 6e 63 6c 75 |stdio.h>|.X#inclu|
|00002ef0| 64 65 20 3c 6e 65 74 2f | 69 66 2e 68 3e 0a 58 23 |de <net/|if.h>.X#|
|00002f00| 69 6e 63 6c 75 64 65 20 | 3c 73 79 73 2f 69 6f 63 |include |<sys/ioc|
|00002f10| 74 6c 2e 68 3e 0a 58 23 | 69 6e 63 6c 75 64 65 20 |tl.h>.X#|include |
|00002f20| 3c 61 72 70 61 2f 69 6e | 65 74 2e 68 3e 0a 58 23 |<arpa/in|et.h>.X#|
|00002f30| 64 65 66 69 6e 65 20 4e | 41 4d 45 4c 45 4e 20 32 |define N|AMELEN 2|
|00002f40| 35 35 0a 58 0a 58 73 74 | 61 74 69 63 20 73 74 72 |55.X.Xst|atic str|
|00002f50| 75 63 74 20 74 69 6d 65 | 76 61 6c 20 74 69 6d 65 |uct time|val time|
|00002f60| 6f 75 74 20 3d 20 7b 20 | 35 2c 20 30 20 7d 3b 0a |out = { |5, 0 };.|
|00002f70| 58 73 74 61 74 69 63 20 | 73 74 72 75 63 74 20 74 |Xstatic |struct t|
|00002f80| 69 6d 65 76 61 6c 20 74 | 6f 74 74 69 6d 65 6f 75 |imeval t|ottimeou|
|00002f90| 74 20 3d 20 7b 20 36 30 | 2c 20 30 20 7d 3b 0a 58 |t = { 60|, 0 };.X|
|00002fa0| 0a 58 2f 2a 0a 58 20 2a | 20 46 69 6e 64 20 74 68 |.X/*.X *| Find th|
|00002fb0| 65 20 6d 61 70 70 65 64 | 20 70 6f 72 74 20 66 6f |e mapped| port fo|
|00002fc0| 72 20 70 72 6f 67 72 61 | 6d 2c 76 65 72 73 69 6f |r progra|m,versio|
|00002fd0| 6e 2e 0a 58 20 2a 20 43 | 61 6c 6c 73 20 74 68 65 |n..X * C|alls the|
|00002fe0| 20 70 6d 61 70 20 73 65 | 72 76 69 63 65 20 72 65 | pmap se|rvice re|
|00002ff0| 6d 6f 74 65 6c 79 20 74 | 6f 20 64 6f 20 74 68 65 |motely t|o do the|
|00003000| 20 6c 6f 6f 6b 75 70 2e | 0a 58 20 2a 20 52 65 74 | lookup.|.X * Ret|
|00003010| 75 72 6e 73 20 30 20 69 | 66 20 6e 6f 20 6d 61 70 |urns 0 i|f no map|
|00003020| 20 65 78 69 73 74 73 2e | 0a 58 20 2a 2f 0a 58 75 | exists.|.X */.Xu|
|00003030| 5f 73 68 6f 72 74 0a 58 | 70 6d 61 70 5f 67 65 74 |_short.X|pmap_get|
|00003040| 70 6f 72 74 28 61 64 64 | 72 65 73 73 2c 20 70 72 |port(add|ress, pr|
|00003050| 6f 67 72 61 6d 2c 20 76 | 65 72 73 69 6f 6e 2c 20 |ogram, v|ersion, |
|00003060| 70 72 6f 74 6f 63 6f 6c | 29 0a 58 09 73 74 72 75 |protocol|).X.stru|
|00003070| 63 74 20 73 6f 63 6b 61 | 64 64 72 5f 69 6e 20 2a |ct socka|ddr_in *|
|00003080| 61 64 64 72 65 73 73 3b | 0a 58 09 75 5f 6c 6f 6e |address;|.X.u_lon|
|00003090| 67 20 70 72 6f 67 72 61 | 6d 3b 0a 58 09 75 5f 6c |g progra|m;.X.u_l|
|000030a0| 6f 6e 67 20 76 65 72 73 | 69 6f 6e 3b 0a 58 09 75 |ong vers|ion;.X.u|
|000030b0| 5f 6c 6f 6e 67 20 70 72 | 6f 74 6f 63 6f 6c 3b 0a |_long pr|otocol;.|
|000030c0| 58 7b 0a 58 09 75 5f 73 | 68 6f 72 74 20 70 6f 72 |X{.X.u_s|hort por|
|000030d0| 74 20 3d 20 30 3b 0a 58 | 09 69 6e 74 20 73 6f 63 |t = 0;.X|.int soc|
|000030e0| 6b 65 74 20 3d 20 2d 31 | 3b 0a 58 09 72 65 67 69 |ket = -1|;.X.regi|
|000030f0| 73 74 65 72 20 43 4c 49 | 45 4e 54 20 2a 63 6c 69 |ster CLI|ENT *cli|
|00003100| 65 6e 74 3b 0a 58 09 73 | 74 72 75 63 74 20 70 6d |ent;.X.s|truct pm|
|00003110| 61 70 20 70 61 72 6d 73 | 3b 0a 58 0a 58 09 61 64 |ap parms|;.X.X.ad|
|00003120| 64 72 65 73 73 2d 3e 73 | 69 6e 5f 70 6f 72 74 20 |dress->s|in_port |
|00003130| 3d 20 68 74 6f 6e 73 28 | 50 4d 41 50 50 4f 52 54 |= htons(|PMAPPORT|
|00003140| 29 3b 0a 58 09 63 6c 69 | 65 6e 74 20 3d 20 63 6c |);.X.cli|ent = cl|
|00003150| 6e 74 75 64 70 5f 62 75 | 66 63 72 65 61 74 65 28 |ntudp_bu|fcreate(|
|00003160| 61 64 64 72 65 73 73 2c | 20 50 4d 41 50 50 52 4f |address,| PMAPPRO|
|00003170| 47 2c 0a 58 09 20 20 20 | 20 50 4d 41 50 56 45 52 |G,.X. | PMAPVER|
|00003180| 53 2c 20 74 69 6d 65 6f | 75 74 2c 20 26 73 6f 63 |S, timeo|ut, &soc|
|00003190| 6b 65 74 2c 20 52 50 43 | 53 4d 41 4c 4c 4d 53 47 |ket, RPC|SMALLMSG|
|000031a0| 53 49 5a 45 2c 20 52 50 | 43 53 4d 41 4c 4c 4d 53 |SIZE, RP|CSMALLMS|
|000031b0| 47 53 49 5a 45 29 3b 0a | 58 09 69 66 20 28 63 6c |GSIZE);.|X.if (cl|
|000031c0| 69 65 6e 74 20 21 3d 20 | 28 43 4c 49 45 4e 54 20 |ient != |(CLIENT |
|000031d0| 2a 29 4e 55 4c 4c 29 20 | 7b 0a 58 09 09 70 61 72 |*)NULL) |{.X..par|
|000031e0| 6d 73 2e 70 6d 5f 70 72 | 6f 67 20 3d 20 70 72 6f |ms.pm_pr|og = pro|
|000031f0| 67 72 61 6d 3b 0a 58 09 | 09 70 61 72 6d 73 2e 70 |gram;.X.|.parms.p|
|00003200| 6d 5f 76 65 72 73 20 3d | 20 76 65 72 73 69 6f 6e |m_vers =| version|
|00003210| 3b 0a 58 09 09 70 61 72 | 6d 73 2e 70 6d 5f 70 72 |;.X..par|ms.pm_pr|
|00003220| 6f 74 20 3d 20 70 72 6f | 74 6f 63 6f 6c 3b 0a 58 |ot = pro|tocol;.X|
|00003230| 09 09 70 61 72 6d 73 2e | 70 6d 5f 70 6f 72 74 20 |..parms.|pm_port |
|00003240| 3d 20 30 3b 20 20 2f 2a | 20 6e 6f 74 20 6e 65 65 |= 0; /*| not nee|
|00003250| 64 65 64 20 6f 72 20 75 | 73 65 64 20 2a 2f 0a 58 |ded or u|sed */.X|
|00003260| 09 09 69 66 20 28 43 4c | 4e 54 5f 43 41 4c 4c 28 |..if (CL|NT_CALL(|
|00003270| 63 6c 69 65 6e 74 2c 20 | 50 4d 41 50 50 52 4f 43 |client, |PMAPPROC|
|00003280| 5f 47 45 54 50 4f 52 54 | 2c 20 78 64 72 5f 70 6d |_GETPORT|, xdr_pm|
|00003290| 61 70 2c 20 26 70 61 72 | 6d 73 2c 0a 58 09 09 20 |ap, &par|ms,.X.. |
|000032a0| 20 20 20 78 64 72 5f 75 | 5f 73 68 6f 72 74 2c 20 | xdr_u|_short, |
|000032b0| 26 70 6f 72 74 2c 20 74 | 6f 74 74 69 6d 65 6f 75 |&port, t|ottimeou|
|000032c0| 74 29 20 21 3d 20 52 50 | 43 5f 53 55 43 43 45 53 |t) != RP|C_SUCCES|
|000032d0| 53 29 7b 0a 58 09 09 09 | 72 70 63 5f 63 72 65 61 |S){.X...|rpc_crea|
|000032e0| 74 65 65 72 72 2e 63 66 | 5f 73 74 61 74 20 3d 20 |teerr.cf|_stat = |
|000032f0| 52 50 43 5f 50 4d 41 50 | 46 41 49 4c 55 52 45 3b |RPC_PMAP|FAILURE;|
|00003300| 0a 58 09 09 09 63 6c 6e | 74 5f 67 65 74 65 72 72 |.X...cln|t_geterr|
|00003310| 28 63 6c 69 65 6e 74 2c | 20 26 72 70 63 5f 63 72 |(client,| &rpc_cr|
|00003320| 65 61 74 65 65 72 72 2e | 63 66 5f 65 72 72 6f 72 |eateerr.|cf_error|
|00003330| 29 3b 0a 58 09 09 7d 20 | 65 6c 73 65 20 69 66 20 |);.X..} |else if |
|00003340| 28 70 6f 72 74 20 3d 3d | 20 30 29 20 7b 0a 58 09 |(port ==| 0) {.X.|
|00003350| 09 09 72 70 63 5f 63 72 | 65 61 74 65 65 72 72 2e |..rpc_cr|eateerr.|
|00003360| 63 66 5f 73 74 61 74 20 | 3d 20 52 50 43 5f 50 52 |cf_stat |= RPC_PR|
|00003370| 4f 47 4e 4f 54 52 45 47 | 49 53 54 45 52 45 44 3b |OGNOTREG|ISTERED;|
|00003380| 0a 58 09 09 7d 0a 58 09 | 09 43 4c 4e 54 5f 44 45 |.X..}.X.|.CLNT_DE|
|00003390| 53 54 52 4f 59 28 63 6c | 69 65 6e 74 29 3b 0a 58 |STROY(cl|ient);.X|
|000033a0| 09 7d 0a 58 09 28 76 6f | 69 64 29 63 6c 6f 73 65 |.}.X.(vo|id)close|
|000033b0| 28 73 6f 63 6b 65 74 29 | 3b 0a 58 09 61 64 64 72 |(socket)|;.X.addr|
|000033c0| 65 73 73 2d 3e 73 69 6e | 5f 70 6f 72 74 20 3d 20 |ess->sin|_port = |
|000033d0| 30 3b 0a 58 09 72 65 74 | 75 72 6e 20 28 70 6f 72 |0;.X.ret|urn (por|
|000033e0| 74 29 3b 0a 58 7d 0a 53 | 48 41 52 5f 45 4f 46 0a |t);.X}.S|HAR_EOF.|
|000033f0| 69 66 20 74 65 73 74 20 | 32 39 34 36 20 2d 6e 65 |if test |2946 -ne|
|00003400| 20 22 60 77 63 20 2d 63 | 20 3c 20 27 72 70 63 2f | "`wc -c| < 'rpc/|
|00003410| 72 70 63 6c 69 62 2f 70 | 6d 61 70 5f 67 65 74 70 |rpclib/p|map_getp|
|00003420| 6f 72 74 2e 63 27 60 22 | 0a 74 68 65 6e 0a 09 65 |ort.c'`"|.then..e|
|00003430| 63 68 6f 20 73 68 61 72 | 3a 20 22 65 72 72 6f 72 |cho shar|: "error|
|00003440| 20 74 72 61 6e 73 6d 69 | 74 74 69 6e 67 20 27 72 | transmi|tting 'r|
|00003450| 70 63 2f 72 70 63 6c 69 | 62 2f 70 6d 61 70 5f 67 |pc/rpcli|b/pmap_g|
|00003460| 65 74 70 6f 72 74 2e 63 | 27 22 20 27 28 73 68 6f |etport.c|'" '(sho|
|00003470| 75 6c 64 20 68 61 76 65 | 20 62 65 65 6e 20 32 39 |uld have| been 29|
|00003480| 34 36 20 63 68 61 72 61 | 63 74 65 72 73 29 27 0a |46 chara|cters)'.|
|00003490| 66 69 0a 63 68 6d 6f 64 | 20 34 34 34 20 27 72 70 |fi.chmod| 444 'rp|
|000034a0| 63 2f 72 70 63 6c 69 62 | 2f 70 6d 61 70 5f 67 65 |c/rpclib|/pmap_ge|
|000034b0| 74 70 6f 72 74 2e 63 27 | 0a 66 69 0a 65 63 68 6f |tport.c'|.fi.echo|
|000034c0| 20 73 68 61 72 3a 20 22 | 65 78 74 72 61 63 74 69 | shar: "|extracti|
|000034d0| 6e 67 20 27 72 70 63 2f | 72 70 63 6c 69 62 2f 70 |ng 'rpc/|rpclib/p|
|000034e0| 6d 61 70 5f 70 72 6f 74 | 2e 63 27 22 20 27 28 34 |map_prot|.c'" '(4|
|000034f0| 30 30 33 20 63 68 61 72 | 61 63 74 65 72 73 29 27 |003 char|acters)'|
|00003500| 0a 69 66 20 74 65 73 74 | 20 2d 66 20 27 72 70 63 |.if test| -f 'rpc|
|00003510| 2f 72 70 63 6c 69 62 2f | 70 6d 61 70 5f 70 72 6f |/rpclib/|pmap_pro|
|00003520| 74 2e 63 27 0a 74 68 65 | 6e 0a 09 65 63 68 6f 20 |t.c'.the|n..echo |
|00003530| 73 68 61 72 3a 20 22 77 | 69 6c 6c 20 6e 6f 74 20 |shar: "w|ill not |
|00003540| 6f 76 65 72 2d 77 72 69 | 74 65 20 65 78 69 73 74 |over-wri|te exist|
|00003550| 69 6e 67 20 66 69 6c 65 | 20 27 72 70 63 2f 72 70 |ing file| 'rpc/rp|
|00003560| 63 6c 69 62 2f 70 6d 61 | 70 5f 70 72 6f 74 2e 63 |clib/pma|p_prot.c|
|00003570| 27 22 0a 65 6c 73 65 0a | 73 65 64 20 27 73 2f 5e |'".else.|sed 's/^|
|00003580| 58 2f 2f 27 20 3c 3c 20 | 5c 53 48 41 52 5f 45 4f |X//' << |\SHAR_EO|
|00003590| 46 20 3e 20 27 72 70 63 | 2f 72 70 63 6c 69 62 2f |F > 'rpc|/rpclib/|
|000035a0| 70 6d 61 70 5f 70 72 6f | 74 2e 63 27 0a 58 2f 2a |pmap_pro|t.c'.X/*|
|000035b0| 0a 58 20 2a 20 53 75 6e | 20 52 50 43 20 69 73 20 |.X * Sun| RPC is |
|000035c0| 61 20 70 72 6f 64 75 63 | 74 20 6f 66 20 53 75 6e |a produc|t of Sun|
|000035d0| 20 4d 69 63 72 6f 73 79 | 73 74 65 6d 73 2c 20 49 | Microsy|stems, I|
|000035e0| 6e 63 2e 20 61 6e 64 20 | 69 73 20 70 72 6f 76 69 |nc. and |is provi|
|000035f0| 64 65 64 20 66 6f 72 0a | 58 20 2a 20 75 6e 72 65 |ded for.|X * unre|
|00003600| 73 74 72 69 63 74 65 64 | 20 75 73 65 20 70 72 6f |stricted| use pro|
|00003610| 76 69 64 65 64 20 74 68 | 61 74 20 74 68 69 73 20 |vided th|at this |
|00003620| 6c 65 67 65 6e 64 20 69 | 73 20 69 6e 63 6c 75 64 |legend i|s includ|
|00003630| 65 64 20 6f 6e 20 61 6c | 6c 20 74 61 70 65 0a 58 |ed on al|l tape.X|
|00003640| 20 2a 20 6d 65 64 69 61 | 20 61 6e 64 20 61 73 20 | * media| and as |
|00003650| 61 20 70 61 72 74 20 6f | 66 20 74 68 65 20 73 6f |a part o|f the so|
|00003660| 66 74 77 61 72 65 20 70 | 72 6f 67 72 61 6d 20 69 |ftware p|rogram i|
|00003670| 6e 20 77 68 6f 6c 65 20 | 6f 72 20 70 61 72 74 2e |n whole |or part.|
|00003680| 20 20 55 73 65 72 73 0a | 58 20 2a 20 6d 61 79 20 | Users.|X * may |
|00003690| 63 6f 70 79 20 6f 72 20 | 6d 6f 64 69 66 79 20 53 |copy or |modify S|
|000036a0| 75 6e 20 52 50 43 20 77 | 69 74 68 6f 75 74 20 63 |un RPC w|ithout c|
|000036b0| 68 61 72 67 65 2c 20 62 | 75 74 20 61 72 65 20 6e |harge, b|ut are n|
|000036c0| 6f 74 20 61 75 74 68 6f | 72 69 7a 65 64 0a 58 20 |ot autho|rized.X |
|000036d0| 2a 20 74 6f 20 6c 69 63 | 65 6e 73 65 20 6f 72 20 |* to lic|ense or |
|000036e0| 64 69 73 74 72 69 62 75 | 74 65 20 69 74 20 74 6f |distribu|te it to|
|000036f0| 20 61 6e 79 6f 6e 65 20 | 65 6c 73 65 20 65 78 63 | anyone |else exc|
|00003700| 65 70 74 20 61 73 20 70 | 61 72 74 20 6f 66 20 61 |ept as p|art of a|
|00003710| 20 70 72 6f 64 75 63 74 | 20 6f 72 0a 58 20 2a 20 | product| or.X * |
|00003720| 70 72 6f 67 72 61 6d 20 | 64 65 76 65 6c 6f 70 65 |program |develope|
|00003730| 64 20 62 79 20 74 68 65 | 20 75 73 65 72 2e 0a 58 |d by the| user..X|
|00003740| 20 2a 20 0a 58 20 2a 20 | 53 55 4e 20 52 50 43 20 | * .X * |SUN RPC |
|00003750| 49 53 20 50 52 4f 56 49 | 44 45 44 20 41 53 20 49 |IS PROVI|DED AS I|
|00003760| 53 20 57 49 54 48 20 4e | 4f 20 57 41 52 52 41 4e |S WITH N|O WARRAN|
|00003770| 54 49 45 53 20 4f 46 20 | 41 4e 59 20 4b 49 4e 44 |TIES OF |ANY KIND|
|00003780| 20 49 4e 43 4c 55 44 49 | 4e 47 20 54 48 45 0a 58 | INCLUDI|NG THE.X|
|00003790| 20 2a 20 57 41 52 52 41 | 4e 54 49 45 53 20 4f 46 | * WARRA|NTIES OF|
|000037a0| 20 44 45 53 49 47 4e 2c | 20 4d 45 52 43 48 41 4e | DESIGN,| MERCHAN|
|000037b0| 54 49 42 49 4c 49 54 59 | 20 41 4e 44 20 46 49 54 |TIBILITY| AND FIT|
|000037c0| 4e 45 53 53 20 46 4f 52 | 20 41 20 50 41 52 54 49 |NESS FOR| A PARTI|
|000037d0| 43 55 4c 41 52 0a 58 20 | 2a 20 50 55 52 50 4f 53 |CULAR.X |* PURPOS|
|000037e0| 45 2c 20 4f 52 20 41 52 | 49 53 49 4e 47 20 46 52 |E, OR AR|ISING FR|
|000037f0| 4f 4d 20 41 20 43 4f 55 | 52 53 45 20 4f 46 20 44 |OM A COU|RSE OF D|
|00003800| 45 41 4c 49 4e 47 2c 20 | 55 53 41 47 45 20 4f 52 |EALING, |USAGE OR|
|00003810| 20 54 52 41 44 45 20 50 | 52 41 43 54 49 43 45 2e | TRADE P|RACTICE.|
|00003820| 0a 58 20 2a 20 0a 58 20 | 2a 20 53 75 6e 20 52 50 |.X * .X |* Sun RP|
|00003830| 43 20 69 73 20 70 72 6f | 76 69 64 65 64 20 77 69 |C is pro|vided wi|
|00003840| 74 68 20 6e 6f 20 73 75 | 70 70 6f 72 74 20 61 6e |th no su|pport an|
|00003850| 64 20 77 69 74 68 6f 75 | 74 20 61 6e 79 20 6f 62 |d withou|t any ob|
|00003860| 6c 69 67 61 74 69 6f 6e | 20 6f 6e 20 74 68 65 0a |ligation| on the.|
|00003870| 58 20 2a 20 70 61 72 74 | 20 6f 66 20 53 75 6e 20 |X * part| of Sun |
|00003880| 4d 69 63 72 6f 73 79 73 | 74 65 6d 73 2c 20 49 6e |Microsys|tems, In|
|00003890| 63 2e 20 74 6f 20 61 73 | 73 69 73 74 20 69 6e 20 |c. to as|sist in |
|000038a0| 69 74 73 20 75 73 65 2c | 20 63 6f 72 72 65 63 74 |its use,| correct|
|000038b0| 69 6f 6e 2c 0a 58 20 2a | 20 6d 6f 64 69 66 69 63 |ion,.X *| modific|
|000038c0| 61 74 69 6f 6e 20 6f 72 | 20 65 6e 68 61 6e 63 65 |ation or| enhance|
|000038d0| 6d 65 6e 74 2e 0a 58 20 | 2a 20 0a 58 20 2a 20 53 |ment..X |* .X * S|
|000038e0| 55 4e 20 4d 49 43 52 4f | 53 59 53 54 45 4d 53 2c |UN MICRO|SYSTEMS,|
|000038f0| 20 49 4e 43 2e 20 53 48 | 41 4c 4c 20 48 41 56 45 | INC. SH|ALL HAVE|
|00003900| 20 4e 4f 20 4c 49 41 42 | 49 4c 49 54 59 20 57 49 | NO LIAB|ILITY WI|
|00003910| 54 48 20 52 45 53 50 45 | 43 54 20 54 4f 20 54 48 |TH RESPE|CT TO TH|
|00003920| 45 0a 58 20 2a 20 49 4e | 46 52 49 4e 47 45 4d 45 |E.X * IN|FRINGEME|
|00003930| 4e 54 20 4f 46 20 43 4f | 50 59 52 49 47 48 54 53 |NT OF CO|PYRIGHTS|
|00003940| 2c 20 54 52 41 44 45 20 | 53 45 43 52 45 54 53 20 |, TRADE |SECRETS |
|00003950| 4f 52 20 41 4e 59 20 50 | 41 54 45 4e 54 53 20 42 |OR ANY P|ATENTS B|
|00003960| 59 20 53 55 4e 20 52 50 | 43 0a 58 20 2a 20 4f 52 |Y SUN RP|C.X * OR|
|00003970| 20 41 4e 59 20 50 41 52 | 54 20 54 48 45 52 45 4f | ANY PAR|T THEREO|
|00003980| 46 2e 0a 58 20 2a 20 0a | 58 20 2a 20 49 6e 20 6e |F..X * .|X * In n|
|00003990| 6f 20 65 76 65 6e 74 20 | 77 69 6c 6c 20 53 75 6e |o event |will Sun|
|000039a0| 20 4d 69 63 72 6f 73 79 | 73 74 65 6d 73 2c 20 49 | Microsy|stems, I|
|000039b0| 6e 63 2e 20 62 65 20 6c | 69 61 62 6c 65 20 66 6f |nc. be l|iable fo|
|000039c0| 72 20 61 6e 79 20 6c 6f | 73 74 20 72 65 76 65 6e |r any lo|st reven|
|000039d0| 75 65 0a 58 20 2a 20 6f | 72 20 70 72 6f 66 69 74 |ue.X * o|r profit|
|000039e0| 73 20 6f 72 20 6f 74 68 | 65 72 20 73 70 65 63 69 |s or oth|er speci|
|000039f0| 61 6c 2c 20 69 6e 64 69 | 72 65 63 74 20 61 6e 64 |al, indi|rect and|
|00003a00| 20 63 6f 6e 73 65 71 75 | 65 6e 74 69 61 6c 20 64 | consequ|ential d|
|00003a10| 61 6d 61 67 65 73 2c 20 | 65 76 65 6e 20 69 66 0a |amages, |even if.|
|00003a20| 58 20 2a 20 53 75 6e 20 | 68 61 73 20 62 65 65 6e |X * Sun |has been|
|00003a30| 20 61 64 76 69 73 65 64 | 20 6f 66 20 74 68 65 20 | advised| of the |
|00003a40| 70 6f 73 73 69 62 69 6c | 69 74 79 20 6f 66 20 73 |possibil|ity of s|
|00003a50| 75 63 68 20 64 61 6d 61 | 67 65 73 2e 0a 58 20 2a |uch dama|ges..X *|
|00003a60| 20 0a 58 20 2a 20 53 75 | 6e 20 4d 69 63 72 6f 73 | .X * Su|n Micros|
|00003a70| 79 73 74 65 6d 73 2c 20 | 49 6e 63 2e 0a 58 20 2a |ystems, |Inc..X *|
|00003a80| 20 32 35 35 30 20 47 61 | 72 63 69 61 20 41 76 65 | 2550 Ga|rcia Ave|
|00003a90| 6e 75 65 0a 58 20 2a 20 | 4d 6f 75 6e 74 61 69 6e |nue.X * |Mountain|
|00003aa0| 20 56 69 65 77 2c 20 43 | 61 6c 69 66 6f 72 6e 69 | View, C|aliforni|
|00003ab0| 61 20 20 39 34 30 34 33 | 0a 58 20 2a 2f 0a 58 23 |a 94043|.X */.X#|
|00003ac0| 69 66 6e 64 65 66 20 6c | 69 6e 74 0a 58 73 74 61 |ifndef l|int.Xsta|
|00003ad0| 74 69 63 20 63 68 61 72 | 20 73 63 63 73 69 64 5b |tic char| sccsid[|
|00003ae0| 5d 20 3d 20 22 40 28 23 | 29 70 6d 61 70 5f 70 72 |] = "@(#|)pmap_pr|
|00003af0| 6f 74 2e 63 20 31 2e 31 | 20 38 36 2f 30 32 2f 30 |ot.c 1.1| 86/02/0|
|00003b00| 33 20 43 6f 70 79 72 20 | 31 39 38 34 20 53 75 6e |3 Copyr |1984 Sun|
|00003b10| 20 4d 69 63 72 6f 22 3b | 0a 58 23 65 6e 64 69 66 | Micro";|.X#endif|
|00003b20| 0a 58 0a 58 2f 2a 0a 58 | 20 2a 20 70 6d 61 70 5f |.X.X/*.X| * pmap_|
|00003b30| 70 72 6f 74 2e 63 0a 58 | 20 2a 20 50 72 6f 74 6f |prot.c.X| * Proto|
|00003b40| 63 6f 6c 20 66 6f 72 20 | 74 68 65 20 6c 6f 63 61 |col for |the loca|
|00003b50| 6c 20 62 69 6e 64 65 72 | 20 73 65 72 76 69 63 65 |l binder| service|
|00003b60| 2c 20 6f 72 20 70 6d 61 | 70 2e 0a 58 20 2a 0a 58 |, or pma|p..X *.X|
|00003b70| 20 2a 20 43 6f 70 79 72 | 69 67 68 74 20 28 43 29 | * Copyr|ight (C)|
|00003b80| 20 31 39 38 34 2c 20 53 | 75 6e 20 4d 69 63 72 6f | 1984, S|un Micro|
|00003b90| 73 79 73 74 65 6d 73 2c | 20 49 6e 63 2e 0a 58 20 |systems,| Inc..X |
|00003ba0| 2a 2f 0a 58 0a 58 23 69 | 6e 63 6c 75 64 65 20 22 |*/.X.X#i|nclude "|
|00003bb0| 74 79 70 65 73 2e 68 22 | 0a 58 23 69 6e 63 6c 75 |types.h"|.X#inclu|
|00003bc0| 64 65 20 22 78 64 72 2e | 68 22 0a 58 23 69 6e 63 |de "xdr.|h".X#inc|
|00003bd0| 6c 75 64 65 20 22 70 6d | 61 70 5f 70 72 6f 74 2e |lude "pm|ap_prot.|
|00003be0| 68 22 0a 58 0a 58 23 64 | 65 66 69 6e 65 20 4e 55 |h".X.X#d|efine NU|
|00003bf0| 4c 4c 20 28 28 73 74 72 | 75 63 74 20 70 6d 61 70 |LL ((str|uct pmap|
|00003c00| 6c 69 73 74 20 2a 29 30 | 29 0a 58 0a 58 62 6f 6f |list *)0|).X.Xboo|
|00003c10| 6c 5f 74 0a 58 78 64 72 | 5f 70 6d 61 70 28 78 64 |l_t.Xxdr|_pmap(xd|
|00003c20| 72 73 2c 20 72 65 67 73 | 29 0a 58 09 58 44 52 20 |rs, regs|).X.XDR |
|00003c30| 2a 78 64 72 73 3b 0a 58 | 09 73 74 72 75 63 74 20 |*xdrs;.X|.struct |
|00003c40| 70 6d 61 70 20 2a 72 65 | 67 73 3b 0a 58 7b 0a 58 |pmap *re|gs;.X{.X|
|00003c50| 0a 58 09 69 66 20 28 78 | 64 72 5f 75 5f 6c 6f 6e |.X.if (x|dr_u_lon|
|00003c60| 67 28 78 64 72 73 2c 20 | 26 72 65 67 73 2d 3e 70 |g(xdrs, |®s->p|
|00003c70| 6d 5f 70 72 6f 67 29 20 | 26 26 20 0a 58 09 09 78 |m_prog) |&& .X..x|
|00003c80| 64 72 5f 75 5f 6c 6f 6e | 67 28 78 64 72 73 2c 20 |dr_u_lon|g(xdrs, |
|00003c90| 26 72 65 67 73 2d 3e 70 | 6d 5f 76 65 72 73 29 20 |®s->p|m_vers) |
|00003ca0| 26 26 20 0a 58 09 09 78 | 64 72 5f 75 5f 6c 6f 6e |&& .X..x|dr_u_lon|
|00003cb0| 67 28 78 64 72 73 2c 20 | 26 72 65 67 73 2d 3e 70 |g(xdrs, |®s->p|
|00003cc0| 6d 5f 70 72 6f 74 29 29 | 0a 58 09 09 72 65 74 75 |m_prot))|.X..retu|
|00003cd0| 72 6e 20 28 78 64 72 5f | 75 5f 6c 6f 6e 67 28 78 |rn (xdr_|u_long(x|
|00003ce0| 64 72 73 2c 20 26 72 65 | 67 73 2d 3e 70 6d 5f 70 |drs, &re|gs->pm_p|
|00003cf0| 6f 72 74 29 29 3b 0a 58 | 09 72 65 74 75 72 6e 20 |ort));.X|.return |
|00003d00| 28 46 41 4c 53 45 29 3b | 0a 58 7d 0a 58 0a 58 2f |(FALSE);|.X}.X.X/|
|00003d10| 2a 20 0a 58 20 2a 20 57 | 68 61 74 20 69 73 20 67 |* .X * W|hat is g|
|00003d20| 6f 69 6e 67 20 6f 6e 20 | 77 69 74 68 20 6c 69 6e |oing on |with lin|
|00003d30| 6b 65 64 20 6c 69 73 74 | 73 3f 20 28 21 29 0a 58 |ked list|s? (!).X|
|00003d40| 20 2a 20 46 69 72 73 74 | 20 72 65 63 61 6c 6c 20 | * First| recall |
|00003d50| 74 68 65 20 6c 69 6e 6b | 20 6c 69 73 74 20 64 65 |the link| list de|
|00003d60| 63 6c 61 72 61 74 69 6f | 6e 20 66 72 6f 6d 20 70 |claratio|n from p|
|00003d70| 6d 61 70 5f 70 72 6f 74 | 2e 68 3a 0a 58 20 2a 0a |map_prot|.h:.X *.|
|00003d80| 58 20 2a 20 73 74 72 75 | 63 74 20 70 6d 61 70 6c |X * stru|ct pmapl|
|00003d90| 69 73 74 20 7b 0a 58 20 | 2a 09 73 74 72 75 63 74 |ist {.X |*.struct|
|00003da0| 20 70 6d 61 70 20 70 6d | 6c 5f 6d 61 70 3b 0a 58 | pmap pm|l_map;.X|
|00003db0| 20 2a 09 73 74 72 75 63 | 74 20 70 6d 61 70 6c 69 | *.struc|t pmapli|
|00003dc0| 73 74 20 2a 70 6d 6c 5f | 6d 61 70 3b 0a 58 20 2a |st *pml_|map;.X *|
|00003dd0| 20 7d 3b 0a 58 20 2a 0a | 58 20 2a 20 43 6f 6d 70 | };.X *.|X * Comp|
|00003de0| 61 72 65 20 74 68 61 74 | 20 64 65 63 6c 61 72 61 |are that| declara|
|00003df0| 74 69 6f 6e 20 77 69 74 | 68 20 61 20 63 6f 72 72 |tion wit|h a corr|
|00003e00| 65 73 70 6f 6e 64 69 6e | 67 20 78 64 72 20 64 65 |espondin|g xdr de|
|00003e10| 63 6c 61 72 61 74 69 6f | 6e 20 74 68 61 74 20 0a |claratio|n that .|
|00003e20| 58 20 2a 20 69 73 20 28 | 61 29 20 70 6f 69 6e 74 |X * is (|a) point|
|00003e30| 65 72 2d 6c 65 73 73 2c | 20 61 6e 64 20 28 62 29 |er-less,| and (b)|
|00003e40| 20 72 65 63 75 72 73 69 | 76 65 3a 0a 58 20 2a 0a | recursi|ve:.X *.|
|00003e50| 58 20 2a 20 74 79 70 65 | 64 65 66 20 75 6e 69 6f |X * type|def unio|
|00003e60| 6e 20 73 77 69 74 63 68 | 20 28 62 6f 6f 6c 5f 74 |n switch| (bool_t|
|00003e70| 29 20 7b 0a 58 20 2a 20 | 0a 58 20 2a 09 63 61 73 |) {.X * |.X *.cas|
|00003e80| 65 20 54 52 55 45 3a 20 | 73 74 72 75 63 74 20 7b |e TRUE: |struct {|
|00003e90| 0a 58 20 2a 09 09 73 74 | 72 75 63 74 20 70 6d 61 |.X *..st|ruct pma|
|00003ea0| 70 3b 0a 58 20 2a 20 09 | 09 70 6d 61 70 6c 69 73 |p;.X * .|.pmaplis|
|00003eb0| 74 5f 74 20 66 6f 6f 3b | 0a 58 20 2a 09 7d 3b 0a |t_t foo;|.X *.};.|
|00003ec0| 58 20 2a 0a 58 20 2a 09 | 63 61 73 65 20 46 41 4c |X *.X *.|case FAL|
|00003ed0| 53 45 3a 20 73 74 72 75 | 63 74 20 7b 7d 3b 0a 58 |SE: stru|ct {};.X|
|00003ee0| 20 2a 20 7d 20 70 6d 61 | 70 6c 69 73 74 5f 74 3b | * } pma|plist_t;|
|00003ef0| 0a 58 20 2a 0a 58 20 2a | 20 4e 6f 74 69 63 65 20 |.X *.X *| Notice |
|00003f00| 74 68 61 74 20 74 68 65 | 20 78 64 72 20 64 65 63 |that the| xdr dec|
|00003f10| 6c 61 72 61 74 69 6f 6e | 20 68 61 73 20 6e 6f 20 |laration| has no |
|00003f20| 6e 78 74 20 70 6f 69 6e | 74 65 72 20 77 68 69 6c |nxt poin|ter whil|
|00003f30| 65 0a 58 20 2a 20 74 68 | 65 20 43 20 64 65 63 6c |e.X * th|e C decl|
|00003f40| 61 72 61 74 69 6f 6e 20 | 68 61 73 20 6e 6f 20 62 |aration |has no b|
|00003f50| 6f 6f 6c 5f 74 20 76 61 | 72 69 61 62 6c 65 2e 20 |ool_t va|riable. |
|00003f60| 20 54 68 65 20 62 6f 6f | 6c 5f 74 20 63 61 6e 20 | The boo|l_t can |
|00003f70| 62 65 0a 58 20 2a 20 69 | 6e 74 65 72 70 72 65 74 |be.X * i|nterpret|
|00003f80| 65 64 20 61 73 20 60 60 | 6d 6f 72 65 20 64 61 74 |ed as ``|more dat|
|00003f90| 61 20 66 6f 6c 6c 6f 77 | 73 20 6d 65 27 27 3b 20 |a follow|s me''; |
|00003fa0| 69 66 20 46 41 4c 53 45 | 20 74 68 65 6e 20 6e 6f |if FALSE| then no|
|00003fb0| 74 68 69 6e 67 0a 58 20 | 2a 20 66 6f 6c 6c 6f 77 |thing.X |* follow|
|00003fc0| 73 20 74 68 69 73 20 62 | 6f 6f 6c 5f 74 3b 20 69 |s this b|ool_t; i|
|00003fd0| 66 20 54 52 55 45 20 74 | 68 65 6e 20 74 68 65 20 |f TRUE t|hen the |
|00003fe0| 62 6f 6f 6c 5f 74 20 69 | 73 20 66 6f 6c 6c 6f 77 |bool_t i|s follow|
|00003ff0| 65 64 20 62 79 0a 58 20 | 2a 20 61 6e 20 61 63 74 |ed by.X |* an act|
|00004000| 75 61 6c 20 73 74 72 75 | 63 74 20 70 6d 61 70 2c |ual stru|ct pmap,|
|00004010| 20 61 6e 64 20 74 68 65 | 6e 20 28 72 65 63 75 72 | and the|n (recur|
|00004020| 73 69 76 65 6c 79 29 20 | 62 79 20 74 68 65 20 0a |sively) |by the .|
|00004030| 58 20 2a 20 78 64 72 20 | 75 6e 69 6f 6e 2c 20 70 |X * xdr |union, p|
|00004040| 61 6d 70 6c 69 73 74 5f | 74 2e 20 20 0a 58 20 2a |amplist_|t. .X *|
|00004050| 0a 58 20 2a 20 54 68 69 | 73 20 63 6f 75 6c 64 20 |.X * Thi|s could |
|00004060| 62 65 20 69 6d 70 6c 65 | 6d 65 6e 74 65 64 20 76 |be imple|mented v|
|00004070| 69 61 20 74 68 65 20 78 | 64 72 5f 75 6e 69 6f 6e |ia the x|dr_union|
|00004080| 20 70 72 69 6d 69 74 69 | 76 65 2c 20 74 68 6f 75 | primiti|ve, thou|
|00004090| 67 68 20 74 68 69 73 0a | 58 20 2a 20 77 6f 75 6c |gh this.|X * woul|
|000040a0| 64 20 63 61 75 73 65 20 | 61 20 6f 6e 65 20 72 65 |d cause |a one re|
|000040b0| 63 75 72 73 69 76 65 20 | 63 61 6c 6c 20 70 65 72 |cursive |call per|
|000040c0| 20 65 6c 65 6d 65 6e 74 | 20 69 6e 20 74 68 65 20 | element| in the |
|000040d0| 6c 69 73 74 2e 20 20 52 | 61 74 68 65 72 20 74 68 |list. R|ather th|
|000040e0| 61 6e 20 64 6f 0a 58 20 | 2a 20 74 68 61 74 20 77 |an do.X |* that w|
|000040f0| 65 20 63 61 6e 20 60 60 | 75 6e 77 69 6e 64 27 27 |e can ``|unwind''|
|00004100| 20 74 68 65 20 72 65 63 | 75 72 73 69 6f 6e 0a 58 | the rec|ursion.X|
|00004110| 20 2a 20 69 6e 74 6f 20 | 61 20 77 68 69 6c 65 20 | * into |a while |
|00004120| 6c 6f 6f 70 20 61 6e 64 | 20 64 6f 20 74 68 65 20 |loop and| do the |
|00004130| 75 6e 69 6f 6e 20 61 72 | 6d 73 20 69 6e 2d 70 6c |union ar|ms in-pl|
|00004140| 61 63 65 2e 0a 58 20 2a | 0a 58 20 2a 20 54 68 65 |ace..X *|.X * The|
|00004150| 20 68 65 61 64 20 6f 66 | 20 74 68 65 20 6c 69 73 | head of| the lis|
|00004160| 74 20 69 73 20 77 68 61 | 74 20 74 68 65 20 43 20 |t is wha|t the C |
|00004170| 70 72 6f 67 72 61 6d 6d | 65 72 20 77 69 73 68 65 |programm|er wishe|
|00004180| 73 20 74 6f 20 70 61 73 | 74 20 61 72 6f 75 6e 64 |s to pas|t around|
|00004190| 0a 58 20 2a 20 74 68 65 | 20 6e 65 74 2c 20 79 65 |.X * the| net, ye|
|000041a0| 74 20 69 73 20 74 68 65 | 20 64 61 74 61 20 74 68 |t is the| data th|
|000041b0| 61 74 20 74 68 65 20 70 | 6f 69 6e 74 65 72 20 70 |at the p|ointer p|
|000041c0| 6f 69 6e 74 73 20 74 6f | 20 77 68 69 63 68 20 69 |oints to| which i|
|000041d0| 73 20 69 6e 74 65 72 65 | 73 74 69 6e 67 3b 0a 58 |s intere|sting;.X|
|000041e0| 20 2a 20 74 68 69 73 20 | 73 6f 75 6e 64 73 20 6c | * this |sounds l|
|000041f0| 69 6b 65 20 61 20 6a 6f | 62 20 66 6f 72 20 78 64 |ike a jo|b for xd|
|00004200| 72 5f 72 65 66 65 72 65 | 6e 63 65 21 0a 58 20 2a |r_refere|nce!.X *|
|00004210| 2f 0a 58 62 6f 6f 6c 5f | 74 0a 58 78 64 72 5f 70 |/.Xbool_|t.Xxdr_p|
|00004220| 6d 61 70 6c 69 73 74 28 | 78 64 72 73 2c 20 72 70 |maplist(|xdrs, rp|
|00004230| 29 0a 58 09 72 65 67 69 | 73 74 65 72 20 58 44 52 |).X.regi|ster XDR|
|00004240| 20 2a 78 64 72 73 3b 0a | 58 09 72 65 67 69 73 74 | *xdrs;.|X.regist|
|00004250| 65 72 20 73 74 72 75 63 | 74 20 70 6d 61 70 6c 69 |er struc|t pmapli|
|00004260| 73 74 20 2a 2a 72 70 3b | 0a 58 7b 0a 58 09 2f 2a |st **rp;|.X{.X./*|
|00004270| 0a 58 09 20 2a 20 6d 6f | 72 65 5f 65 6c 65 6d 65 |.X. * mo|re_eleme|
|00004280| 6e 74 73 20 69 73 20 70 | 72 65 2d 63 6f 6d 70 75 |nts is p|re-compu|
|00004290| 74 65 64 20 69 6e 20 63 | 61 73 65 20 74 68 65 20 |ted in c|ase the |
|000042a0| 64 69 72 65 63 74 69 6f | 6e 20 69 73 0a 58 09 20 |directio|n is.X. |
|000042b0| 2a 20 58 44 52 5f 45 4e | 43 4f 44 45 20 6f 72 20 |* XDR_EN|CODE or |
|000042c0| 58 44 52 5f 46 52 45 45 | 2e 20 20 6d 6f 72 65 5f |XDR_FREE|. more_|
|000042d0| 65 6c 65 6d 65 6e 74 73 | 20 69 73 20 6f 76 65 72 |elements| is over|
|000042e0| 77 72 69 74 74 65 6e 20 | 62 79 0a 58 09 20 2a 20 |written |by.X. * |
|000042f0| 78 64 72 5f 62 6f 6f 6c | 20 77 68 65 6e 20 74 68 |xdr_bool| when th|
|00004300| 65 20 64 69 72 65 63 74 | 69 6f 6e 20 69 73 20 58 |e direct|ion is X|
|00004310| 44 52 5f 44 45 43 4f 44 | 45 2e 0a 58 09 20 2a 2f |DR_DECOD|E..X. */|
|00004320| 0a 58 09 62 6f 6f 6c 5f | 74 20 6d 6f 72 65 5f 65 |.X.bool_|t more_e|
|00004330| 6c 65 6d 65 6e 74 73 3b | 0a 58 09 72 65 67 69 73 |lements;|.X.regis|
|00004340| 74 65 72 20 69 6e 74 20 | 66 72 65 65 69 6e 67 20 |ter int |freeing |
|00004350| 3d 20 28 78 64 72 73 2d | 3e 78 5f 6f 70 20 3d 3d |= (xdrs-|>x_op ==|
|00004360| 20 58 44 52 5f 46 52 45 | 45 29 3b 0a 58 09 72 65 | XDR_FRE|E);.X.re|
|00004370| 67 69 73 74 65 72 20 73 | 74 72 75 63 74 20 70 6d |gister s|truct pm|
|00004380| 61 70 6c 69 73 74 20 2a | 2a 6e 65 78 74 3b 0a 58 |aplist *|*next;.X|
|00004390| 0a 58 09 77 68 69 6c 65 | 20 28 54 52 55 45 29 20 |.X.while| (TRUE) |
|000043a0| 7b 0a 58 09 09 6d 6f 72 | 65 5f 65 6c 65 6d 65 6e |{.X..mor|e_elemen|
|000043b0| 74 73 20 3d 20 28 62 6f | 6f 6c 5f 74 29 28 2a 72 |ts = (bo|ol_t)(*r|
|000043c0| 70 20 21 3d 20 4e 55 4c | 4c 29 3b 0a 58 09 09 69 |p != NUL|L);.X..i|
|000043d0| 66 20 28 21 20 78 64 72 | 5f 62 6f 6f 6c 28 78 64 |f (! xdr|_bool(xd|
|000043e0| 72 73 2c 20 26 6d 6f 72 | 65 5f 65 6c 65 6d 65 6e |rs, &mor|e_elemen|
|000043f0| 74 73 29 29 0a 58 09 09 | 09 72 65 74 75 72 6e 20 |ts)).X..|.return |
|00004400| 28 46 41 4c 53 45 29 3b | 0a 58 09 09 69 66 20 28 |(FALSE);|.X..if (|
|00004410| 21 20 6d 6f 72 65 5f 65 | 6c 65 6d 65 6e 74 73 29 |! more_e|lements)|
|00004420| 0a 58 09 09 09 72 65 74 | 75 72 6e 20 28 54 52 55 |.X...ret|urn (TRU|
|00004430| 45 29 3b 20 20 2f 2a 20 | 77 65 20 61 72 65 20 64 |E); /* |we are d|
|00004440| 6f 6e 65 20 2a 2f 0a 58 | 09 09 2f 2a 0a 58 09 09 |one */.X|../*.X..|
|00004450| 20 2a 20 74 68 65 20 75 | 6e 66 6f 72 74 75 6e 61 | * the u|nfortuna|
|00004460| 74 65 20 73 69 64 65 20 | 65 66 66 65 63 74 20 6f |te side |effect o|
|00004470| 66 20 6e 6f 6e 2d 72 65 | 63 75 72 73 69 6f 6e 20 |f non-re|cursion |
|00004480| 69 73 20 74 68 61 74 20 | 69 6e 0a 58 09 09 20 2a |is that |in.X.. *|
|00004490| 20 74 68 65 20 63 61 73 | 65 20 6f 66 20 66 72 65 | the cas|e of fre|
|000044a0| 65 69 6e 67 20 77 65 20 | 6d 75 73 74 20 72 65 6d |eing we |must rem|
|000044b0| 65 6d 62 65 72 20 74 68 | 65 20 6e 65 78 74 20 6f |ember th|e next o|
|000044c0| 62 6a 65 63 74 0a 58 09 | 09 20 2a 20 62 65 66 6f |bject.X.|. * befo|
|000044d0| 72 65 20 77 65 20 66 72 | 65 65 20 74 68 65 20 63 |re we fr|ee the c|
|000044e0| 75 72 72 65 6e 74 20 6f | 62 6a 65 63 74 20 2e 2e |urrent o|bject ..|
|000044f0| 2e 0a 58 09 09 20 2a 2f | 0a 58 09 09 69 66 20 28 |..X.. */|.X..if (|
|00004500| 66 72 65 65 69 6e 67 29 | 0a 58 09 09 09 6e 65 78 |freeing)|.X...nex|
|00004510| 74 20 3d 20 26 28 28 2a | 72 70 29 2d 3e 70 6d 6c |t = &((*|rp)->pml|
|00004520| 5f 6e 65 78 74 29 3b 20 | 0a 58 09 09 69 66 20 28 |_next); |.X..if (|
|00004530| 21 20 78 64 72 5f 72 65 | 66 65 72 65 6e 63 65 28 |! xdr_re|ference(|
|00004540| 78 64 72 73 2c 20 28 63 | 61 64 64 72 5f 74 20 2a |xdrs, (c|addr_t *|
|00004550| 29 72 70 2c 0a 58 09 09 | 20 20 20 20 28 75 5f 69 |)rp,.X..| (u_i|
|00004560| 6e 74 29 73 69 7a 65 6f | 66 28 73 74 72 75 63 74 |nt)sizeo|f(struct|
|00004570| 20 70 6d 61 70 6c 69 73 | 74 29 2c 20 78 64 72 5f | pmaplis|t), xdr_|
|00004580| 70 6d 61 70 29 29 0a 58 | 09 09 09 72 65 74 75 72 |pmap)).X|...retur|
|00004590| 6e 20 28 46 41 4c 53 45 | 29 3b 0a 58 09 09 72 70 |n (FALSE|);.X..rp|
|000045a0| 20 3d 20 28 66 72 65 65 | 69 6e 67 29 20 3f 20 6e | = (free|ing) ? n|
|000045b0| 65 78 74 20 3a 20 26 28 | 28 2a 72 70 29 2d 3e 70 |ext : &(|(*rp)->p|
|000045c0| 6d 6c 5f 6e 65 78 74 29 | 3b 0a 58 09 7d 0a 58 7d |ml_next)|;.X.}.X}|
|000045d0| 0a 53 48 41 52 5f 45 4f | 46 0a 69 66 20 74 65 73 |.SHAR_EO|F.if tes|
|000045e0| 74 20 34 30 30 33 20 2d | 6e 65 20 22 60 77 63 20 |t 4003 -|ne "`wc |
|000045f0| 2d 63 20 3c 20 27 72 70 | 63 2f 72 70 63 6c 69 62 |-c < 'rp|c/rpclib|
|00004600| 2f 70 6d 61 70 5f 70 72 | 6f 74 2e 63 27 60 22 0a |/pmap_pr|ot.c'`".|
|00004610| 74 68 65 6e 0a 09 65 63 | 68 6f 20 73 68 61 72 3a |then..ec|ho shar:|
|00004620| 20 22 65 72 72 6f 72 20 | 74 72 61 6e 73 6d 69 74 | "error |transmit|
|00004630| 74 69 6e 67 20 27 72 70 | 63 2f 72 70 63 6c 69 62 |ting 'rp|c/rpclib|
|00004640| 2f 70 6d 61 70 5f 70 72 | 6f 74 2e 63 27 22 20 27 |/pmap_pr|ot.c'" '|
|00004650| 28 73 68 6f 75 6c 64 20 | 68 61 76 65 20 62 65 65 |(should |have bee|
|00004660| 6e 20 34 30 30 33 20 63 | 68 61 72 61 63 74 65 72 |n 4003 c|haracter|
|00004670| 73 29 27 0a 66 69 0a 63 | 68 6d 6f 64 20 34 34 34 |s)'.fi.c|hmod 444|
|00004680| 20 27 72 70 63 2f 72 70 | 63 6c 69 62 2f 70 6d 61 | 'rpc/rp|clib/pma|
|00004690| 70 5f 70 72 6f 74 2e 63 | 27 0a 66 69 0a 65 63 68 |p_prot.c|'.fi.ech|
|000046a0| 6f 20 73 68 61 72 3a 20 | 22 65 78 74 72 61 63 74 |o shar: |"extract|
|000046b0| 69 6e 67 20 27 72 70 63 | 2f 72 70 63 6c 69 62 2f |ing 'rpc|/rpclib/|
|000046c0| 70 6d 61 70 5f 72 6d 74 | 2e 63 27 22 20 27 28 31 |pmap_rmt|.c'" '(1|
|000046d0| 30 36 32 39 20 63 68 61 | 72 61 63 74 65 72 73 29 |0629 cha|racters)|
|000046e0| 27 0a 69 66 20 74 65 73 | 74 20 2d 66 20 27 72 70 |'.if tes|t -f 'rp|
|000046f0| 63 2f 72 70 63 6c 69 62 | 2f 70 6d 61 70 5f 72 6d |c/rpclib|/pmap_rm|
|00004700| 74 2e 63 27 0a 74 68 65 | 6e 0a 09 65 63 68 6f 20 |t.c'.the|n..echo |
|00004710| 73 68 61 72 3a 20 22 77 | 69 6c 6c 20 6e 6f 74 20 |shar: "w|ill not |
|00004720| 6f 76 65 72 2d 77 72 69 | 74 65 20 65 78 69 73 74 |over-wri|te exist|
|00004730| 69 6e 67 20 66 69 6c 65 | 20 27 72 70 63 2f 72 70 |ing file| 'rpc/rp|
|00004740| 63 6c 69 62 2f 70 6d 61 | 70 5f 72 6d 74 2e 63 27 |clib/pma|p_rmt.c'|
|00004750| 22 0a 65 6c 73 65 0a 73 | 65 64 20 27 73 2f 5e 58 |".else.s|ed 's/^X|
|00004760| 2f 2f 27 20 3c 3c 20 5c | 53 48 41 52 5f 45 4f 46 |//' << \|SHAR_EOF|
|00004770| 20 3e 20 27 72 70 63 2f | 72 70 63 6c 69 62 2f 70 | > 'rpc/|rpclib/p|
|00004780| 6d 61 70 5f 72 6d 74 2e | 63 27 0a 58 2f 2a 0a 58 |map_rmt.|c'.X/*.X|
|00004790| 20 2a 20 53 75 6e 20 52 | 50 43 20 69 73 20 61 20 | * Sun R|PC is a |
|000047a0| 70 72 6f 64 75 63 74 20 | 6f 66 20 53 75 6e 20 4d |product |of Sun M|
|000047b0| 69 63 72 6f 73 79 73 74 | 65 6d 73 2c 20 49 6e 63 |icrosyst|ems, Inc|
|000047c0| 2e 20 61 6e 64 20 69 73 | 20 70 72 6f 76 69 64 65 |. and is| provide|
|000047d0| 64 20 66 6f 72 0a 58 20 | 2a 20 75 6e 72 65 73 74 |d for.X |* unrest|
|000047e0| 72 69 63 74 65 64 20 75 | 73 65 20 70 72 6f 76 69 |ricted u|se provi|
|000047f0| 64 65 64 20 74 68 61 74 | 20 74 68 69 73 20 6c 65 |ded that| this le|
|00004800| 67 65 6e 64 20 69 73 20 | 69 6e 63 6c 75 64 65 64 |gend is |included|
|00004810| 20 6f 6e 20 61 6c 6c 20 | 74 61 70 65 0a 58 20 2a | on all |tape.X *|
|00004820| 20 6d 65 64 69 61 20 61 | 6e 64 20 61 73 20 61 20 | media a|nd as a |
|00004830| 70 61 72 74 20 6f 66 20 | 74 68 65 20 73 6f 66 74 |part of |the soft|
|00004840| 77 61 72 65 20 70 72 6f | 67 72 61 6d 20 69 6e 20 |ware pro|gram in |
|00004850| 77 68 6f 6c 65 20 6f 72 | 20 70 61 72 74 2e 20 20 |whole or| part. |
|00004860| 55 73 65 72 73 0a 58 20 | 2a 20 6d 61 79 20 63 6f |Users.X |* may co|
|00004870| 70 79 20 6f 72 20 6d 6f | 64 69 66 79 20 53 75 6e |py or mo|dify Sun|
|00004880| 20 52 50 43 20 77 69 74 | 68 6f 75 74 20 63 68 61 | RPC wit|hout cha|
|00004890| 72 67 65 2c 20 62 75 74 | 20 61 72 65 20 6e 6f 74 |rge, but| are not|
|000048a0| 20 61 75 74 68 6f 72 69 | 7a 65 64 0a 58 20 2a 20 | authori|zed.X * |
|000048b0| 74 6f 20 6c 69 63 65 6e | 73 65 20 6f 72 20 64 69 |to licen|se or di|
|000048c0| 73 74 72 69 62 75 74 65 | 20 69 74 20 74 6f 20 61 |stribute| it to a|
|000048d0| 6e 79 6f 6e 65 20 65 6c | 73 65 20 65 78 63 65 70 |nyone el|se excep|
|000048e0| 74 20 61 73 20 70 61 72 | 74 20 6f 66 20 61 20 70 |t as par|t of a p|
|000048f0| 72 6f 64 75 63 74 20 6f | 72 0a 58 20 2a 20 70 72 |roduct o|r.X * pr|
|00004900| 6f 67 72 61 6d 20 64 65 | 76 65 6c 6f 70 65 64 20 |ogram de|veloped |
|00004910| 62 79 20 74 68 65 20 75 | 73 65 72 2e 0a 58 20 2a |by the u|ser..X *|
|00004920| 20 0a 58 20 2a 20 53 55 | 4e 20 52 50 43 20 49 53 | .X * SU|N RPC IS|
|00004930| 20 50 52 4f 56 49 44 45 | 44 20 41 53 20 49 53 20 | PROVIDE|D AS IS |
|00004940| 57 49 54 48 20 4e 4f 20 | 57 41 52 52 41 4e 54 49 |WITH NO |WARRANTI|
|00004950| 45 53 20 4f 46 20 41 4e | 59 20 4b 49 4e 44 20 49 |ES OF AN|Y KIND I|
|00004960| 4e 43 4c 55 44 49 4e 47 | 20 54 48 45 0a 58 20 2a |NCLUDING| THE.X *|
|00004970| 20 57 41 52 52 41 4e 54 | 49 45 53 20 4f 46 20 44 | WARRANT|IES OF D|
|00004980| 45 53 49 47 4e 2c 20 4d | 45 52 43 48 41 4e 54 49 |ESIGN, M|ERCHANTI|
|00004990| 42 49 4c 49 54 59 20 41 | 4e 44 20 46 49 54 4e 45 |BILITY A|ND FITNE|
|000049a0| 53 53 20 46 4f 52 20 41 | 20 50 41 52 54 49 43 55 |SS FOR A| PARTICU|
|000049b0| 4c 41 52 0a 58 20 2a 20 | 50 55 52 50 4f 53 45 2c |LAR.X * |PURPOSE,|
|000049c0| 20 4f 52 20 41 52 49 53 | 49 4e 47 20 46 52 4f 4d | OR ARIS|ING FROM|
|000049d0| 20 41 20 43 4f 55 52 53 | 45 20 4f 46 20 44 45 41 | A COURS|E OF DEA|
|000049e0| 4c 49 4e 47 2c 20 55 53 | 41 47 45 20 4f 52 20 54 |LING, US|AGE OR T|
|000049f0| 52 41 44 45 20 50 52 41 | 43 54 49 43 45 2e 0a 58 |RADE PRA|CTICE..X|
|00004a00| 20 2a 20 0a 58 20 2a 20 | 53 75 6e 20 52 50 43 20 | * .X * |Sun RPC |
|00004a10| 69 73 20 70 72 6f 76 69 | 64 65 64 20 77 69 74 68 |is provi|ded with|
|00004a20| 20 6e 6f 20 73 75 70 70 | 6f 72 74 20 61 6e 64 20 | no supp|ort and |
|00004a30| 77 69 74 68 6f 75 74 20 | 61 6e 79 20 6f 62 6c 69 |without |any obli|
|00004a40| 67 61 74 69 6f 6e 20 6f | 6e 20 74 68 65 0a 58 20 |gation o|n the.X |
|00004a50| 2a 20 70 61 72 74 20 6f | 66 20 53 75 6e 20 4d 69 |* part o|f Sun Mi|
|00004a60| 63 72 6f 73 79 73 74 65 | 6d 73 2c 20 49 6e 63 2e |crosyste|ms, Inc.|
|00004a70| 20 74 6f 20 61 73 73 69 | 73 74 20 69 6e 20 69 74 | to assi|st in it|
|00004a80| 73 20 75 73 65 2c 20 63 | 6f 72 72 65 63 74 69 6f |s use, c|orrectio|
|00004a90| 6e 2c 0a 58 20 2a 20 6d | 6f 64 69 66 69 63 61 74 |n,.X * m|odificat|
|00004aa0| 69 6f 6e 20 6f 72 20 65 | 6e 68 61 6e 63 65 6d 65 |ion or e|nhanceme|
|00004ab0| 6e 74 2e 0a 58 20 2a 20 | 0a 58 20 2a 20 53 55 4e |nt..X * |.X * SUN|
|00004ac0| 20 4d 49 43 52 4f 53 59 | 53 54 45 4d 53 2c 20 49 | MICROSY|STEMS, I|
|00004ad0| 4e 43 2e 20 53 48 41 4c | 4c 20 48 41 56 45 20 4e |NC. SHAL|L HAVE N|
|00004ae0| 4f 20 4c 49 41 42 49 4c | 49 54 59 20 57 49 54 48 |O LIABIL|ITY WITH|
|00004af0| 20 52 45 53 50 45 43 54 | 20 54 4f 20 54 48 45 0a | RESPECT| TO THE.|
|00004b00| 58 20 2a 20 49 4e 46 52 | 49 4e 47 45 4d 45 4e 54 |X * INFR|INGEMENT|
|00004b10| 20 4f 46 20 43 4f 50 59 | 52 49 47 48 54 53 2c 20 | OF COPY|RIGHTS, |
|00004b20| 54 52 41 44 45 20 53 45 | 43 52 45 54 53 20 4f 52 |TRADE SE|CRETS OR|
|00004b30| 20 41 4e 59 20 50 41 54 | 45 4e 54 53 20 42 59 20 | ANY PAT|ENTS BY |
|00004b40| 53 55 4e 20 52 50 43 0a | 58 20 2a 20 4f 52 20 41 |SUN RPC.|X * OR A|
|00004b50| 4e 59 20 50 41 52 54 20 | 54 48 45 52 45 4f 46 2e |NY PART |THEREOF.|
|00004b60| 0a 58 20 2a 20 0a 58 20 | 2a 20 49 6e 20 6e 6f 20 |.X * .X |* In no |
|00004b70| 65 76 65 6e 74 20 77 69 | 6c 6c 20 53 75 6e 20 4d |event wi|ll Sun M|
|00004b80| 69 63 72 6f 73 79 73 74 | 65 6d 73 2c 20 49 6e 63 |icrosyst|ems, Inc|
|00004b90| 2e 20 62 65 20 6c 69 61 | 62 6c 65 20 66 6f 72 20 |. be lia|ble for |
|00004ba0| 61 6e 79 20 6c 6f 73 74 | 20 72 65 76 65 6e 75 65 |any lost| revenue|
|00004bb0| 0a 58 20 2a 20 6f 72 20 | 70 72 6f 66 69 74 73 20 |.X * or |profits |
|00004bc0| 6f 72 20 6f 74 68 65 72 | 20 73 70 65 63 69 61 6c |or other| special|
|00004bd0| 2c 20 69 6e 64 69 72 65 | 63 74 20 61 6e 64 20 63 |, indire|ct and c|
|00004be0| 6f 6e 73 65 71 75 65 6e | 74 69 61 6c 20 64 61 6d |onsequen|tial dam|
|00004bf0| 61 67 65 73 2c 20 65 76 | 65 6e 20 69 66 0a 58 20 |ages, ev|en if.X |
|00004c00| 2a 20 53 75 6e 20 68 61 | 73 20 62 65 65 6e 20 61 |* Sun ha|s been a|
|00004c10| 64 76 69 73 65 64 20 6f | 66 20 74 68 65 20 70 6f |dvised o|f the po|
|00004c20| 73 73 69 62 69 6c 69 74 | 79 20 6f 66 20 73 75 63 |ssibilit|y of suc|
|00004c30| 68 20 64 61 6d 61 67 65 | 73 2e 0a 58 20 2a 20 0a |h damage|s..X * .|
|00004c40| 58 20 2a 20 53 75 6e 20 | 4d 69 63 72 6f 73 79 73 |X * Sun |Microsys|
|00004c50| 74 65 6d 73 2c 20 49 6e | 63 2e 0a 58 20 2a 20 32 |tems, In|c..X * 2|
|00004c60| 35 35 30 20 47 61 72 63 | 69 61 20 41 76 65 6e 75 |550 Garc|ia Avenu|
|00004c70| 65 0a 58 20 2a 20 4d 6f | 75 6e 74 61 69 6e 20 56 |e.X * Mo|untain V|
|00004c80| 69 65 77 2c 20 43 61 6c | 69 66 6f 72 6e 69 61 20 |iew, Cal|ifornia |
|00004c90| 20 39 34 30 34 33 0a 58 | 20 2a 2f 0a 58 23 69 66 | 94043.X| */.X#if|
|00004ca0| 6e 64 65 66 20 6c 69 6e | 74 0a 58 73 74 61 74 69 |ndef lin|t.Xstati|
|00004cb0| 63 20 63 68 61 72 20 73 | 63 63 73 69 64 5b 5d 20 |c char s|ccsid[] |
|00004cc0| 3d 20 22 40 28 23 29 70 | 6d 61 70 5f 72 6d 74 2e |= "@(#)p|map_rmt.|
|00004cd0| 63 20 31 2e 31 20 38 36 | 2f 30 32 2f 30 33 20 43 |c 1.1 86|/02/03 C|
|00004ce0| 6f 70 79 72 20 31 39 38 | 34 20 53 75 6e 20 4d 69 |opyr 198|4 Sun Mi|
|00004cf0| 63 72 6f 22 3b 0a 58 23 | 65 6e 64 69 66 0a 58 0a |cro";.X#|endif.X.|
|00004d00| 58 2f 2a 0a 58 20 2a 20 | 70 6d 61 70 5f 72 6d 74 |X/*.X * |pmap_rmt|
|00004d10| 2e 63 0a 58 20 2a 20 43 | 6c 69 65 6e 74 20 69 6e |.c.X * C|lient in|
|00004d20| 74 65 72 66 61 63 65 20 | 74 6f 20 70 6d 61 70 20 |terface |to pmap |
|00004d30| 72 70 63 20 73 65 72 76 | 69 63 65 2e 0a 58 20 2a |rpc serv|ice..X *|
|00004d40| 20 72 65 6d 6f 74 65 20 | 63 61 6c 6c 20 61 6e 64 | remote |call and|
|00004d50| 20 62 72 6f 61 64 63 61 | 73 74 20 73 65 72 76 69 | broadca|st servi|
|00004d60| 63 65 0a 58 20 2a 0a 58 | 20 2a 20 43 6f 70 79 72 |ce.X *.X| * Copyr|
|00004d70| 69 67 68 74 20 28 43 29 | 20 31 39 38 34 2c 20 53 |ight (C)| 1984, S|
|00004d80| 75 6e 20 4d 69 63 72 6f | 73 79 73 74 65 6d 73 2c |un Micro|systems,|
|00004d90| 20 49 6e 63 2e 0a 58 20 | 2a 2f 0a 58 0a 58 23 69 | Inc..X |*/.X.X#i|
|00004da0| 6e 63 6c 75 64 65 20 22 | 74 79 70 65 73 2e 68 22 |nclude "|types.h"|
|00004db0| 0a 58 23 69 6e 63 6c 75 | 64 65 20 3c 6e 65 74 69 |.X#inclu|de <neti|
|00004dc0| 6e 65 74 2f 69 6e 2e 68 | 3e 0a 58 23 69 6e 63 6c |net/in.h|>.X#incl|
|00004dd0| 75 64 65 20 22 78 64 72 | 2e 68 22 0a 58 23 69 6e |ude "xdr|.h".X#in|
|00004de0| 63 6c 75 64 65 20 22 61 | 75 74 68 2e 68 22 0a 58 |clude "a|uth.h".X|
|00004df0| 23 69 6e 63 6c 75 64 65 | 20 22 63 6c 6e 74 2e 68 |#include| "clnt.h|
|00004e00| 22 0a 58 23 69 6e 63 6c | 75 64 65 20 22 72 70 63 |".X#incl|ude "rpc|
|00004e10| 5f 6d 73 67 2e 68 22 0a | 58 23 69 6e 63 6c 75 64 |_msg.h".|X#includ|
|00004e20| 65 20 22 70 6d 61 70 5f | 70 72 6f 74 2e 68 22 20 |e "pmap_|prot.h" |
|00004e30| 0a 58 23 69 6e 63 6c 75 | 64 65 20 22 70 6d 61 70 |.X#inclu|de "pmap|
|00004e40| 5f 63 6c 6e 74 2e 68 22 | 0a 58 23 69 6e 63 6c 75 |_clnt.h"|.X#inclu|
|00004e50| 64 65 20 3c 73 79 73 2f | 73 6f 63 6b 65 74 2e 68 |de <sys/|socket.h|
|00004e60| 3e 0a 58 23 69 6e 63 6c | 75 64 65 20 3c 73 79 73 |>.X#incl|ude <sys|
|00004e70| 2f 74 69 6d 65 2e 68 3e | 0a 58 23 69 6e 63 6c 75 |/time.h>|.X#inclu|
|00004e80| 64 65 20 3c 73 74 64 69 | 6f 2e 68 3e 0a 58 23 69 |de <stdi|o.h>.X#i|
|00004e90| 6e 63 6c 75 64 65 20 3c | 65 72 72 6e 6f 2e 68 3e |nclude <|errno.h>|
|00004ea0| 0a 58 23 69 6e 63 6c 75 | 64 65 20 3c 6e 65 74 2f |.X#inclu|de <net/|
|00004eb0| 69 66 2e 68 3e 0a 58 23 | 69 6e 63 6c 75 64 65 20 |if.h>.X#|include |
|00004ec0| 3c 73 79 73 2f 69 6f 63 | 74 6c 2e 68 3e 0a 58 23 |<sys/ioc|tl.h>.X#|
|00004ed0| 69 6e 63 6c 75 64 65 20 | 3c 61 72 70 61 2f 69 6e |include |<arpa/in|
|00004ee0| 65 74 2e 68 3e 0a 58 23 | 64 65 66 69 6e 65 20 4d |et.h>.X#|define M|
|00004ef0| 41 58 5f 42 52 4f 41 44 | 43 41 53 54 5f 53 49 5a |AX_BROAD|CAST_SIZ|
|00004f00| 45 20 31 34 30 30 0a 58 | 0a 58 65 78 74 65 72 6e |E 1400.X|.Xextern|
|00004f10| 20 69 6e 74 20 65 72 72 | 6e 6f 3b 0a 58 73 74 61 | int err|no;.Xsta|
|00004f20| 74 69 63 20 73 74 72 75 | 63 74 20 74 69 6d 65 76 |tic stru|ct timev|
|00004f30| 61 6c 20 74 69 6d 65 6f | 75 74 20 3d 20 7b 20 33 |al timeo|ut = { 3|
|00004f40| 2c 20 30 20 7d 3b 0a 58 | 0a 58 2f 2a 0a 58 20 2a |, 0 };.X|.X/*.X *|
|00004f50| 20 53 74 72 75 63 74 75 | 72 65 73 20 61 6e 64 20 | Structu|res and |
|00004f60| 58 44 52 20 72 6f 75 74 | 69 6e 65 73 20 66 6f 72 |XDR rout|ines for|
|00004f70| 20 70 61 72 61 6d 65 74 | 65 72 73 20 74 6f 20 61 | paramet|ers to a|
|00004f80| 6e 64 20 72 65 70 6c 79 | 73 20 66 72 6f 6d 0a 58 |nd reply|s from.X|
|00004f90| 20 2a 20 74 68 65 20 70 | 6d 61 70 70 65 72 20 72 | * the p|mapper r|
|00004fa0| 65 6d 6f 74 65 2d 63 61 | 6c 6c 2d 73 65 72 76 69 |emote-ca|ll-servi|
|00004fb0| 63 65 2e 0a 58 20 2a 2f | 0a 58 0a 58 73 74 72 75 |ce..X */|.X.Xstru|
|00004fc0| 63 74 20 72 6d 74 63 61 | 6c 6c 61 72 67 73 20 7b |ct rmtca|llargs {|
|00004fd0| 0a 58 09 75 5f 6c 6f 6e | 67 20 70 72 6f 67 2c 20 |.X.u_lon|g prog, |
|00004fe0| 76 65 72 73 2c 20 70 72 | 6f 63 2c 20 61 72 67 6c |vers, pr|oc, argl|
|00004ff0| 65 6e 3b 0a 58 09 63 61 | 64 64 72 5f 74 20 61 72 |en;.X.ca|ddr_t ar|
|00005000| 67 73 5f 70 74 72 3b 0a | 58 09 78 64 72 70 72 6f |gs_ptr;.|X.xdrpro|
|00005010| 63 5f 74 20 78 64 72 5f | 61 72 67 73 3b 0a 58 7d |c_t xdr_|args;.X}|
|00005020| 3b 0a 58 73 74 61 74 69 | 63 20 62 6f 6f 6c 5f 74 |;.Xstati|c bool_t|
|00005030| 20 78 64 72 5f 72 6d 74 | 63 61 6c 6c 5f 61 72 67 | xdr_rmt|call_arg|
|00005040| 73 28 29 3b 0a 58 0a 58 | 73 74 72 75 63 74 20 72 |s();.X.X|struct r|
|00005050| 6d 74 63 61 6c 6c 72 65 | 73 20 7b 0a 58 09 75 5f |mtcallre|s {.X.u_|
|00005060| 6c 6f 6e 67 20 2a 70 6f | 72 74 5f 70 74 72 3b 0a |long *po|rt_ptr;.|
|00005070| 58 09 75 5f 6c 6f 6e 67 | 20 72 65 73 75 6c 74 73 |X.u_long| results|
|00005080| 6c 65 6e 3b 0a 58 09 63 | 61 64 64 72 5f 74 20 72 |len;.X.c|addr_t r|
|00005090| 65 73 75 6c 74 73 5f 70 | 74 72 3b 0a 58 09 78 64 |esults_p|tr;.X.xd|
|000050a0| 72 70 72 6f 63 5f 74 20 | 78 64 72 5f 72 65 73 75 |rproc_t |xdr_resu|
|000050b0| 6c 74 73 3b 0a 58 7d 3b | 0a 58 73 74 61 74 69 63 |lts;.X};|.Xstatic|
|000050c0| 20 62 6f 6f 6c 5f 74 20 | 78 64 72 5f 72 6d 74 63 | bool_t |xdr_rmtc|
|000050d0| 61 6c 6c 72 65 73 28 29 | 3b 0a 58 0a 58 2f 2a 0a |allres()|;.X.X/*.|
|000050e0| 58 20 2a 20 70 6d 61 70 | 70 65 72 20 72 65 6d 6f |X * pmap|per remo|
|000050f0| 74 65 2d 63 61 6c 6c 2d | 73 65 72 76 69 63 65 20 |te-call-|service |
|00005100| 69 6e 74 65 72 66 61 63 | 65 2e 0a 58 20 2a 20 54 |interfac|e..X * T|
|00005110| 68 69 73 20 72 6f 75 74 | 69 6e 65 20 69 73 20 75 |his rout|ine is u|
|00005120| 73 65 64 20 74 6f 20 63 | 61 6c 6c 20 74 68 65 20 |sed to c|all the |
|00005130| 70 6d 61 70 70 65 72 20 | 72 65 6d 6f 74 65 20 63 |pmapper |remote c|
|00005140| 61 6c 6c 20 73 65 72 76 | 69 63 65 0a 58 20 2a 20 |all serv|ice.X * |
|00005150| 77 68 69 63 68 20 77 69 | 6c 6c 20 6c 6f 6f 6b 20 |which wi|ll look |
|00005160| 75 70 20 61 20 73 65 72 | 76 69 63 65 20 70 72 6f |up a ser|vice pro|
|00005170| 67 72 61 6d 20 69 6e 20 | 74 68 65 20 70 6f 72 74 |gram in |the port|
|00005180| 20 6d 61 70 73 2c 20 61 | 6e 64 20 74 68 65 6e 0a | maps, a|nd then.|
|00005190| 58 20 2a 20 72 65 6d 6f | 74 65 6c 79 20 63 61 6c |X * remo|tely cal|
|000051a0| 6c 20 74 68 61 74 20 72 | 6f 75 74 69 6e 65 20 77 |l that r|outine w|
|000051b0| 69 74 68 20 74 68 65 20 | 67 69 76 65 6e 20 70 61 |ith the |given pa|
|000051c0| 72 61 6d 65 74 65 72 73 | 2e 20 20 54 68 69 73 20 |rameters|. This |
|000051d0| 61 6c 6c 6f 77 73 0a 58 | 20 2a 20 70 72 6f 67 72 |allows.X| * progr|
|000051e0| 61 6d 73 20 74 6f 20 64 | 6f 20 61 20 6c 6f 6f 6b |ams to d|o a look|
|000051f0| 75 70 20 61 6e 64 20 63 | 61 6c 6c 20 69 6e 20 6f |up and c|all in o|
|00005200| 6e 65 20 73 74 65 70 2e | 0a 58 2a 2f 0a 58 65 6e |ne step.|.X*/.Xen|
|00005210| 75 6d 20 63 6c 6e 74 5f | 73 74 61 74 0a 58 70 6d |um clnt_|stat.Xpm|
|00005220| 61 70 5f 72 6d 74 63 61 | 6c 6c 28 61 64 64 72 2c |ap_rmtca|ll(addr,|
|00005230| 20 70 72 6f 67 2c 20 76 | 65 72 73 2c 20 70 72 6f | prog, v|ers, pro|
|00005240| 63 2c 20 78 64 72 61 72 | 67 73 2c 20 61 72 67 73 |c, xdrar|gs, args|
|00005250| 70 2c 20 78 64 72 72 65 | 73 2c 20 72 65 73 70 2c |p, xdrre|s, resp,|
|00005260| 20 74 6f 75 74 2c 20 70 | 6f 72 74 5f 70 74 72 29 | tout, p|ort_ptr)|
|00005270| 0a 58 09 73 74 72 75 63 | 74 20 73 6f 63 6b 61 64 |.X.struc|t sockad|
|00005280| 64 72 5f 69 6e 20 2a 61 | 64 64 72 3b 0a 58 09 75 |dr_in *a|ddr;.X.u|
|00005290| 5f 6c 6f 6e 67 20 70 72 | 6f 67 2c 20 76 65 72 73 |_long pr|og, vers|
|000052a0| 2c 20 70 72 6f 63 3b 0a | 58 09 78 64 72 70 72 6f |, proc;.|X.xdrpro|
|000052b0| 63 5f 74 20 78 64 72 61 | 72 67 73 2c 20 78 64 72 |c_t xdra|rgs, xdr|
|000052c0| 72 65 73 3b 0a 58 09 63 | 61 64 64 72 5f 74 20 61 |res;.X.c|addr_t a|
|000052d0| 72 67 73 70 2c 20 72 65 | 73 70 3b 0a 58 09 73 74 |rgsp, re|sp;.X.st|
|000052e0| 72 75 63 74 20 74 69 6d | 65 76 61 6c 20 74 6f 75 |ruct tim|eval tou|
|000052f0| 74 3b 0a 58 09 75 5f 6c | 6f 6e 67 20 2a 70 6f 72 |t;.X.u_l|ong *por|
|00005300| 74 5f 70 74 72 3b 0a 58 | 7b 0a 58 09 69 6e 74 20 |t_ptr;.X|{.X.int |
|00005310| 73 6f 63 6b 65 74 20 3d | 20 2d 31 3b 0a 58 09 72 |socket =| -1;.X.r|
|00005320| 65 67 69 73 74 65 72 20 | 43 4c 49 45 4e 54 20 2a |egister |CLIENT *|
|00005330| 63 6c 69 65 6e 74 3b 0a | 58 09 73 74 72 75 63 74 |client;.|X.struct|
|00005340| 20 72 6d 74 63 61 6c 6c | 61 72 67 73 20 61 3b 0a | rmtcall|args a;.|
|00005350| 58 09 73 74 72 75 63 74 | 20 72 6d 74 63 61 6c 6c |X.struct| rmtcall|
|00005360| 72 65 73 20 72 3b 0a 58 | 09 65 6e 75 6d 20 63 6c |res r;.X|.enum cl|
|00005370| 6e 74 5f 73 74 61 74 20 | 73 74 61 74 3b 0a 58 0a |nt_stat |stat;.X.|
|00005380| 58 09 61 64 64 72 2d 3e | 73 69 6e 5f 70 6f 72 74 |X.addr->|sin_port|
|00005390| 20 3d 20 68 74 6f 6e 73 | 28 50 4d 41 50 50 4f 52 | = htons|(PMAPPOR|
|000053a0| 54 29 3b 0a 58 09 63 6c | 69 65 6e 74 20 3d 20 63 |T);.X.cl|ient = c|
|000053b0| 6c 6e 74 75 64 70 5f 63 | 72 65 61 74 65 28 61 64 |lntudp_c|reate(ad|
|000053c0| 64 72 2c 20 50 4d 41 50 | 50 52 4f 47 2c 20 50 4d |dr, PMAP|PROG, PM|
|000053d0| 41 50 56 45 52 53 2c 20 | 74 69 6d 65 6f 75 74 2c |APVERS, |timeout,|
|000053e0| 20 26 73 6f 63 6b 65 74 | 29 3b 0a 58 09 69 66 20 | &socket|);.X.if |
|000053f0| 28 63 6c 69 65 6e 74 20 | 21 3d 20 28 43 4c 49 45 |(client |!= (CLIE|
|00005400| 4e 54 20 2a 29 4e 55 4c | 4c 29 20 7b 0a 58 09 09 |NT *)NUL|L) {.X..|
|00005410| 61 2e 70 72 6f 67 20 3d | 20 70 72 6f 67 3b 0a 58 |a.prog =| prog;.X|
|00005420| 09 09 61 2e 76 65 72 73 | 20 3d 20 76 65 72 73 3b |..a.vers| = vers;|
|00005430| 0a 58 09 09 61 2e 70 72 | 6f 63 20 3d 20 70 72 6f |.X..a.pr|oc = pro|
|00005440| 63 3b 0a 58 09 09 61 2e | 61 72 67 73 5f 70 74 72 |c;.X..a.|args_ptr|
|00005450| 20 3d 20 61 72 67 73 70 | 3b 0a 58 09 09 61 2e 78 | = argsp|;.X..a.x|
|00005460| 64 72 5f 61 72 67 73 20 | 3d 20 78 64 72 61 72 67 |dr_args |= xdrarg|
|00005470| 73 3b 0a 58 09 09 72 2e | 70 6f 72 74 5f 70 74 72 |s;.X..r.|port_ptr|
|00005480| 20 3d 20 70 6f 72 74 5f | 70 74 72 3b 0a 58 09 09 | = port_|ptr;.X..|
|00005490| 72 2e 72 65 73 75 6c 74 | 73 5f 70 74 72 20 3d 20 |r.result|s_ptr = |
|000054a0| 72 65 73 70 3b 0a 58 09 | 09 72 2e 78 64 72 5f 72 |resp;.X.|.r.xdr_r|
|000054b0| 65 73 75 6c 74 73 20 3d | 20 78 64 72 72 65 73 3b |esults =| xdrres;|
|000054c0| 0a 58 09 09 73 74 61 74 | 20 3d 20 43 4c 4e 54 5f |.X..stat| = CLNT_|
|000054d0| 43 41 4c 4c 28 63 6c 69 | 65 6e 74 2c 20 50 4d 41 |CALL(cli|ent, PMA|
|000054e0| 50 50 52 4f 43 5f 43 41 | 4c 4c 49 54 2c 20 78 64 |PPROC_CA|LLIT, xd|
|000054f0| 72 5f 72 6d 74 63 61 6c | 6c 5f 61 72 67 73 2c 20 |r_rmtcal|l_args, |
|00005500| 26 61 2c 0a 58 09 09 20 | 20 20 20 78 64 72 5f 72 |&a,.X.. | xdr_r|
|00005510| 6d 74 63 61 6c 6c 72 65 | 73 2c 20 26 72 2c 20 74 |mtcallre|s, &r, t|
|00005520| 6f 75 74 29 3b 0a 58 09 | 09 43 4c 4e 54 5f 44 45 |out);.X.|.CLNT_DE|
|00005530| 53 54 52 4f 59 28 63 6c | 69 65 6e 74 29 3b 0a 58 |STROY(cl|ient);.X|
|00005540| 09 7d 20 65 6c 73 65 20 | 7b 0a 58 09 09 73 74 61 |.} else |{.X..sta|
|00005550| 74 20 3d 20 52 50 43 5f | 46 41 49 4c 45 44 3b 0a |t = RPC_|FAILED;.|
|00005560| 58 09 7d 0a 58 09 28 76 | 6f 69 64 29 63 6c 6f 73 |X.}.X.(v|oid)clos|
|00005570| 65 28 73 6f 63 6b 65 74 | 29 3b 0a 58 09 61 64 64 |e(socket|);.X.add|
|00005580| 72 2d 3e 73 69 6e 5f 70 | 6f 72 74 20 3d 20 30 3b |r->sin_p|ort = 0;|
|00005590| 0a 58 09 72 65 74 75 72 | 6e 20 28 73 74 61 74 29 |.X.retur|n (stat)|
|000055a0| 3b 0a 58 7d 0a 58 0a 58 | 2f 2a 0a 58 20 2a 20 58 |;.X}.X.X|/*.X * X|
|000055b0| 44 52 20 72 65 6d 6f 74 | 65 20 63 61 6c 6c 20 61 |DR remot|e call a|
|000055c0| 72 67 75 6d 65 6e 74 73 | 0a 58 20 2a 20 77 72 69 |rguments|.X * wri|
|000055d0| 74 74 65 6e 20 66 6f 72 | 20 58 44 52 5f 45 4e 43 |tten for| XDR_ENC|
|000055e0| 4f 44 45 20 64 69 72 65 | 63 74 69 6f 6e 20 6f 6e |ODE dire|ction on|
|000055f0| 6c 79 0a 58 20 2a 2f 0a | 58 73 74 61 74 69 63 20 |ly.X */.|Xstatic |
|00005600| 62 6f 6f 6c 5f 74 0a 58 | 78 64 72 5f 72 6d 74 63 |bool_t.X|xdr_rmtc|
|00005610| 61 6c 6c 5f 61 72 67 73 | 28 78 64 72 73 2c 20 63 |all_args|(xdrs, c|
|00005620| 61 70 29 0a 58 09 72 65 | 67 69 73 74 65 72 20 58 |ap).X.re|gister X|
|00005630| 44 52 20 2a 78 64 72 73 | 3b 0a 58 09 72 65 67 69 |DR *xdrs|;.X.regi|
|00005640| 73 74 65 72 20 73 74 72 | 75 63 74 20 72 6d 74 63 |ster str|uct rmtc|
|00005650| 61 6c 6c 61 72 67 73 20 | 2a 63 61 70 3b 0a 58 7b |allargs |*cap;.X{|
|00005660| 0a 58 09 75 5f 69 6e 74 | 20 6c 65 6e 70 6f 73 69 |.X.u_int| lenposi|
|00005670| 74 69 6f 6e 2c 20 61 72 | 67 70 6f 73 69 74 69 6f |tion, ar|gpositio|
|00005680| 6e 2c 20 70 6f 73 69 74 | 69 6f 6e 3b 0a 58 0a 58 |n, posit|ion;.X.X|
|00005690| 09 69 66 20 28 78 64 72 | 5f 75 5f 6c 6f 6e 67 28 |.if (xdr|_u_long(|
|000056a0| 78 64 72 73 2c 20 26 28 | 63 61 70 2d 3e 70 72 6f |xdrs, &(|cap->pro|
|000056b0| 67 29 29 20 26 26 0a 58 | 09 20 20 20 20 78 64 72 |g)) &&.X|. xdr|
|000056c0| 5f 75 5f 6c 6f 6e 67 28 | 78 64 72 73 2c 20 26 28 |_u_long(|xdrs, &(|
|000056d0| 63 61 70 2d 3e 76 65 72 | 73 29 29 20 26 26 0a 58 |cap->ver|s)) &&.X|
|000056e0| 09 20 20 20 20 78 64 72 | 5f 75 5f 6c 6f 6e 67 28 |. xdr|_u_long(|
|000056f0| 78 64 72 73 2c 20 26 28 | 63 61 70 2d 3e 70 72 6f |xdrs, &(|cap->pro|
|00005700| 63 29 29 29 20 7b 0a 58 | 09 09 6c 65 6e 70 6f 73 |c))) {.X|..lenpos|
|00005710| 69 74 69 6f 6e 20 3d 20 | 58 44 52 5f 47 45 54 50 |ition = |XDR_GETP|
|00005720| 4f 53 28 78 64 72 73 29 | 3b 0a 58 09 09 69 66 20 |OS(xdrs)|;.X..if |
|00005730| 28 21 20 78 64 72 5f 75 | 5f 6c 6f 6e 67 28 78 64 |(! xdr_u|_long(xd|
|00005740| 72 73 2c 20 26 28 63 61 | 70 2d 3e 61 72 67 6c 65 |rs, &(ca|p->argle|
|00005750| 6e 29 29 29 0a 58 09 09 | 20 20 20 20 72 65 74 75 |n))).X..| retu|
|00005760| 72 6e 20 28 46 41 4c 53 | 45 29 3b 0a 58 09 09 61 |rn (FALS|E);.X..a|
|00005770| 72 67 70 6f 73 69 74 69 | 6f 6e 20 3d 20 58 44 52 |rgpositi|on = XDR|
|00005780| 5f 47 45 54 50 4f 53 28 | 78 64 72 73 29 3b 0a 58 |_GETPOS(|xdrs);.X|
|00005790| 09 09 69 66 20 28 21 20 | 28 2a 28 63 61 70 2d 3e |..if (! |(*(cap->|
|000057a0| 78 64 72 5f 61 72 67 73 | 29 29 28 78 64 72 73 2c |xdr_args|))(xdrs,|
|000057b0| 20 63 61 70 2d 3e 61 72 | 67 73 5f 70 74 72 29 29 | cap->ar|gs_ptr))|
|000057c0| 0a 58 09 09 20 20 20 20 | 72 65 74 75 72 6e 20 28 |.X.. |return (|
|000057d0| 46 41 4c 53 45 29 3b 0a | 58 09 09 70 6f 73 69 74 |FALSE);.|X..posit|
|000057e0| 69 6f 6e 20 3d 20 58 44 | 52 5f 47 45 54 50 4f 53 |ion = XD|R_GETPOS|
|000057f0| 28 78 64 72 73 29 3b 0a | 58 09 09 63 61 70 2d 3e |(xdrs);.|X..cap->|
|00005800| 61 72 67 6c 65 6e 20 3d | 20 28 75 5f 6c 6f 6e 67 |arglen =| (u_long|
|00005810| 29 70 6f 73 69 74 69 6f | 6e 20 2d 20 28 75 5f 6c |)positio|n - (u_l|
|00005820| 6f 6e 67 29 61 72 67 70 | 6f 73 69 74 69 6f 6e 3b |ong)argp|osition;|
|00005830| 0a 58 09 09 58 44 52 5f | 53 45 54 50 4f 53 28 78 |.X..XDR_|SETPOS(x|
|00005840| 64 72 73 2c 20 6c 65 6e | 70 6f 73 69 74 69 6f 6e |drs, len|position|
|00005850| 29 3b 0a 58 09 09 69 66 | 20 28 21 20 78 64 72 5f |);.X..if| (! xdr_|
|00005860| 75 5f 6c 6f 6e 67 28 78 | 64 72 73 2c 20 26 28 63 |u_long(x|drs, &(c|
|00005870| 61 70 2d 3e 61 72 67 6c | 65 6e 29 29 29 0a 58 09 |ap->argl|en))).X.|
|00005880| 09 20 20 20 20 72 65 74 | 75 72 6e 20 28 46 41 4c |. ret|urn (FAL|
|00005890| 53 45 29 3b 0a 58 09 09 | 58 44 52 5f 53 45 54 50 |SE);.X..|XDR_SETP|
|000058a0| 4f 53 28 78 64 72 73 2c | 20 70 6f 73 69 74 69 6f |OS(xdrs,| positio|
|000058b0| 6e 29 3b 0a 58 09 09 72 | 65 74 75 72 6e 20 28 54 |n);.X..r|eturn (T|
|000058c0| 52 55 45 29 3b 0a 58 09 | 7d 0a 58 09 72 65 74 75 |RUE);.X.|}.X.retu|
|000058d0| 72 6e 20 28 46 41 4c 53 | 45 29 3b 0a 58 7d 0a 58 |rn (FALS|E);.X}.X|
|000058e0| 0a 58 2f 2a 0a 58 20 2a | 20 58 44 52 20 72 65 6d |.X/*.X *| XDR rem|
|000058f0| 6f 74 65 20 63 61 6c 6c | 20 72 65 73 75 6c 74 73 |ote call| results|
|00005900| 0a 58 20 2a 20 77 72 69 | 74 74 65 6e 20 66 6f 72 |.X * wri|tten for|
|00005910| 20 58 44 52 5f 44 45 43 | 4f 44 45 20 64 69 72 65 | XDR_DEC|ODE dire|
|00005920| 63 74 69 6f 6e 20 6f 6e | 6c 79 0a 58 20 2a 2f 0a |ction on|ly.X */.|
|00005930| 58 73 74 61 74 69 63 20 | 62 6f 6f 6c 5f 74 0a 58 |Xstatic |bool_t.X|
|00005940| 78 64 72 5f 72 6d 74 63 | 61 6c 6c 72 65 73 28 78 |xdr_rmtc|allres(x|
|00005950| 64 72 73 2c 20 63 72 70 | 29 0a 58 09 72 65 67 69 |drs, crp|).X.regi|
|00005960| 73 74 65 72 20 58 44 52 | 20 2a 78 64 72 73 3b 0a |ster XDR| *xdrs;.|
|00005970| 58 09 72 65 67 69 73 74 | 65 72 20 73 74 72 75 63 |X.regist|er struc|
|00005980| 74 20 72 6d 74 63 61 6c | 6c 72 65 73 20 2a 63 72 |t rmtcal|lres *cr|
|00005990| 70 3b 0a 58 7b 0a 58 0a | 58 09 69 66 20 28 78 64 |p;.X{.X.|X.if (xd|
|000059a0| 72 5f 72 65 66 65 72 65 | 6e 63 65 28 78 64 72 73 |r_refere|nce(xdrs|
|000059b0| 2c 20 26 63 72 70 2d 3e | 70 6f 72 74 5f 70 74 72 |, &crp->|port_ptr|
|000059c0| 2c 20 73 69 7a 65 6f 66 | 20 28 75 5f 6c 6f 6e 67 |, sizeof| (u_long|
|000059d0| 29 2c 20 78 64 72 5f 75 | 5f 6c 6f 6e 67 29 20 26 |), xdr_u|_long) &|
|000059e0| 26 0a 58 09 09 78 64 72 | 5f 75 5f 6c 6f 6e 67 28 |&.X..xdr|_u_long(|
|000059f0| 78 64 72 73 2c 20 26 63 | 72 70 2d 3e 72 65 73 75 |xdrs, &c|rp->resu|
|00005a00| 6c 74 73 6c 65 6e 29 29 | 0a 58 09 09 72 65 74 75 |ltslen))|.X..retu|
|00005a10| 72 6e 20 28 28 2a 28 63 | 72 70 2d 3e 78 64 72 5f |rn ((*(c|rp->xdr_|
|00005a20| 72 65 73 75 6c 74 73 29 | 29 28 78 64 72 73 2c 20 |results)|)(xdrs, |
|00005a30| 63 72 70 2d 3e 72 65 73 | 75 6c 74 73 5f 70 74 72 |crp->res|ults_ptr|
|00005a40| 29 29 3b 0a 58 09 72 65 | 74 75 72 6e 20 28 46 41 |));.X.re|turn (FA|
|00005a50| 4c 53 45 29 3b 0a 58 7d | 0a 58 0a 58 2f 2a 0a 58 |LSE);.X}|.X.X/*.X|
|00005a60| 20 2a 20 54 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 | * The f|ollowing|
|00005a70| 20 69 73 20 6b 6c 75 64 | 67 65 64 2d 75 70 20 73 | is klud|ged-up s|
|00005a80| 75 70 70 6f 72 74 20 66 | 6f 72 20 73 69 6d 70 6c |upport f|or simpl|
|00005a90| 65 20 72 70 63 20 62 72 | 6f 61 64 63 61 73 74 73 |e rpc br|oadcasts|
|00005aa0| 2e 0a 58 20 2a 20 53 6f | 6d 65 64 61 79 20 61 20 |..X * So|meday a |
|00005ab0| 6c 61 72 67 65 2c 20 63 | 6f 6d 70 6c 69 63 61 74 |large, c|omplicat|
|00005ac0| 65 64 20 73 79 73 74 65 | 6d 20 77 69 6c 6c 20 72 |ed syste|m will r|
|00005ad0| 65 70 6c 61 63 65 20 74 | 68 65 73 65 20 74 72 69 |eplace t|hese tri|
|00005ae0| 76 69 61 6c 20 0a 58 20 | 2a 20 72 6f 75 74 69 6e |vial .X |* routin|
|00005af0| 65 73 20 77 68 69 63 68 | 20 6f 6e 6c 79 20 73 75 |es which| only su|
|00005b00| 70 70 6f 72 74 20 75 64 | 70 2f 69 70 20 2e 0a 58 |pport ud|p/ip ..X|
|00005b10| 20 2a 2f 0a 58 0a 58 73 | 74 61 74 69 63 20 69 6e | */.X.Xs|tatic in|
|00005b20| 74 0a 58 67 65 74 62 72 | 6f 61 64 63 61 73 74 6e |t.Xgetbr|oadcastn|
|00005b30| 65 74 73 28 61 64 64 72 | 73 2c 20 73 6f 63 6b 2c |ets(addr|s, sock,|
|00005b40| 20 62 75 66 29 0a 58 09 | 73 74 72 75 63 74 20 69 | buf).X.|struct i|
|00005b50| 6e 5f 61 64 64 72 20 2a | 61 64 64 72 73 3b 0a 58 |n_addr *|addrs;.X|
|00005b60| 09 69 6e 74 20 73 6f 63 | 6b 3b 20 20 2f 2a 20 61 |.int soc|k; /* a|
|00005b70| 6e 79 20 76 61 6c 69 64 | 20 73 6f 63 6b 65 74 20 |ny valid| socket |
|00005b80| 77 69 6c 6c 20 64 6f 20 | 2a 2f 0a 58 09 63 68 61 |will do |*/.X.cha|
|00005b90| 72 20 2a 62 75 66 3b 20 | 20 2f 2a 20 77 68 79 20 |r *buf; | /* why |
|00005ba0| 61 6c 6c 6f 63 78 61 74 | 65 20 6d 6f 72 65 20 77 |allocxat|e more w|
|00005bb0| 68 65 6e 20 77 65 20 63 | 61 6e 20 75 73 65 20 65 |hen we c|an use e|
|00005bc0| 78 69 73 74 69 6e 67 2e | 2e 2e 20 2a 2f 0a 58 7b |xisting.|.. */.X{|
|00005bd0| 0a 58 09 73 74 72 75 63 | 74 20 69 66 63 6f 6e 66 |.X.struc|t ifconf|
|00005be0| 20 69 66 63 3b 0a 58 20 | 20 20 20 20 20 20 20 73 | ifc;.X | s|
|00005bf0| 74 72 75 63 74 20 69 66 | 72 65 71 20 69 66 72 65 |truct if|req ifre|
|00005c00| 71 2c 20 2a 69 66 72 3b | 0a 58 09 73 74 72 75 63 |q, *ifr;|.X.struc|
|00005c10| 74 20 73 6f 63 6b 61 64 | 64 72 5f 69 6e 20 2a 73 |t sockad|dr_in *s|
|00005c20| 69 6e 3b 0a 58 20 20 20 | 20 20 20 20 20 69 6e 74 |in;.X | int|
|00005c30| 20 6e 2c 20 69 3b 0a 58 | 0a 58 09 69 66 63 2e 69 | n, i;.X|.X.ifc.i|
|00005c40| 66 63 5f 6c 65 6e 20 3d | 20 4d 41 58 5f 42 52 4f |fc_len =| MAX_BRO|
|00005c50| 41 44 43 41 53 54 5f 53 | 49 5a 45 3b 0a 58 20 20 |ADCAST_S|IZE;.X |
|00005c60| 20 20 20 20 20 20 69 66 | 63 2e 69 66 63 5f 62 75 | if|c.ifc_bu|
|00005c70| 66 20 3d 20 62 75 66 3b | 0a 58 20 20 20 20 20 20 |f = buf;|.X |
|00005c80| 20 20 69 66 20 28 69 6f | 63 74 6c 28 73 6f 63 6b | if (io|ctl(sock|
|00005c90| 2c 20 53 49 4f 43 47 49 | 46 43 4f 4e 46 2c 20 28 |, SIOCGI|FCONF, (|
|00005ca0| 63 68 61 72 20 2a 29 26 | 69 66 63 29 20 3c 20 30 |char *)&|ifc) < 0|
|00005cb0| 29 20 7b 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 |) {.X | |
|00005cc0| 20 20 20 20 20 70 65 72 | 72 6f 72 28 22 62 72 6f | per|ror("bro|
|00005cd0| 61 64 63 61 73 74 3a 20 | 69 6f 63 74 6c 20 28 67 |adcast: |ioctl (g|
|00005ce0| 65 74 20 69 6e 74 65 72 | 66 61 63 65 20 63 6f 6e |et inter|face con|
|00005cf0| 66 69 67 75 72 61 74 69 | 6f 6e 29 22 29 3b 0a 58 |figurati|on)");.X|
|00005d00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005d10| 72 65 74 75 72 6e 20 28 | 30 29 3b 0a 58 20 20 20 |return (|0);.X |
|00005d20| 20 20 20 20 20 7d 0a 58 | 20 20 20 20 20 20 20 20 | }.X| |
|00005d30| 69 66 72 20 3d 20 69 66 | 63 2e 69 66 63 5f 72 65 |ifr = if|c.ifc_re|
|00005d40| 71 3b 0a 58 20 20 20 20 | 20 20 20 20 66 6f 72 20 |q;.X | for |
|00005d50| 28 69 20 3d 20 30 2c 20 | 6e 20 3d 20 69 66 63 2e |(i = 0, |n = ifc.|
|00005d60| 69 66 63 5f 6c 65 6e 2f | 73 69 7a 65 6f 66 20 28 |ifc_len/|sizeof (|
|00005d70| 73 74 72 75 63 74 20 69 | 66 72 65 71 29 3b 20 6e |struct i|freq); n|
|00005d80| 20 3e 20 30 3b 20 6e 2d | 2d 2c 20 69 66 72 2b 2b | > 0; n-|-, ifr++|
|00005d90| 29 20 7b 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 |) {.X | |
|00005da0| 20 20 20 20 20 69 66 72 | 65 71 20 3d 20 2a 69 66 | ifr|eq = *if|
|00005db0| 72 3b 0a 58 20 20 20 20 | 20 20 20 20 20 20 20 20 |r;.X | |
|00005dc0| 20 20 20 20 69 66 20 28 | 69 6f 63 74 6c 28 73 6f | if (|ioctl(so|
|00005dd0| 63 6b 2c 20 53 49 4f 43 | 47 49 46 46 4c 41 47 53 |ck, SIOC|GIFFLAGS|
|00005de0| 2c 20 28 63 68 61 72 20 | 2a 29 26 69 66 72 65 71 |, (char |*)&ifreq|
|00005df0| 29 20 3c 20 30 29 20 7b | 0a 58 20 20 20 20 20 20 |) < 0) {|.X |
|00005e00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005e10| 20 20 70 65 72 72 6f 72 | 28 22 62 72 6f 61 64 63 | perror|("broadc|
|00005e20| 61 73 74 3a 20 69 6f 63 | 74 6c 20 28 67 65 74 20 |ast: ioc|tl (get |
|00005e30| 69 6e 74 65 72 66 61 63 | 65 20 66 6c 61 67 73 29 |interfac|e flags)|
|00005e40| 22 29 3b 0a 58 20 20 20 | 20 20 20 20 20 20 20 20 |");.X | |
|00005e50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 63 6f 6e | | con|
|00005e60| 74 69 6e 75 65 3b 0a 58 | 20 20 20 20 20 20 20 20 |tinue;.X| |
|00005e70| 20 20 20 20 20 20 20 20 | 7d 0a 58 20 20 20 20 20 | |}.X |
|00005e80| 20 20 20 20 20 20 20 20 | 20 20 20 69 66 20 28 28 | | if ((|
|00005e90| 69 66 72 65 71 2e 69 66 | 72 5f 66 6c 61 67 73 20 |ifreq.if|r_flags |
|00005ea0| 26 20 49 46 46 5f 42 52 | 4f 41 44 43 41 53 54 29 |& IFF_BR|OADCAST)|
|00005eb0| 20 26 26 0a 58 09 09 20 | 20 20 20 28 69 66 72 65 | &&.X.. | (ifre|
|00005ec0| 71 2e 69 66 72 5f 66 6c | 61 67 73 20 26 20 49 46 |q.ifr_fl|ags & IF|
|00005ed0| 46 5f 55 50 29 20 26 26 | 0a 58 09 09 20 20 20 20 |F_UP) &&|.X.. |
|00005ee0| 69 66 72 2d 3e 69 66 72 | 5f 61 64 64 72 2e 73 61 |ifr->ifr|_addr.sa|
|00005ef0| 5f 66 61 6d 69 6c 79 20 | 3d 3d 20 41 46 5f 49 4e |_family |== AF_IN|
|00005f00| 45 54 29 20 7b 0a 58 20 | 20 20 20 20 20 20 20 20 |ET) {.X | |
|00005f10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 73 | | s|
|00005f20| 69 6e 20 3d 20 28 73 74 | 72 75 63 74 20 73 6f 63 |in = (st|ruct soc|
|00005f30| 6b 61 64 64 72 5f 69 6e | 20 2a 29 26 69 66 72 2d |kaddr_in| *)&ifr-|
|00005f40| 3e 69 66 72 5f 61 64 64 | 72 3b 0a 58 09 09 09 61 |>ifr_add|r;.X...a|
|00005f50| 64 64 72 73 5b 69 2b 2b | 5d 20 3d 20 69 6e 65 74 |ddrs[i++|] = inet|
|00005f60| 5f 6d 61 6b 65 61 64 64 | 72 28 69 6e 65 74 5f 6e |_makeadd|r(inet_n|
|00005f70| 65 74 6f 66 0a 58 09 09 | 09 20 20 20 20 28 73 69 |etof.X..|. (si|
|00005f80| 6e 2d 3e 73 69 6e 5f 61 | 64 64 72 2e 73 5f 61 64 |n->sin_a|ddr.s_ad|
|00005f90| 64 72 29 2c 20 49 4e 41 | 44 44 52 5f 41 4e 59 29 |dr), INA|DDR_ANY)|
|00005fa0| 3b 0a 58 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;.X | |
|00005fb0| 20 20 20 7d 0a 58 20 20 | 20 20 20 20 20 20 7d 0a | }.X | }.|
|00005fc0| 58 09 72 65 74 75 72 6e | 20 28 69 29 3b 0a 58 7d |X.return| (i);.X}|
|00005fd0| 0a 58 0a 58 74 79 70 65 | 64 65 66 20 62 6f 6f 6c |.X.Xtype|def bool|
|00005fe0| 5f 74 20 28 2a 72 65 73 | 75 6c 74 70 72 6f 63 5f |_t (*res|ultproc_|
|00005ff0| 74 29 28 29 3b 0a 58 0a | 58 65 6e 75 6d 20 63 6c |t)();.X.|Xenum cl|
|00006000| 6e 74 5f 73 74 61 74 20 | 0a 58 63 6c 6e 74 5f 62 |nt_stat |.Xclnt_b|
|00006010| 72 6f 61 64 63 61 73 74 | 28 70 72 6f 67 2c 20 76 |roadcast|(prog, v|
|00006020| 65 72 73 2c 20 70 72 6f | 63 2c 20 78 61 72 67 73 |ers, pro|c, xargs|
|00006030| 2c 20 61 72 67 73 70 2c | 20 78 72 65 73 75 6c 74 |, argsp,| xresult|
|00006040| 73 2c 20 72 65 73 75 6c | 74 73 70 2c 20 65 61 63 |s, resul|tsp, eac|
|00006050| 68 72 65 73 75 6c 74 29 | 0a 58 09 75 5f 6c 6f 6e |hresult)|.X.u_lon|
|00006060| 67 09 09 70 72 6f 67 3b | 09 09 2f 2a 20 70 72 6f |g..prog;|../* pro|
|00006070| 67 72 61 6d 20 6e 75 6d | 62 65 72 20 2a 2f 0a 58 |gram num|ber */.X|
|00006080| 09 75 5f 6c 6f 6e 67 09 | 09 76 65 72 73 3b 09 09 |.u_long.|.vers;..|
|00006090| 2f 2a 20 76 65 72 73 69 | 6f 6e 20 6e 75 6d 62 65 |/* versi|on numbe|
|000060a0| 72 20 2a 2f 0a 58 09 75 | 5f 6c 6f 6e 67 09 09 70 |r */.X.u|_long..p|
|000060b0| 72 6f 63 3b 09 09 2f 2a | 20 70 72 6f 63 65 64 75 |roc;../*| procedu|
|000060c0| 72 65 20 6e 75 6d 62 65 | 72 20 2a 2f 0a 58 09 78 |re numbe|r */.X.x|
|000060d0| 64 72 70 72 6f 63 5f 74 | 09 78 61 72 67 73 3b 09 |drproc_t|.xargs;.|
|000060e0| 09 2f 2a 20 78 64 72 20 | 72 6f 75 74 69 6e 65 20 |./* xdr |routine |
|000060f0| 66 6f 72 20 61 72 67 73 | 20 2a 2f 0a 58 09 63 61 |for args| */.X.ca|
|00006100| 64 64 72 5f 74 09 09 61 | 72 67 73 70 3b 09 09 2f |ddr_t..a|rgsp;../|
|00006110| 2a 20 70 6f 69 6e 74 65 | 72 20 74 6f 20 61 72 67 |* pointe|r to arg|
|00006120| 73 20 2a 2f 0a 58 09 78 | 64 72 70 72 6f 63 5f 74 |s */.X.x|drproc_t|
|00006130| 09 78 72 65 73 75 6c 74 | 73 3b 09 2f 2a 20 78 64 |.xresult|s;./* xd|
|00006140| 72 20 72 6f 75 74 69 6e | 65 20 66 6f 72 20 72 65 |r routin|e for re|
|00006150| 73 75 6c 74 73 20 2a 2f | 0a 58 09 63 61 64 64 72 |sults */|.X.caddr|
|00006160| 5f 74 09 09 72 65 73 75 | 6c 74 73 70 3b 09 2f 2a |_t..resu|ltsp;./*|
|00006170| 20 70 6f 69 6e 74 65 72 | 20 74 6f 20 72 65 73 75 | pointer| to resu|
|00006180| 6c 74 73 20 2a 2f 0a 58 | 09 72 65 73 75 6c 74 70 |lts */.X|.resultp|
|00006190| 72 6f 63 5f 74 09 65 61 | 63 68 72 65 73 75 6c 74 |roc_t.ea|chresult|
|000061a0| 3b 09 2f 2a 20 63 61 6c | 6c 20 77 69 74 68 20 65 |;./* cal|l with e|
|000061b0| 61 63 68 20 72 65 73 75 | 6c 74 20 6f 62 74 61 69 |ach resu|lt obtai|
|000061c0| 6e 65 64 20 2a 2f 0a 58 | 7b 0a 58 09 65 6e 75 6d |ned */.X|{.X.enum|
|000061d0| 20 63 6c 6e 74 5f 73 74 | 61 74 20 73 74 61 74 3b | clnt_st|at stat;|
|000061e0| 0a 58 09 41 55 54 48 20 | 2a 75 6e 69 78 5f 61 75 |.X.AUTH |*unix_au|
|000061f0| 74 68 20 3d 20 61 75 74 | 68 75 6e 69 78 5f 63 72 |th = aut|hunix_cr|
|00006200| 65 61 74 65 5f 64 65 66 | 61 75 6c 74 28 29 3b 0a |eate_def|ault();.|
|00006210| 58 09 58 44 52 20 78 64 | 72 5f 73 74 72 65 61 6d |X.XDR xd|r_stream|
|00006220| 3b 0a 58 09 72 65 67 69 | 73 74 65 72 20 58 44 52 |;.X.regi|ster XDR|
|00006230| 20 2a 78 64 72 73 20 3d | 20 26 78 64 72 5f 73 74 | *xdrs =| &xdr_st|
|00006240| 72 65 61 6d 3b 0a 58 09 | 69 6e 74 20 6f 75 74 6c |ream;.X.|int outl|
|00006250| 65 6e 2c 20 69 6e 6c 65 | 6e 2c 20 66 72 6f 6d 6c |en, inle|n, froml|
|00006260| 65 6e 2c 20 72 65 61 64 | 66 64 73 2c 20 6e 65 74 |en, read|fds, net|
|00006270| 73 3b 0a 58 09 72 65 67 | 69 73 74 65 72 20 69 6e |s;.X.reg|ister in|
|00006280| 74 20 73 6f 63 6b 2c 20 | 6d 61 73 6b 2c 20 69 3b |t sock, |mask, i;|
|00006290| 0a 58 09 62 6f 6f 6c 5f | 74 20 64 6f 6e 65 20 3d |.X.bool_|t done =|
|000062a0| 20 46 41 4c 53 45 3b 0a | 58 09 72 65 67 69 73 74 | FALSE;.|X.regist|
|000062b0| 65 72 20 75 5f 6c 6f 6e | 67 20 78 69 64 3b 0a 58 |er u_lon|g xid;.X|
|000062c0| 09 75 5f 6c 6f 6e 67 20 | 70 6f 72 74 3b 0a 58 09 |.u_long |port;.X.|
|000062d0| 73 74 72 75 63 74 20 69 | 6e 5f 61 64 64 72 20 61 |struct i|n_addr a|
|000062e0| 64 64 72 73 5b 32 30 5d | 3b 0a 58 09 73 74 72 75 |ddrs[20]|;.X.stru|
|000062f0| 63 74 20 73 6f 63 6b 61 | 64 64 72 5f 69 6e 20 62 |ct socka|ddr_in b|
|00006300| 61 64 64 72 2c 20 72 61 | 64 64 72 3b 20 2f 2a 20 |addr, ra|ddr; /* |
|00006310| 62 72 6f 61 64 63 61 73 | 74 20 61 6e 64 20 72 65 |broadcas|t and re|
|00006320| 73 70 6f 6e 73 65 20 61 | 64 64 72 65 73 73 65 73 |sponse a|ddresses|
|00006330| 20 2a 2f 0a 58 09 73 74 | 72 75 63 74 20 72 6d 74 | */.X.st|ruct rmt|
|00006340| 63 61 6c 6c 61 72 67 73 | 20 61 3b 0a 58 09 73 74 |callargs| a;.X.st|
|00006350| 72 75 63 74 20 72 6d 74 | 63 61 6c 6c 72 65 73 20 |ruct rmt|callres |
|00006360| 72 3b 0a 58 09 73 74 72 | 75 63 74 20 72 70 63 5f |r;.X.str|uct rpc_|
|00006370| 6d 73 67 20 6d 73 67 3b | 0a 58 09 73 74 72 75 63 |msg msg;|.X.struc|
|00006380| 74 20 74 69 6d 65 76 61 | 6c 20 74 3b 20 0a 58 09 |t timeva|l t; .X.|
|00006390| 63 68 61 72 20 6f 75 74 | 62 75 66 5b 4d 41 58 5f |char out|buf[MAX_|
|000063a0| 42 52 4f 41 44 43 41 53 | 54 5f 53 49 5a 45 5d 2c |BROADCAS|T_SIZE],|
|000063b0| 20 69 6e 62 75 66 5b 4d | 41 58 5f 42 52 4f 41 44 | inbuf[M|AX_BROAD|
|000063c0| 43 41 53 54 5f 53 49 5a | 45 5d 3b 0a 58 0a 58 09 |CAST_SIZ|E];.X.X.|
|000063d0| 2f 2a 0a 58 09 20 2a 20 | 69 6e 69 74 69 61 6c 69 |/*.X. * |initiali|
|000063e0| 7a 61 74 69 6f 6e 3a 20 | 63 72 65 61 74 65 20 61 |zation: |create a|
|000063f0| 20 73 6f 63 6b 65 74 2c | 20 61 20 62 72 6f 61 64 | socket,| a broad|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.