Recent Changes - Search:

Network Programming

This website demonstrates using wikis as teaching and learning tool.

The course instructor is happy to share the teaching materials here with those who find it readable.

Tutorial - Unix Network Programming - RPC

Overview : In this tutorial, you will access your UNIX account to test some RPC programs.


Activity 1: Install PuTTY (an SSH/telnet client)

PuTTY is an SSH and telnet client, developed originally by Simon Tatham for the Windows platform.

Activity 2: Telnet/SSH your UNIX account

  • Use PuTTY to access your UNIX account.
  • Try the following UNIX commands
      cal      Display a calendar
      ls       List information about file(s)
      mkdir    Create new folder(s)
      passwd   Modify a user password
      ps       Process status
      pwd      Print Working Directory
Reference: http://ss64.com/bash/ - An A-Z Index of the Bash command line for Linux.

Activity 3: Install FileZilla (a FTP client)

FileZilla is an open Source (GNU/GPL) FTP client for your computer.

Activity 4: Put some files in your UNIX account

  • Use FileZilla to access your UNIX account.
  • You can use Port 21 (FTP) or Port 22 (SSH) in your connection.
  • Put all the sample RPC program shown in this lecture in your UNIX account.

Activity 5: Compile and test RPC programs

      >rpcgen date.x

      >cc –c chkdate.c chkdate.o
      >cc –c date_clnt.c date_clnt.o
      >cc –o chkdate chkdate.o date_clnt.o -lrpc

      >cc –c date_server.c date_server.o
      >cc –c date_svc.c date_svc.o
      >cc –o date_server date_server.o date_svc.o -lrpc

      >./date_server &

      >./chkdate localhost

Activity 6: More RPC testing


Remark: Assign your own program number to aviod conflict with your classmates

  • The program numbers are 32-bit integers that are assigned as follows:
      0x00000000 — 0x1fffffff is defined by Sun machine.
      0x20000000 — 0x3fffffff is defined by users.
      0x40000000 — 0x5fffffff is for transient.
      0x60000000 — 0xffffffff is reserved for future use.

Submission

  • You need to demonstrate your work to Steven in a tutorial session. Steven may ask you some questions to test your knowledge.
Edit - History - Print - Recent Changes - Search
Page last modified on December 08, 2009, at 11:53 AM