This README is written supposing the current directory is located in ~/Matlab-HSN/
From the current directory enter the source directory under addons directory
  $ cd ./addons/source/

Extract the TCP/UDP/IP Toolkit sourcecode
  $ unzip tcp_udp_ip_*.zip

enter the source directory
  $ cd tcp_udp_ip

and use the mex tool (part of the matlab installation) to compile the toolkit.
  $ mex pnet.c

if some compiling error occurs modify the mex compiling options file
  $ vi ~/.matlab/<CurrentMatlabVersion>/mexopts.sh

where <CurrentMatlabVersion> depends on the matlab version installed on the system.
Remove from the "-ansi" option from CFLAGS and CXXFLAGS variables for the target architecture.

Once compiled a pnet.mex<TargetArchitecture> file is obtained. where <TargetArchitecture> depends on the architecture

  +--------------------+------------------+
  |  <Architecture>    | <File Extension> | 
  +--------------------+------------------+
  | Linux (32-bit)     |     mexglx       |
  | Linux (64-bit)     |     mexa64       |
  | Macintosh (32-bit) |     mexmaci      |
  | Macintosh (64-bit) |     mexmaci64    |
  | Windows (32-bit)   |     mexw32       |
  | Windows (64-bit)   |     mexw64       |
  +--------------------+------------------+

if mexopts.sh is empty create one from the system default
  $ sed s/-ansi// `locate -l1 mexopts.sh` > ~/.matlab/<CurrentMatlabVersion>/mexopts.sh

if the previous command gives you an error try starting Matlab in order to create the per-user configuration directory
  $ matlab -nosplash -nodesktop

and try again.
Once successfully compiled copy the mex file and the pnet help file in the Matlab-HSN work directory.
  $ cp pnet.mex<TargetArchitecture> pnet.m ~/Matlab-HSN/addons

