From 33d9d1d42ec28080bcf908da07a38fa4dfe33ec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B3pez=20Guimaraes?= Date: Sat, 19 Oct 2024 13:47:04 +0100 Subject: [PATCH] feat(monitoring-data): Expand information on version 11 --- docs/pia/protocols/monitoring-data.md | 173 +++++++++++++++++++++++--- 1 file changed, 153 insertions(+), 20 deletions(-) diff --git a/docs/pia/protocols/monitoring-data.md b/docs/pia/protocols/monitoring-data.md index f5b4c96..331ad29 100644 --- a/docs/pia/protocols/monitoring-data.md +++ b/docs/pia/protocols/monitoring-data.md @@ -127,7 +127,7 @@ Version 7: | ------ | ---- | ------------------------------------------------------------------------ | | 0x0 | 16 | [MonitoringDataHeader](#monitoring-data-header) | | 0x10 | 4 | PIA version (u8: major, u8: minor, u8: patch, u8: padding) | -| 0x1D | 1 | Platform ID (3=Wii U) | +| 0x1D | 1 | Platform ID (2=3DS, 3=Wii U) | | 0x1E | 1 | [Region ID](https://nintendo-wiki.pretendo.network/docs/misc/region-ids) | | 0x37 | 4 | Uint32 client external IP address | | 0x3B | 4 | Uint32 client local IP address | @@ -142,23 +142,138 @@ Version 7: Version 11: -| Offset | Size | Description | -| ------ | ---- | ------------------------------------------------------------------------ | -| 0x0 | 16 | [MonitoringDataHeader](#monitoring-data-header) | -| 0x10 | 4 | PIA version (u8: major, u8: minor, u8: patch, u8: padding) | -| 0x1D | 1 | Platform ID (3=Wii U) | -| 0x1E | 1 | [Region ID](https://nintendo-wiki.pretendo.network/docs/misc/region-ids) | -| 0x37 | 4 | Uint32 client external IP address | -| 0x3B | 4 | Uint32 client local IP address | -| 0x3F | 1 | NAT Mapping | -| 0x40 | 1 | NAT Filtering | -| 0x42 | 1 | NAT type (flags) | -| 0x4D | 4 | First 4 bytes of the MD5 hash of the connected users PID | -| 0x51 | 4 | Uint32 gathering ID | -| 0x55 | 4 | Game server ID | -| 0x14D | 4 | First 4 bytes of the MD5 hash of the gathering hosts PID | -| 0x19B | 2 | Uint16 client external port | -| 0x19D | 2 | Uint16 client local port | +| Offset | Type | Description | +|--------|-----------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------| +| 0x0 | [MonitoringDataHeader](#monitoring-data-header) | Monitoring data header | +| 0x10 | Uint32 | PIA version (u8: major, u8: minor, u8: patch, u8: padding) | +| 0x14 | Uint32 | Unknown | +| 0x18 | Uint32 | Unknown | +| 0x1C | Uint8 | Unknown | +| 0x1D | Uint8 | Platform ID (2=3DS, 3=Wii U) | +| 0x1E | Uint8 | [Country ID](https://nintendo-wiki.pretendo.network/docs/misc/region-ids) | +| 0x1F | Uint8 | [Region ID](https://nintendo-wiki.pretendo.network/docs/misc/region-ids) | +| 0x20 | Uint32 | Pia heap size | +| 0x24 | Uint32 | Bitmask that describes which [protocols](/docs/pia/protocols) are created. | +| 0x28 | Uint32 | Unknown | +| 0x2C | Uint8 | Unknown | +| 0x2D | Uint32 | Unknown | +| 0x31 | Uint32 | Unknown | +| 0x35 | Uint8 | Unknown | +| 0x36 | Uint8 | Unknown | +| 0x37 | Uint32 | External client address | +| 0x3B | Uint32 | Local client address | +| 0x3F | Uint8 | NAT Mapping | +| 0x40 | Uint8 | NAT Filtering | +| 0x42 | Uint8 | NAT type (flags) | +| 0x43 | Uint16 | Time used by NAT port detecter (milliseconds) | +| 0x45 | Uint16 | Time required to resolve address of NAT check server (milliseconds) | +| 0x47 | Uint16 | MTU size | +| 0x49 | Uint32 | NEX connection ID of the user | +| 0x4D | Uint32 | First 4 bytes of the MD5 hash of the connected users PID | +| 0x51 | Uint32 | Gathering ID | +| 0x55 | Uint32 | Game server ID | +| 0x59 | Uint8 | [Thread mode](#thread-mode) | +| 0x5A | Uint32 | Unknown | +| 0x5E | Uint32 | Unknown | +| 0x62 | Uint32 | Unknown | +| 0x66 | Uint8 | Unknown | +| 0x67 | Uint8 | Unknown | +| 0x68 | Uint16 | Maximum number of stations allowed | +| 0x6A | Uint32 | Unknown | +| 0x6E | Uint32 | Unknown | +| 0x72 | Uint32 | Number of reliable send data blocks | +| 0x76 | Uint32 | Number of reliable receive data blocks | +| 0x7A | Uint32 | Unknown | +| 0x7E | Uint16 | Lowest RTT average (milliseconds) | +| 0x80 | Uint32 | First 4 bytes of the MD5 hash of the PID of the user with the lowest RTT average | +| 0x84 | Uint16 | Highest RTT average (milliseconds) | +| 0x86 | Uint32 | First 4 bytes of the MD5 hash of the PID of the user with the highest RTT average | +| 0x8A | Uint16 | Relay route RTT max | +| 0x8C | Uint16 | Relay route num max | +| 0x8E | Uint16 | Maximum silence time (milliseconds) | +| 0x90 | Uint32 | Keep alive interval (milliseconds) | +| 0x94 | Uint8 | Unknown | +| 0x95 | Uint8 | Unknown | +| 0x96 | Uint8 | Unknown | +| 0x97 | Uint32 | Join mesh job result | +| 0x9B | Uint32 | Processing time of join mesh (milliseconds) | +| 0x9F | Uint8 | PID relay count (1) | +| 0xA0 | Uint32[23] | First 4 bytes of the MD5 hash of the PIDs in relay (1) | +| 0xFC | Uint8 | PID relay count (2) | +| 0xFD | Uint32[12] | First 4 bytes of the MD5 hash of the PIDs in relay (2) | +| 0x12D | Uint16 | Unknown | +| 0x12F | Uint8 | Unknown | +| 0x130 | Uint8 | Unknown | +| 0x131 | Uint32 | Unknown | +| 0x135 | Uint16 | Unknown | +| 0x137 | Uint16 | Unknown | +| 0x139 | Uint16 | Unknown | +| 0x13B | Uint16 | Unknown | +| 0x13D | Uint16 | Unknown | +| 0x13F | Uint16 | Unknown | +| 0x141 | Uint16 | Unknown | +| 0x143 | Uint16 | Unknown | +| 0x145 | Uint8 | Unknown | +| 0x146 | Uint16 | Unknown | +| 0x148 | Uint16 | External client port | +| 0x14A | Uint16 | Local client port | +| 0x14C | Uint8 | Debug mode (Wii U: OSGetSecurityLevel() != 0) | +| 0x14D | Uint32 | First 4 bytes of the MD5 hash of the gathering hosts PID | +| 0x151 | Uint8 | Unknown | +| 0x152 | Uint8 | Unknown | +| 0x153 | Uint8 | Unknown | +| 0x154 | Uint8 | Unknown | +| 0x155 | Uint32 | Joint session gathering ID | +| 0x159 | Uint32 | Unknown | +| 0x15D | Uint32 | Unknown | +| 0x161 | Uint8 | Unknown | +| 0x162 | Uint8 | Unknown | +| 0x163 | Uint32 | Processing time of join session (milliseconds) | +| 0x167 | Uint32 | Session game mode | +| 0x16B | Uint32[6] | Session attributes | +| 0x183 | Uint16 | Session max participants | +| 0x185 | [NexSessionSearchCriteria](#nexsessionsearchcriteria) | Search criteria 1 | +| 0x1A2 | [NexSessionSearchCriteria](#nexsessionsearchcriteria) | Search criteria 2 | +| 0x1BF | Uint8 | Joint number of session join attempts | +| 0x1C0 | Uint8 | Joint session max participants | +| 0x1C1 | Uint8 | Session extra participants | +| 0x1C2 | [NexSessionSearchCriteriaExtra](#nexsessionsearchcriteriaextra) | Extra search criteria 1 | +| 0x1D0 | [NexSessionSearchCriteriaExtra](#nexsessionsearchcriteriaextra) | Extra search criteria 2 | +| 0x1DE | Uint8 | Number of NAT traversal failures | +| 0x1DF | Uint8 | Number of session join failures because the connection with the host could not be established | +| 0x1E0 | Uint8 | Number of session join failures because of an error receiving the join response | +| 0x1E1 | Uint8 | Number of session join failures because the session started host migration before a connection was established with all clients | +| 0x1E2 | Uint8 | Number of session join failures because the session started host migration before the join was completed | +| 0x1E3 | Uint8 | Number of session join failures because the join request was denied | +| 0x1E4 | Uint32 | Unknown | +| 0x1E8 | Uint32 | Unknown | +| 0x1EC | Uint8 | Unknown | +| 0x1ED | Uint8 | Joint sequence | +| 0x1EE | Uint8 | Join sequence | +| 0x1EF | Uint8 | Join auto matchmake sequence | +| 0x1F0 | Uint8 | Join mesh sequence | +| 0x1F1 | Uint8 | Unknown | +| 0x1F2 | Uint16 | Bandwidth checker ip packet size | +| 0x1F4 | Uint16 | Unknown send packet num in measuring time | +| 0x1F6 | Uint16 | Bandwidth checker bps | +| 0x1FA | Uint32 | Unknown | +| 0x1FE | Uint16 | NAT property detection count | +| 0x200 | Uint16 | NAT port detection count | +| 0x202 | Uint32[23] | NEX connection IDs in the session | +| 0x25E | Uint32[23] | First 4 bytes of the MD5 hash of the PIDs in the session | +| 0x2BA | Uint32[23] | Unknown (milliseconds) | +| 0x316 | Uint32[23] | Unknown (milliseconds) | +| 0x372 | Uint32[23] | NAT traversal results | +| 0x3CE | Uint8[23] | Unknown | +| 0x3E5 | Uint8[23] | Port spray counts | +| 0x3FC | Uint8[23] | Unknown | +| 0x414 | Uint8[23] | Unknown | +| 0x42A | Uint8 | Start NAT traversal result | +| 0x42B | Uint8 | Complete NAT traversal result | +| 0x42C | Uint16 | Update target address count | +| 0x42E | Uint16 | NAT traversal success count | +| 0x430 | Uint16 | NAT traversal failure count | +| 0x432 | Uint8[8] | Unknown | Version 18: @@ -331,6 +446,24 @@ Version 18: ### NexSessionSearchCriteria +Version 11: + +| Type | Description | +|------------|-------------------------------------------------------------------------------------------------------| +| Uint32 | Game mode | +| Uint8 | Min participants num range (min) | +| Uint8 | Min participants num range (max) | +| Uint8 | Max participants num range (min) | +| Uint8 | Max participants num range (max) | +| Uint8 (x6) | Attribute array size | +| Uint8 (x6) | Attribute range min | +| Uint8 (x6) | Attribute range max | +| Uint8 | Matchmake system type | +| Uint8 | Flags:
1: exclude user password set
2: exclude non host pid
4: opened only
8: vacant only | +| Uint8 | Selection method | + +Version 18: + | Type | Description | | ----------- | ----------------------------------------------------------------------------------------------------- | | Uint32 | Game mode | @@ -341,9 +474,9 @@ Version 18: | Uint8 (x6) | Attribute array size | | Uint32 (x6) | Attribute range min | | Uint32 (x6) | Attribute range max | -| Uint8 | Session type | +| Uint8 | Matchmake system type | | Uint8 | Flags:
1: exclude user password set
2: exclude non host pid
4: opened only
8: vacant only | -| Uint8 | Random session selection method | +| Uint8 | Selection method | ### NexSessionSearchCriteriaExtra