Suggestions on implementing Wayland Protocol Dumper.
Boyan Ding
stu_dby at 126.com
Mon Jun 9 01:54:09 PDT 2014
Hi,
According to [1], from which the idea of protocol dumper came, the
purpose of the protocol dumper is to track exactly how a client
communicate with the server, and to make a difference with how
WAYLAND_DEBUG=server works.
So IMHO, the protocol dumper may be implemented as a standalone program,
though it may probably reside in the wayland source tree. And it job is
to reset the WAYLAND_DISPLAY environment argument, fork off the client
wanted and redirect what the client send to the real server, dumping the
data in the process -- just like a proxy.
The benefit of this way of implementation is that it not only help
weston but may also help the development of other projects (e.g. you may
even use it under Gnome on Wayland).
This is my advice.
Regards,
Boyan Ding
On Mon, 2014-06-09 at 11:17 +0530, Srivardhan wrote:
> Hi,
>
> The following are the ways in which a Protocol Dumper can be implemented:
> 1. Just before sending a message or when a message is received, the message
> can be written to a file. This change can be done in libwayland under #ifdef
> DEBUG. So when built enabling DEBUG, we should get all the protocol
> messages.
> 2. We can introduce another layer in Weston for monitoring. This layer would
> act as Man in the middle. This layer would listen to a socket to which all
> the Wayland clients would attach and this layer would in turn attach to the
> server socket. This layer would print the messages it received from the
> client and would transfer to the server and vise a versa. This could be
> included in #ifdef DEBUG, so that it is enabled only in DEBUG builds.
>
> I feel the 1st approach is simpler, What are your thoughts?
>
> Thank-you,
> Hebbar
>
>
>
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list