D7net Mini Sh3LL v1
Current File : //media/../../usr/share/doc/zlib1g/../at/../openssh-client/../plymouth/../lvm2/../socat/PORTING |
DEVELOPMENT PLATFORMS
Primary development platform for socat is currently SuSE Linux 8.2 with
a 2.4.20 kernel. New features are then ported to the non-Linux platforms on the
Sourceforge compile farm (per July 2003: SunOS 5.8 with gcc, and MacOS X 10.2),
and AIX 5.1 with gcc. But due to limited time resources and restricted
(non-root) access to these systems I cannot extensively test socat there.
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".
. 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 in the
Config directory of the source that 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 most 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 ASCII for binary search)
. filan.c: add the option to the appropriate array (sockopts, ipopts,
tcpopts)
. socat.html, socat.1, xio.help: write a short documentation and tell which
platform and version implements this option
* 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.
AnonSec - 2021 | Recode By D7net