Difference between revisions of "NWMUDS:ConnectNetwork2"

From 3dbrew
Jump to navigation Jump to search
(Created page with "=Request= {| class="wikitable" border="1" |- ! Index Word ! Description |- | 0 | Header code [0x001E0084] |- | 1 | ? |- | 2 | Passphrase buffer size |- | 3 | (...")
 
m (Steveice10 moved page NWMUDS:ConnectToNetwork to NWMUDS:ConnectNetwork2)
 
(7 intermediate revisions by one other user not shown)
Line 9: Line 9:
 
|-
 
|-
 
| 1
 
| 1
| ?
+
| u8 Connection type: 0x1 = Client, 0x2 = Spectator.
 
|-
 
|-
 
| 2
 
| 2
Line 15: Line 15:
 
|-
 
|-
 
| 3
 
| 3
| (NetworkStructSize<<12)  <nowiki>|</nowiki> 2
+
| (NetworkStructSize<<12)  <nowiki>|</nowiki> 0x402
 
|-
 
|-
 
| 4
 
| 4
 
| Input network struct buffer ptr
 
| Input network struct buffer ptr
 
|-
 
|-
| 3
+
| 5
 
| (PassphraseSize<<12)  <nowiki>|</nowiki> 2
 
| (PassphraseSize<<12)  <nowiki>|</nowiki> 2
 
|-
 
|-
| 4
+
| 6
| Input passphrase buffer ptr (including the NULL-terminator)
+
| Input passphrase buffer ptr
 
|}
 
|}
  
Line 39: Line 39:
 
| Result code
 
| Result code
 
|}
 
|}
 +
 +
=Description=
 +
This connects to the specified network.
 +
 +
Before using this command official user-processes verify that the passphrase_buf is not NULL, and that PassphraseSize is >=8 and <=0xFF. On fail that user-process code returns 0xE10113FD for that. That user-process code also checks the network attributes bitmask 0x1, see [[NWM_Services|here]].

Latest revision as of 07:38, 23 July 2023

Request[edit]

Index Word Description
0 Header code [0x001E0084]
1 u8 Connection type: 0x1 = Client, 0x2 = Spectator.
2 Passphrase buffer size
3 (NetworkStructSize<<12) | 0x402
4 Input network struct buffer ptr
5 (PassphraseSize<<12) | 2
6 Input passphrase buffer ptr

Response[edit]

Index Word Description
0 Header code
1 Result code

Description[edit]

This connects to the specified network.

Before using this command official user-processes verify that the passphrase_buf is not NULL, and that PassphraseSize is >=8 and <=0xFF. On fail that user-process code returns 0xE10113FD for that. That user-process code also checks the network attributes bitmask 0x1, see here.