Gerhard Rieger | b819572 | 2008-01-27 13:00:08 +0100 | [diff] [blame] | 1 | |
| 2 | Q: What is the clue of socat? |
| 3 | |
| 4 | A: socat probably doesn't have any clue. It is more an attempt to smoothly |
| 5 | integrate similar I/O features that are usually handled differently under |
| 6 | UNIX. |
| 7 | |
| 8 | |
| 9 | Q: What does the prefix XIO mean? |
| 10 | |
| 11 | A: XIO means "extended input/output". It is a library/API that provides a |
| 12 | common way for handling files, sockets and other forms of I/O. Its advantage is |
| 13 | that the application may reduce its I/O to open / read+write / close calls, |
| 14 | while the user controls all I/O details (and even basic process properties) by |
| 15 | packing options into the filename string. This is the basic part of socat. |
| 16 | |
| 17 | |
| 18 | Q: Is there a Windows port of socat available? |
| 19 | |
| 20 | A: Try with Cygwin from http://www.cygwin.com/, or upgrade to Linux. |
| 21 | |
| 22 | |
| 23 | Q: I succeeded to configure and make socat, but ./test.sh says something |
| 24 | like: |
| 25 | ./test.sh: No such file or directory |
| 26 | |
Gerhard Rieger | fbd72c2 | 2018-03-28 18:21:31 +0200 | [diff] [blame] | 27 | A: You need a bash shell in your executable path (locations in $PATH) |
Gerhard Rieger | b819572 | 2008-01-27 13:00:08 +0100 | [diff] [blame] | 28 | |
| 29 | |
| 30 | Q: configure disables readline / openssl / libwrap support because it does not |
| 31 | find an include file / the library. How can I tell configure where these files |
| 32 | are? |
| 33 | |
| 34 | A: For include locations, use the environment variable CPPFLAGS, for library |
| 35 | locations use LIBS, e.g.: |
| 36 | export CPPFLAGS="-I/home/user/ssl/include" |
| 37 | export LIBS="-L/home/user/ssl/lib" |
| 38 | On some systems (SunOS), you might also need to set LD_LIBRARY_PATH: |
| 39 | export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/user/ssl/lib" |
| 40 | Then try again: |
| 41 | make distclean; ./configure; make |
| 42 | |
| 43 | |
| 44 | Q: I succeeded to make socat, but the test.sh script fails for many tests. |
| 45 | Is my socat build corrupt? |
| 46 | |
| 47 | A: Probably your socat program is ok; the tests have been developed on Linux |
| 48 | 2.4, and there they usually succeed. |
| 49 | But the following OS differences result in errors on non Linux systems: |
| 50 | * Linux allows to bind a socket to any address of range 127.0.0.0/8, not |
| 51 | only 127.0.0.1. Some tests are built on this feature, but they might fail on |
| 52 | other systems. |
| 53 | * Your OS might have no IP6 implementation |
| 54 | * MacOS X has some difficulties, e.g. distinguishing sockets and pipes. |
| 55 | * the OpenSSL tests require OpenSSL support by socat, must have openssl in |
| 56 | $PATH, and "openssl s_server ..." needs enough entropy to generate a key. |
| 57 | |
| 58 | |
| 59 | Q: When I specify a dual address (two partial addresses linked with "!!") on |
| 60 | the command line, I get some message "event not found", and my shell history |
| 61 | has the line truncated. Not even protecting the '!'s with '\' helps. |
| 62 | |
| 63 | A: '!' is appearently used by your shell as history expansion character. Say |
| 64 | "set +H" and add this line to your (bash) profile. |
| 65 | |
| 66 | |
| 67 | Q: On Solaris, socat was built successfully, but when started, it gets killed |
| 68 | with something like "ld.so.1: ./socat: fatal: libreadline.so.4: open failed: no |
| 69 | such file or directory" |
| 70 | |
| 71 | A: The configure script finds your libreadline, but the runtime loader |
| 72 | doesn't. Add the directory where the library resides to your LD_LIBRARY_PATH |
| 73 | variable, e.g.: |
| 74 | LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/sfw/lib/ |
| 75 | make distclean; ./configure; make |
| 76 | |
| 77 | |
| 78 | Q: On Solaris, socat was built successfully, but when started, an assertion |
| 79 | fails: "xioinitialize.c:25: failed assertion `3 << opt_crdly.arg3 == CRDLY' |
| 80 | |
| 81 | A: Probably, in a second attempt you set the correct LD_LIBARY_PATH for socat, |
| 82 | but it had not been set during the ./configure run, or you did not "make clean" |
| 83 | before running configure. Try it again: |
| 84 | make distclean; ./configure; make |
Gerhard Rieger | 17600da | 2008-02-07 23:02:49 +0100 | [diff] [blame] | 85 | |
| 86 | |
| 87 | Q: A socat process, run in background from an interactive shell, is always |
| 88 | stopped with all its child processes after about 5 minutes. killall -9 socat is |
| 89 | required to clean the system and allow socat to be started again. |
| 90 | |
| 91 | A: The terminal (window) might have the TOSTOP flag set and one of the socat |
| 92 | processes wants to write to the terminal. Clear this flag in your shell: |
| 93 | stty -tostop |
| 94 | and start socat again. |
| 95 | Thanks to Philippe Teuwen for reporting this situation. |
| 96 | |