all of switchboard except USR

USR is very big and would consider a break here

... Why does the spec imply that Switchboard has INF? Is that why every client implements it after MSNP8?
This commit is contained in:
yellows111 2024-10-14 21:13:21 +01:00
parent be1cdb1155
commit f38cb78dd8
Signed by: yellows111
SSH Key Fingerprint: SHA256:ynw5IJBU1pb7fZfHgLihKu9gHHA8FVpixZbB6IEB3r8
15 changed files with 545 additions and 18 deletions

View File

@ -14,8 +14,16 @@ This is a list of all known MSNP commands and their originating version.
| [`FND`](commands/fnd.md) | N | Y | N | [MSNP2](versions/msnp2.md) | [MSNP5](versions/msnp5.md) (uses SDC instead of SND), July 2003 (not really any specific MSNP update, just soft-removed with a 502.) |
| [`BLP`](commands/blp.md) | N | Y | Y\*| [MSNP2](versions/msnp2.md) | [MSNP10](versions/msnp10.md) (Removed List Version if `ABCHMigrated: 1`), [MSNP13](versions/msnp13.md) (removed: automatic disconnect) |
| [`GTC`](commands/gtc.md) | N | Y | Y\* | [MSNP2](versions/msnp2.md) | [MSNP10](versions/msnp10.md) (Removed List Version if `ABCHMigrated: 1`), [MSNP13](versions/msnp13.md) (removed: automatic disconnect) |
| [`CHG`](commands/chg.md) | N | Y | Y | [MSNP2](versions/msnp2.md) | [MSNP8](versions/msnp8.md) (Client Capability flags support as parameter 2), [MSNP9](versions/msnp9.md) (MSNObject support as parameter 3) |
| [`CHG`](commands/chg.md) | N | Y | Y | [MSNP2](versions/msnp2.md) | [MSNP8](versions/msnp8.md) (Added Client Capability flags support as parameter 2), [MSNP9](versions/msnp9.md) (MSNObject support as parameter 3) |
| [`IMS`](commands/ims.md) | N | Y | N | [MSNP3](versions/msnp3.md) | |
| [`ACK`](commands/ack.md) | N | N | Y | [MSNP2](versions/msnp2.md) | [MSNP9](versions/msnp9.md) (Now can happen as a response to [MSG](commands/msg.md) D.) |
| [`NAK`](commands/nak.md) | N | N | Y | [MSNP2](versions/msnp2.md) | |
| [`BYE`](commands/bye.md) | N | N | Y | [MSNP2](versions/msnp2.md) | |
| [`ANS`](commands/iro.md) | N | Y | Y | [MSNP2](versions/msnp2.md) | [MSNP16](versions/msnp16.md) (Added MPOP Machine ID appended to the local user's handle parameter, delimited by a semi-colon) |
| [`MSG`](commands/msg.md) | Y | Y | Y | [MSNP2](versions/msnp2.md) | [MSNP9](versions/msnp9.md) (Added Acknoledgement Type D) |
| [`IRO`](commands/iro.md) | N | N | Y | [MSNP2](versions/msnp2.md) | [MSNP12](versions/msnp12.md) (Added Client Capability flags support as parameter 5) |
| [`JOI`](commands/joi.md) | N | N | Y | [MSNP2](versions/msnp2.md) | [MSNP12](versions/msnp12.md) (Added Client Capability flags support as parameter 3) |
| [`CAL`](commands/cal.md) | N | Y | N | [MSNP2](versions/msnp2.md) | |
# Modifiers:
* `*`: Only in `SYN`.

46
docs/commands/ack.md Normal file
View File

@ -0,0 +1,46 @@
# Introduction
`ACK` is a command introduced with [MSNP2](../versions/msnp2.md).
It is a Switchboard Server command, without a response payload.
Used as a positive response to [MSG](msg.md) A, and later [MSG](msg.md) D commands.
# Client/Request
This command can not be sent from the client.
# Server/Response
`ACK TrID`
# Examples
## As a response to MSG A
```
C: MSG 1 A 68
MIME-Version: 1.0
Content-Type: text/plain;charset=UTF-8
message
S: ACK 1
```
## As a response to MSG D
*This only happens in [MSNP9](../versions/msnp9.md).*
```
C: MSG 2 D 73
MIME-Version: 1.0
Content-Type: application/octet-stream
data message
S: ACK 2
```
## Invalid context
*Inherited from being an unimplemented command.*
```
C: ACK 3
```
Server disconnects client.
# Known changes
* [MSNP9](../versions/msnp9.md): Now happens as a response to MSG D.

50
docs/commands/ans.md Normal file
View File

@ -0,0 +1,50 @@
# Introduction
`ANS` is a command introduced with [MSNP2](../commands/msnp2.md).
It is a Switchboard Server command, without either a request or response payload.
Used to join ("answer") a Switchboard session ("call").
The response of this command sent after the [IRO](iro.md) list has been sent.
# Client/Request
`ANS TrID my-handle cookie session-id`
Where `my-handle` is the current user's handle.
In [MSNP16](../versions/msnp16.md), a UUID is appended after a semi-colon, which is your MPOP Machine ID.
Where `cookie` is the `cookie` from the RNG command sent to you.
Where `session-id` is the `session-id` from the RNG command sent to you.
# Server/Response
`ANS TrID OK`
Where `OK` is always `OK`.
# Examples
## Answering a RNG
```
C: ANS 1 example@hotmail.com 123456789.123456789.123456789 987654321
S: IRO 1 1 1 anotheruser@hotmail.com another%20user
S: ANS 1 OK
```
## Invalid session
*NOTE: There is no defined behavour for this command specificially."
```
C: ANS 2 example@hotmail.com bad data
```
Server disconnects client.
## Invalid context (Notification Server)
*Inherited from being an unimplemented command.*
```
C: ANS 3 example@hotmail.com wrong server
```
Server disconnects client.
# Known changes
* [MSNP16](../versions/msnp16.md): Added the current MPOP Machine ID to the `my-handle` parameter.

39
docs/commands/bye.md Normal file
View File

@ -0,0 +1,39 @@
# Introduction
`BYE` is a command introduced with [MSNP2](../versions/msnp2.md).
It is a Switchboard Server command, without a response payload.
Used when a client leaves the current switchboard session.
# Client/Request
This client can not be sent from the client.
# Server/Response
`BYE user-handle {timeout}`
Where `user-handle` is the parting user's handle.
Where `timeout` is `1` if the server disconnected this user automatically. This parameter is optional.
# Examples
## User quit manually
```
S: BYE anotheruser@hotmail.com
```
## User timed out
```
S: BYE anotheruser@hotmail.com 1
```
## Invalid context
*Inherited from being an unimplemented command.*
```
C: BYE 1
```
Server disconnects client.
# Known changes
None.

78
docs/commands/cal.md Normal file
View File

@ -0,0 +1,78 @@
# Introduction
`CAL` is a command introduced with [MSNP2](../versions/msnp2.md).
It is a Switchboard Server command, without a response payload.
It invites a user to a Switchboard session.
# Client/Request
`CAL TrID user-handle`
Where `user-handle` is the user that you'd like to invite.
# Server/Response
`CAL TrID RINGING session-id`
Where `RINGING` is always `RINGING`, as there are no other states avaliable.
Where `session-id` is the Switchboard session identification number.
# Examples
## Inviting a user successfully
```
C: CAL 1 anotheruser@hotmail.com
S: CAL 1 RINGING 987654321
```
## User already invited
```
C: CAL 2 anotheruser@hotmail.com
S: 215 2
```
## User to invite was invalid
```
C: CAL 3 hello
S: 208 3
```
## User is offline
```
C: CAL 4 anotheruser@hotmail.com
S: 217 4
```
## User does not allow you to contact them
*All instances that returned this have been changed to a 217. This response is deprecated.*
```
C: CAL 5 anotheruser@hotmail.com
S: 216 5
```
## Rate limited
```
C: CAL 6 anotheruser@hotmail.com
S: 217 6
C: CAL 7 anotheruser@hotmail.com
S: 217 7
C: CAL 8 anotheruser@hotmail.com
S: 217 8
C: CAL 9 anotheruser@hotmail.com
S: 217 9
C: CAL 10 anotheruser@hotmail.com
S: 217 10
C: CAL 11 anotheruser@hotmail.com
S: 713 11
```
## Invalid context (Notification Server)
*Inherited from being an unimplemented command.*
```
C: CAL 12 anotheruser@hotmail.com
```
Server disconnects client.
# Known changes
None.

50
docs/commands/iro.md Normal file
View File

@ -0,0 +1,50 @@
# Introduction
`IRO` is a command introduced with [MSNP2](../versions/msnp2.md).
It is a Switchboard Server command, without a response payload.
Used to specify what users in are in the Switchboard session after a [ANS](ans.md) request.
# Client/Request
This command can not be sent from the client.
# Server/Response
`IRO TrID index total-participants participant-handle participant-friendly-name {client-capabilities}`
Where `index` is the current indice of the list.
Where `total-participants` is the length of the list.
Where `participant-handle` is the related user's handle.
Where `participant-friendly-name` is the related user's Friendly Name.
Where `client-capabilities` is the related user's Client Capabilities, only in [MSNP12](../versions/msnp12.md) and above.
# Examples
## Without Client Capabilities
```
C: ANS 1 example@hotmail.com 123456789.123456789.123456789 987654321
S: IRO 1 1 1 anotheruser@hotmail.com another%20user
S: ANS 1 OK
```
## With Client Capabilities
*Only in [MSNP12](../versions/msnp12.md) and above.*
```
C: ANS 2 example@hotmail.com 123456789.123456789.123456789 987654321
S: IRO 2 1 1 anotheruser@hotmail.com another%20user 1342554172
S: ANS 2 OK
```
## Invalid context
*Inherited from being an unimplemented command.*
```
C: IRO 3
```
Server disconnects client.
# Known changes
* [MSNP12](../versions/msnp12.md): Added the Client Capabilities parameter (parameter 5).

41
docs/commands/joi.md Normal file
View File

@ -0,0 +1,41 @@
# Introduction
`JOI` is a command introduced with [MSNP2](../versions/msnp2.md).
It is a Switchboard Server command, without a response payload.
Notifies that a new user has joined the Switchboard session.
# Client/Request
This command can not be sent from the client.
# Server/Response
`JOI user-handle friendly-name {client-capabilities}`
Where `user-handle` is the joined user's handle.
Where `friendly-name` is the joined user's Friendly Name.
Where `client-capabilities` is the related user's Client Capabilities, only in [MSNP12](../versions/msnp12.md) and above.
# Examples
## Without Client Capabilities
```
S: JOI anotheruser@hotmail.com another%20user
```
## With Client Capabilities
```
S: JOI anotheruser@hotmail.com another%20user 1342554172
```
## Invalid context
*Inherited from being an unimplemented command.*
```
C: JOI 2
```
Server disconnects client.
# Known changes
* [MSNP12](../versions/msnp12.md): Added the Client Capabilities parameter (parameter 3).

176
docs/commands/msg.md Normal file
View File

@ -0,0 +1,176 @@
# Introduction
`MSG` is a command introduced with [MSNP2](../versions/msnp2.md).
It is a Notification and Switchboard Server command, WITH a request and WITH a response payload.
Used to transfer MIME-headered data to other parties, whenever that be you or other users.
# Client/Request
```
MSG TrID [ U | N | A | D ] length
data
```
## Acknowledgement Types
* U: Unacknowledged, no response is sent.
* A: Acknowledged, a [ACK](ack.md) response is sent if the message is sent successfully.
* N: Negative-Acknowledged, a [NAK](nak.md) response is sent if the messaged failed to send successfully.
* D: Data, a version of Acknowledged that also has a response of error 282 if the message was poorly formatted.
Acknowledgement Type `D` is only defined in [MSNP9](../versions/msnp9.md) and above.
Where `length` is the `length` in bytes of `data`.
Where `data` is the body of the message,
usually containing a `MIME-Version` header and a `Content-Type`.
*This can only be sent from Switchboard.*
# Server/Response
```
MSG user-handle friendly-name length
data
```
Where `user-handle` is either the senders's handle,
or `Hotmail`, if sent from the Notification Server itself.
Where `friendly-name` is either the URL-encoded Friendly Name of the sender,
or `Hotmail`, if sent from the Notification Server itself.
Where `length` is the `length` in bytes of `data`.
Where `data` is the body of the message,
usually containing a `MIME-Version` header and a `Content-Type`.
# Examples
## Client initated
### Unacknowledged message
```
C: MSG 1 U 75
MIME-Version: 1.0
Content-Type: text/plain;charset=UTF-8
unacknowledged
```
### Acknowledged message
```
C: MSG A 2 73
MIME-Version: 1.0
Content-Type: text/plain;charset=UTF-8
acknowledged
S: ACK 2
```
### Negative-Acknowledged message
```
C: MSG 3 2 85
MIME-Version: 1.0
Content-Type: text/plain;charset=UTF-8
negatively acknowledged?
S: NAK 3
```
### Data message
*This only happens in [MSNP9](../versions/msnp9.md).*
```
C: MSG 4 D 73
MIME-Version: 1.0
Content-Type: application/octet-stream
data message
S: ACK 4
```
### Poorly formatted data message
```
C: MSG 5 D 74
MIME-Version: 1.0
Content-Type: text/plain;charset=UTF-8
data message?
S: 282 5
```
### Invalid context (Notification Server)
*Inherited from being an unimplemented command.*
```
C: MSG 6 U 0
```
Server disconnects client.
## Server initated
### Notification Server
#### Initial profile
*NOTE: This profile is from [MSNP2](../versions/msnp2.md), later versions have longer initial profiles.*
```
S: MSG Hotmail Hotmail 95
MIME-Version: 1.0
Content-Type: text/x-msmsgsprofile; charset=UTF-8
LoginTime: 1726321960
```
#### Initial e-mail configuration
*NOTE: This message is from [MSNP3](../versions/msnp3.md), the [MSNP2](../versions/msnp2.md) version of this is unknown.*
```
S: MSG Hotmail Hotmail 221
MIME-Version: 1.0
Content-Type: text/x-msmsgsinitialemailnotification; charset=UTF-8
Inbox-Unread: 1
Folders-Unread: 0
Inbox-URL: /cgi-bin/HoTMaiL
Folders-URL: /cgi-bin/folders
Post-URL: http://www.hotmail.com
```
#### New e-mail
```
S: MSG Hotmail Hotmail 342
MIME-Version: 1.0
Content-Type: text/x-msmsgsemailnotification; charset=UTF-8
From: Example User
Message-URL: /cgi-bin/getmsg?msg=MSG1728932553.00&start=1&len=12&curmbox=ACTIVE
Post-URL: https://loginnet.passport.com/ppsecure/md5auth.srf?lc=1033
Subject: Just saying hello.
Dest-Folder: ACTIVE
From-Addr: example@hotmail.com
id: 2
```
The `id` header is only added for [MSNP3](../versions/msnp3.md) and above for Passport automatic authentication support.
#### Mailbox activity
```
S: MSG Hotmail Hotmail 146
MIME-Version: 1.0
Content-Type: text/x-msmsgsactivemailnotification; charset=UTF-8
Src-Folder: ACTIVE
Dest-Folder: ACTIVE
Message-Delta: 1
```
### Switchboard Server
```
S: MSG example@hotmail.com example%20user 73
MIME-Version: 1.0
Content-Type: text/plain;charset=UTF-8
acknowledged
```
# Known changes
* [MSNP9](../versions/msnp9.md): Added acknoledgement type D.

35
docs/commands/nak.md Normal file
View File

@ -0,0 +1,35 @@
# Introduction
`NAK` is a command introduced with [MSNP2](../versions/msnp2.md).
It is a Switchboard Server command, without a response payload.
Used as a negative response to [MSG](msg.md) N.
# Client/Request
This command can not be sent from the client.
# Server/Response
`NAK TrID`
# Examples
## As a response to MSG N
```
C: MSG 1 N 68
MIME-Version: 1.0
Content-Type: text/plain;charset=UTF-8
message
S: NAK 1
```
## Invalid context
*Inherited from being an unimplemented command.*
```
C: NAK 2
```
Server disconnects client.
# Known changes
None.

View File

@ -82,5 +82,5 @@ Client disconnects from server
Client opens a connection to 10.0.0.5:1863
# Known changes
* [MSNP3](..versions/msnp3.md) adds a new parameter that is always 0.
* [MSNP7](..versions/msnp7.md) adds a new parameter that is the current server you are connected to.
* [MSNP3](..versions/msnp3.md) adds a new parameter that is always 0 to XFR NS.
* [MSNP7](..versions/msnp7.md) adds a new parameter that is the current server you are communicating with to XFR NS.

View File

@ -35,6 +35,9 @@ More is to come soon! Hopefully!
* [FND command](commands/fnd.md): What was returned when this was disabled in 2003 in [MSNP2](versions/msnp2.md) to [MSNP6](versions/msnp6.md)?
* [FND command](commands/fnd.md): How did sending an invitation work in [MSNP2](versions/msnp2.md)-[MSNP4](versions/msnp4.md)? Client Version 3.0 using [MSNP4](versions/msnp4.md) just uses SND instead, but what about Client Version 1.0 to 2.2?
* [IMS command](commands/ims.md): What is the unknown number (that is usually `0`) in the response?
* [NAK command](commands/nak.md): This isn't used ever as a response for MSG D right?
* [MSG command](commands/msg.md): What can return from MSG D?
* [INF command](commands/inf.md): ***Why*** does the [MSNP2](versions/msnp2.md) [draft](https://datatracker.ietf.org/doc/html/draft-movva-msn-messenger-protocol-00#section-7.2) have this in Switchboard? It's not used by any client as far as i'm aware.
# Common (or not) Terms
* Official Client: MSN Messenger (Service) or Windows Live Messenger.

View File

@ -17,7 +17,7 @@ It introduces the notification service commands:
# Known changes
(from [MSNP11](msnp11.md)):
* Network IDs are introduced, each bit represents a contact's service, with bit 0/decimal 1 being MSNP.
* Switchboard commands JOI and IRO have a new parameter for the Client Capabilities of the relevant user.
* Switchboard commands [JOI](../commands/joi.md) and [IRO](../commands/iro.md) have a new parameter for the Client Capabilities of the relevant user.
* LST has the Network ID after the list bits (on any list), but before the Group ID (if on FL).
* Official Client: Uses Passport 3.0 (via the Microsoft Identity Common Runtime Library).
* Official Client: Dropped support for older operating systems, Now requires Windows XP or higher.

View File

@ -22,7 +22,7 @@ It introduces the notification service commands:
* [INF](../commands/inf.md)
* ILN
* LST
* MSG
* [MSG](../commands/msg.md)
* NLN
* [OUT](../commands/out.md)
* PNG (not in draft)
@ -38,14 +38,14 @@ It introduces the notification service commands:
* [XFR](../commands/xfr.md)
It introduces the switchboard service commands:
* ACK
* ANS
* BYE
* CAL
* IRO
* JOI
* MSG
* NAK
* [ACK](../commands/ack.md)
* [ANS](../commands/ans.md)
* [BYE](../commands/bye.md)
* [CAL](../commands/cal.md)
* [IRO](../commands/iro.md)
* [JOI](../commands/joi.md)
* [MSG](../commands/msg.md)
* [NAK](../commands/nak.md)
* [OUT](../commands/out.md)
* USR

View File

@ -10,8 +10,8 @@ It was introduced officially in Client Version 5.0.0537.
*No error codes were known to be introduced in this version*
The following commands were removed in this version:
* INF (automatic disconnection)
* FND (`502` by July 2003, see Known changes for client details.)
* [INF](../commands/inf.md) (automatic disconnection)
* [FND](../commands/fnd.md) (`502` by July 2003, see Known changes for client details.)
# Known changes
(from [MSNP7](msnp7.md)):

View File

@ -20,8 +20,9 @@ The following commands were removed in this version:
(from [MSNP8](msnp8.md)):
* [CHG](../commands/chg.md), ILN, NLN: Added a MSNObject parameter.
Now you can tell other clients about image data associated with your account.
* QNG: Added a "next ping" time (in seconds) parameter
* Switchboard MSG: Acknowledgement type D added
* QNG: Added a "next ping" time (in seconds) parameter.
* Switchboard MSG: Acknowledgement type D added.
Can respond with either [ACK](../commands/ack.md), error 282, or possibly any other error codes.
* Official Client: Error 603 is handled again after being removed in Client Version 5.0.
Error code 711 is no longer handled after being implemented in Client Version 5.0.
* Official Client: Supports the Messenger Config XML service, replacing `svcs.microsoft.com`.