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