You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
3.0 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. DEVELOPMENT PLATFORMS
  2. Primary development platform for socat is currently SuSE Linux 8.2 with
  3. a 2.4.20 kernel. New features are then ported to the non-Linux platforms on the
  4. Sourceforge compile farm (per July 2003: SunOS 5.8 with gcc, and MacOS X 10.2),
  5. and AIX 5.1 with gcc. But due to limited time resources and restricted
  6. (non-root) access to these systems I cannot extensively test socat there.
  7. PORTING STEPS
  8. If you want to port socat to another operating system you will typically go
  9. through two phases: First, you might just try to compile and run the actual
  10. socat distribution (passive phase). Then, you should see if your platform
  11. has some nice features that are not yet used in socat, and add code for
  12. supporting them (active phase). At last, I encourage you to send me your
  13. changes so I can integrate them into the main socat distribution.
  14. PASSIVE PHASE:
  15. * Generate Makefile and config.h:
  16. . If you have gcc, then just invoke "./configure".
  17. . If you use another C compiler, configure might not work properly;
  18. You will have to adapt config.h and Makefile manually.
  19. Change compiler options or defines to use all features of the operating
  20. system (not only ANSI-C; e.g. HP-UX: -Ae!)
  21. Some practical config.<platform>.h examples have been included in the
  22. Config directory of the source that might serve as starting point.
  23. * Try to "make" socat; correct the errors. If some constants are undefined,
  24. please disable these parts option-dependent, not platform-dependent (use
  25. #ifdef TCP_OPTION instead of #if MY_OS)
  26. * If you have big troubles compiling socat then try configure with options
  27. --disable-filan --disable-sycls; this excludes some of the most system
  28. dependent parts.
  29. * After successful compilation and linking, run "make test" and try some
  30. examples.
  31. ACTIVE PHASE:
  32. * Check the man pages of your operating system for open(2), fcntl(2),
  33. setsockopt(2), ioctl(2), socket(7), ip(7), tcp(7), termios etc. and the
  34. include files where you find the definitions of existing options, for new
  35. options and implement them - again option-dependent.
  36. Places to add code for the new options:
  37. . xioopts.h: enum e_optcode (sorted numerically/alphabetically by name)
  38. . xio-*.c: select the appropriate address file (e.g., xio-tcp.c for
  39. TCP-options) and make a record of type struct optdesc: opt_newoption
  40. . xio-*.h: the declation of struct optdesc
  41. . xioopts.c: add records to struct optname optionnames for all appropriate
  42. names (sorted strictly ASCII for binary search)
  43. . filan.c: add the option to the appropriate array (sockopts, ipopts,
  44. tcpopts)
  45. . socat.html, socat.1, xio.help: write a short documentation and tell which
  46. platform and version implements this option
  47. * problems may occur especially:
  48. . with 16 or 64 bit systems
  49. . if snprintf() etc. is missing
  50. . on UNIX emulations, e.g. Cygwin
  51. INTEGRATION
  52. * If you ported socat to another platform:
  53. To let other people participate please send the modified files or a patch
  54. file and the files generated by ./gatherinfo.sh to socat@dest-unreach.org.