redir-2.2.1をSolaris10でコンパイル

gcc -lnsl -lsocket redir.c -o redir

こうやんないとコンパイルできなかった、という俺メモ。

配布元はこちら。
http://sammy.net/~sammy/hacks/index.html

READMEファイルによると

Redir is a port redirector.  It's functionally basically consists of
the ability to listen for TCP connections on a given port, and, when
it recieves a connection, to then connect to a given destination
address/port, and pass data between them.  It finds most of its
applications in traversing firewalls, but, of course, there are other
uses.  Consult the man page, or run with no options for usage information.

とあって、超いい加減に要約すると、「Redirはポートリダイレクタ。TCPコネクションをヨソにリダイレクトできるすぐれものだよ」ということ。

便利だよ。