Microsoft DirectX 8.1 (Visual Basic) |
During game development, you might find it useful to monitor Microsoft® DirectPlay® network traffic, especially when trying to understand bugs. The network monitor (Netmon) is a standard utility for analyzing network traffic. DirectPlay includes a set of parsers, that allow you to use Netmon to analyze four components of DirectPlay messaging: the service provider layer, the transport layer, the session layer, and the voice layer.
The DirectPlay protocol stack has three basic layers.
By installing the DirectPlay parsers, you can use Netmon to analyze the network traffic as it passes through any of these four layers. You can see all DirectPlay traffic by selecting the service provider parser. However, by selecting one of the higher level parsers, you can filter out traffic that might not be of interest.
With the transport layer parser, you see all voice and session traffic, but not low-level traffic such as connection handshaking. Be aware that the transport layer breaks messages that are longer than the network's Maximum Transfer Unit (MTU) into one or more fragments.
The session and voice layer parsers allow you to analyze session and voice-related traffic separately. Both of these parsers are aware of fragmentation, and notify the user, but cannot parse fragmented packets.
If you have a Windows 2000 Server system, Netmon is already installed. For Windows 2000 Professional, you must purchase a copy of Systems Management Server (SMS). See the Netmon documentation for a general discussion of how to use Netmon. To configure Netmon to handle DirectPlay traffic:
You are now ready to start capturing traffic.
To start the capture process, click the Start Capture button on the Netmon toolbar to open the capture view. Initially, you will see all the traffic that is passing through your adapter. You can filter that raw traffic stream to focus on only those packets that are of interest. By installing the DirectPlay parsers, you essentially add four filters to Netmon oriented to DirectPlay, which allow you to filter everything but DirectPlay traffic from your capture view.
To select a filter:
Click OK twice to return to the capture view, and you are ready to start viewing DirectPlay traffic.
You can also apply a filter to the capture process itself, rather than to the capture view. This allows you, for instance, to capture only IP packets with specified source and destination ports. See the Netmon documentation for details.
Here are a few tips to using Netmon with DirectPlay :
MinUserPort = x MaxUserPort = y
The x and y data values define the range to parse in addition to the default DirectPlay ports. They can be the same value if you only need one custom port.