Here's the source code of netlog.irx. I developed it originally for debugging purposes and to get used to IOP/RPC programming.
From the README:
netlog-iop+ee-1.1.tar.gzCode:netlog 1.1 - Copyright (C) 2009 misfire <misfire@xploderfreax.de> DESCRIPTION The netlog IOP module allows you to send (UDP) log messages to a remote host. USAGE Simply execute SifLoadModule() or use ps2client to run netlog. $ ps2client -t 1 execiop host:netlog.irx To use the service from your IRX, add netlog.h to your irx_imports.h file. Also, add the following to imports.lst: netlog_IMPORTS_start I_netlog_init I_netlog_exit I_netlog_send netlog_IMPORTS_end Call those functions inside your IRX to init the netlog service and start sending log messages. Please note that netlog_send() does NOT support floating point format specifiers like %f. On the remote host, you can use netcat to grab the log messages in UDP mode. Example: $ nc -l -u -p 7411 The messages should appear on the screen. RPC netlog comes with an RPC interface. To enable it, define NETLOG_RPC inside the Makefile. LICENSE netlog is licensed under the AFL v2.0. See file LICENSE.



Reply With Quote
