Re: [dev] debugging sj

From: Jan Klemkow <j.klemkow_AT_wemelug.de>
Date: Fri, 4 Dec 2015 06:57:34 +0100

On Tue, Dec 01, 2015 at 11:35:46AM -0500, Greg Reagle wrote:
> On 12/01/2015 10:55 AM, Greg Reagle wrote:
> >I don't experience any bugs in sj, but I would like to see the raw XML
> >messages that are sent back and forth via sj, messaged, iqd, and
> >presenced, in order to be able to understand better.
> >
> >These programs write to "in" files (named pipes). So what is the best
> >(easiest, most convenient) way to get this info?
> >
> >I could add debug-guarded printf statements all over the code. What
> >about using the tee command? That seems like that might work
> >conceptually, but I don't have the expertise to know how to do this.
>
> I discovered strace, which does the job.

I wrote ucspi-tee[1] to do this job for me. But I think there is a
similar tool of djb's tool chain, that does it, too.

If you want to see all XMPP traffic, you should try to avoid the
STARTTLS negotiation of sj itself. Try to connect directly to a TLS
port like 5223 of jabber.ccc.de.

If you just want to see the traffic thats happend after the STARTTLS
negotiation, you could also extend the argument list that sj uses to
start tlsc. Just insert "ucspi-tee" as the second argument. That
should work. (and don't forget to extend the argument list length)

[1]: https://github.com/younix/ucspi/blob/master/ucspi-tee.c
Received on Fri Dec 04 2015 - 06:57:34 CET

This archive was generated by hypermail 2.3.0 : Fri Dec 04 2015 - 07:00:11 CET