
DEVELOPMENT PLATFORMS

Primary development platform for socat is currently SuSE Linux 7.3 with
a 2.4.10 kernel. New features are then ported to AIX 4.3.3 with gcc, and AIX
4.1.5 with gcc. These are the platforms that I have total access to, including
root privilege - this is required for comprehensive testing. With sourceforge,
I try to compile and run socat on SunOS 5.8, FreeBSD 4.4, and MacOSX 10.1. But
due to limited time resources I cannot extensively test socat there, nor do I
have root access. 


PORTING STEPS

If you want to port socat to another operating system you will typically go
through two phases: First, you might just try to compile and run the actual
socat distribution (passive phase). Then, you should see if your platform
has some nice features that are not yet used in socat, and add code for
supporting them (active phase). At last, I encourage you to send me your
changes so I can integrate them into the main socat distribution.


PASSIVE PHASE:

* Generate Makefile and config.h:
  . If you have gcc, then just invoke "./configure" and "make".
    configure looks for a file /usr/include/netinet/ip6.h to enable IPv6
    feature. 
  . If you use another C compiler, configure might not work properly;
    You will have to adapt config.h and Makefile manually.
    Change compiler options or defines to use all features of the operating
    system (not only ANSI-C; e.g. HP-UX: -Ae!)
    Some practical config.<platform>.h examples have been included which might 
    serve as starting point.

* Try to "make" socat; correct the errors. If some constants are undefined,
  please disable these parts option-dependent, not platform-dependent (use
  #ifdef TCP_OPTION  instead of  #if MY_OS)

* If you have big troubles compiling socat then try configure with options 
  --disable-filan --disable-sycls; this excludes some of the more system 
  dependent parts.

* After successful compilation and linking, run "make test" and try some
  examples.


ACTIVE PHASE:

* Check the man pages of your operating system for open(2), fcntl(2),
  setsockopt(2), ioctl(2), socket(7), ip(7), tcp(7), termios etc. and the
  include files where you find the definitions of existing options, for new
  options and implement them - again option-dependent.
  Places to add code for the new options: 
  . xioopts.h: enum e_optcode  (sorted numerically/alphabetically by name)
  . xio-*.c: select the appropriate address file (e.g., xio-tcp.c for
    TCP-options) and make a record of type struct optdesc: opt_newoption
  . xio-*.h: the declation of struct optdesc
  . xioopts.c: add records to  struct optname optionnames  for all appropriate
    names (sorted strictly alphabetically for binary search)
  . filan.c: add the option to the appropriate array (sockopts, ipopts,
    tcpopts) 
  . xio.help.template: write a short documentation and tell which platform and
    version implements this option, with templates as found with the existing
    optios

* problems may occur especially:
  . with 16 or 64 bit systems
  . if snprintf() etc. is missing
  . on UNIX emulations, e.g. Cygwin


INTEGRATION

* If you ported socat to another platform:
  To let other people participate please send the modified files or a patch
  file and the files generated by ./gatherinfo.sh to socat@dest-unreach.org.
