1 Use the following configuration file, tcp.1.conf:
5 Now mount it, and cat the contents of /p/tcp/localhost/daytime:
7 % mount_portal /usr/share/examples/mount_portal/tcp.1.conf `pwd`/portal
8 % cat portal/tcp/localhost/daytime
9 Thu Aug 5 23:31:21 1999
11 Philosophy: With a pathname of <path to mountpount>/tcp/a/b[/priv],
12 the portal daemon opens a connection to host a, port b. If /priv
13 is specified, the socket will be created via rresvport(), rather
16 For the above example, we open a connection to the daytime port
17 (port 13, according to /etc/services), and read data.
20 Advanced usage: finger
21 Using the already-mounted portal file system, open a connection
22 to the finger daemon, and do a finger. Use the simple C program
23 in fing.c in this directory.
28 Login Name Tty Idle Login Time Office Office Phone
29 bgrayson Brian C. Grayson p0 - Thu 22:31 ENS406
30 bgrayson Brian C. Grayson p1 10 Thu 22:32 ENS406
31 bgrayson Brian C. Grayson p2 - Thu 23:20 ENS406
33 Login: root Name: Root @ marvin
34 Directory: /root Shell: /bin/tcsh
35 Last login Wed Aug 4 18:11 (CDT) on ttyp1 from c3p0.ece.utexas.
38 Philosophy: fing.c opens portal/tcp/localhost/finger as a
39 read-write file. First, we write the username for the finger (or
40 a blank line to see all users), then we read the results sent