ttsnoop(6)
NAME
ttsnoop − the ToolTalk message monitor demo
SYNOPSIS
ttsnoop [ -t ]
DESCRIPTION
ttsnoop is a demo program/tool provided with the ToolTalk product, which allows you to create and send custom constructed ToolTalk messages, and to selectively monitor any or all ToolTalk messages on your system.
The ttsnoop program is compiled by running the make command in the directory $OPENWINHOME/share/src/tooltalk/demo/ttsnoop. Your OPENWINHOME environment variable must be set to where OpenWindows is installed (typically /opt/openwin or /usr/openwin). The OpenWindows portion of ttsnoop was constructed using the Sun DevGuide product. The .G files provided with the demo are provided for the benefit of advanced users who may wish to further modify ttsnoop, and are not used in the course of normal compilation of ttsnoop. For programmers who are specifically interested in the ToolTalk communication aspects of ttsnoop, most of the ToolTalk specific code is in the following files: receive.c, receive_pattern.c, and send_message.c.
Once ttsnoop is started, you can activate message reception by pressing the square "Start" button on the upper left of the main panel. ttsnoop will now display any incoming messages which match the patterns you register. To test ttsnoop, popup the "Messages..." panel and press the "Send Message" button. You should see a ToolTalk message appear on the main text subwindow of ttsnoop.
The main panel of ttsnoop has several buttons:
Pressing the "Messages..." button will popup a panel which allows you to compose and send ToolTalk messages. Refer to the ToolTalk Reference Manual to understand what the myriad of choices mean. Note that sending message contexts requires pressing the "Edit Contexts" button to bring up another popup, which will allow you to edit contexts to be sent with your messages.
Pressing the "Patterns..." button will popup a panel which allows you to compose and register ToolTalk patterns. Refer to the ToolTalk Reference Manual to understand what the myriad of choices mean. By registering appropriate patterns, a programmer can use ttsnoop as a debugging tool to observe what messages are being sent by other applications. Note that using message contexts in patterns requires pressing the "Edit Contexts" button to bring up another popup, which will allow you to edit contexts to be registered with your patterns.
Pressing the "Display..." button will popup a panel of checkboxes, each of which controls the highlighting of a specific ToolTalk message component on the ttsnoop display subwindow. Selected components will be indicated on displayed messages by a "--->" to the left of the displayed message component.
Using the "Send Message" button allows you send one of a number of pre-selected messages, created by the "Add Message" button on the "Messages..." popup panel.
OPTIONS
-t Print trace output. Of particular interest is that ttsnoop will print example ToolTalk API code in the invoking OpenWindows cmdtool (or console if ttsnoop is invoked via a menu choice) showing what ToolTalk API calls are being used to construct a particular pattern or message.
SEE ALSO
DIAGNOSTICS
If you try and invoke ttsnoop (or any ToolTalk application) and you get a message saying the application could not start ToolTalk, or ttsession, make sure that you have one of the environment variables DISPLAY or _SUN_TT_SESSION set, and that ttsession is in your PATH, or that the SUN_TTSESSION_CMD environment variable indicates where the ttsession program resides. For more information on ttsession and the environment variables it uses, see the ttsession man page.
SunOS 5.4 — Last change: 17 Nov 1992