en:games:star_trek_armada_1:directplay_game_query
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:games:star_trek_armada_1:directplay_game_query [2024-10-20-13-46] – created 7saturn | en:games:star_trek_armada_1:directplay_game_query [2024-10-30-02-08] (current) – [Description 1] 7saturn | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== DirectPlay Game Query ====== | ====== DirectPlay Game Query ====== | ||
//Star Trek: Armada// could be played basically via one of the following network means: | //Star Trek: Armada// could be played basically via one of the following network means: | ||
- | - TCP/IP LAN play, | + | - [[en: |
- | - IPX LAN play and | + | - [[en: |
- | - WON internet play. | + | - [[en: |
- | The actual game play is facilitated by DirectPlay connections. The queries for open games are slightly different for the above mentioned types of connection/ | + | The actual game play is facilitated by [[en: |
===== TCP/IP vs. IPX ===== | ===== TCP/IP vs. IPX ===== | ||
- | Basically it is not really relevant, how exactly the TCP/IP connection or the IPX connection is established. The actual contents sent by the game must of course be transported properly to the other peers. But if it is a native IPX connection or an RFC 1234 IPX server, are details the game will not know anything | + | Basically it is not really relevant, how exactly the TCP/IP connection or the IPX connection is established. The actual contents sent by the game must of course be transported properly to the other peers. But whether |
+ | |||
+ | When receiving the TCP packages, the following socket header is considered to be part of the DirectPlay header by // | ||
- | When receiving the TCP packages, the following anet header is considered to be part of the Direct Play header by WireShark. Considering that it is not part of the IPX packages, it stands to reason, that this is a wrong assumption that it is part of the DirectPlay contents, but the //anet// header. It must be skipped to get to the actual DirectPlay contents: | ||
^ Offset | ^ Offset | ||
| 00/00 | Size of the entire part, including the DirectPlay contents (0x8e 0x00) | | | 00/00 | Size of the entire part, including the DirectPlay contents (0x8e 0x00) | | ||
Line 17: | Line 18: | ||
| 12/0c | Padding (0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00) | | | 12/0c | Padding (0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00) | | ||
- | So in total a length of 20 bytes can be skipped, to get to the DirectPlay contents. | + | So in total a length of 20 bytes can be skipped, to get to the DirectPlay contents. |
===== The DirectPlay Analysis ===== | ===== The DirectPlay Analysis ===== | ||
==== Method ==== | ==== Method ==== | ||
- | For the analysis of the game's sent and received data Wireshark was used on a LAN, once with direct TCP/IP packages | + | For the analysis of the game's sent and received data Wireshark was used on a LAN, once with direct TCP/IP packages |
- | When looking at the packages sent back and forth between a peer having an open game lobby, and a peer requesting open lobbies via broadcast from everyone else on the same subnet, the contents are fairly the same for TCP/IP and IPX. The network headers are different of course (the IPX header being removed leaves the very same contents, as are sent via TCP/IP, while TCP/IP seems to add // | + | When looking at the packages sent back and forth between a peer having an open game lobby, and a peer requesting open lobbies via broadcast from everyone else on the same [[en: |
- | So for the analysis the TCP/ | + | So for the analysis |
==== Query Contents ==== | ==== Query Contents ==== | ||
- | The game query is actually rather short, once headers of TCP or IPX are removed: | + | The open game query is actually rather short, once headers of TCP or IPX are removed: |
^ Group ^ Offset (Dec/ | ^ Group ^ Offset (Dec/ | ||
| Header | 00/00 | The word //play// (0x70 0x6c 0x61 0x79) | | | Header | 00/00 | The word //play// (0x70 0x6c 0x61 0x79) | | ||
Line 45: | Line 45: | ||
The game queries all games, not filtering for anything. The filtering happens on the client side. So the in-game selection field does not control which contents come from the peers having a session opened. | The game queries all games, not filtering for anything. The filtering happens on the client side. So the in-game selection field does not control which contents come from the peers having a session opened. | ||
+ | |||
+ | These messages are sent to the broadcast address. For TCP/IP that is 255.255.255.255, | ||
==== Answer Contents ==== | ==== Answer Contents ==== | ||
+ | === General DirectPlay Structure === | ||
The answer to such a request is relatively long, but mostly because the payload needs actual space: | The answer to such a request is relatively long, but mostly because the payload needs actual space: | ||
Line 70: | Line 73: | ||
| Data | 92/5c | Lobby name, 30 bytes | | | Data | 92/5c | Lobby name, 30 bytes | | ||
- | Session Description Flags are a bit field of length 32 bits/4 bytes with the following meaning: | + | //Session Description Flags// are a bit field of length 32 bits/4 bytes with the following meaning: |
^ Bit Position | ^ Bit Position | ||
Line 93: | Line 96: | ||
| 32 | No Create Players | | | 32 | No Create Players | | ||
- | Reserved 1 and Description 1 seem to change. | + | **Note**: The //Session Description Flags// like //Can Join// have nothing to do with the actual Armada information about the match, e.g. whether the game is closed off, or not. Some of that information can be found in the // |
+ | |||
+ | === Description 1 === | ||
+ | Reserved 1 and Description 1 seem to change. | ||
+ | |||
+ | ^ Byte Dec ^ Byte Hex ^ Bit ^ Description ^ | ||
+ | | 73 | 49 | 1-3 | Max. number of players. If this value is 8 (all player slots available), all three bits are set to 0. Otherwise the little-endian representation | ||
+ | | 74 | 4a | 2 | IS the match a head-to-head match (basically 1v1)? 1 means yes, 0 means no. | | ||
+ | | 74 | 4a | 3 | Has the match been protected by a password? 1 means yes, 0 means no. | | ||
+ | | 74 | 4a | 6 | Is a match already ongoing | ||
+ | | 74 | 4a | 7 | Has the match been closed (no joining possible)? 1 means yes, 0 means no. | | ||
{{page> | {{page> |
en/games/star_trek_armada_1/directplay_game_query.1729424816.txt.gz · Last modified: 2024-10-20-13-46 by 7saturn