+ All Categories
Home > Documents > Instant Messaging (IM) · • Integrated in to many other apps, gmail, facebook • Multi-protocol...

Instant Messaging (IM) · • Integrated in to many other apps, gmail, facebook • Multi-protocol...

Date post: 11-Mar-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
16
Instant Messaging (IM)
Transcript
Page 1: Instant Messaging (IM) · • Integrated in to many other apps, gmail, facebook • Multi-protocol IM clients (Gaim, Trillian) exist that bridge these different communities. • Increasing

Instant Messaging (IM)

Page 2: Instant Messaging (IM) · • Integrated in to many other apps, gmail, facebook • Multi-protocol IM clients (Gaim, Trillian) exist that bridge these different communities. • Increasing

Instant Messaging •  IM, as we know it today, began with ICQ (’96) and quickly a large

number of similar IM networks emerged (AIM, MSN, Yahoo). •  Integrated in to many other apps, gmail, facebook •  Multi-protocol IM clients (Gaim, Trillian) exist that bridge these different

communities. •  Increasing IM is not only for personal use but is found in the business

world and even the military (IM between soldiers!). •  Lets consider one protocol – MSNP (Mobile Status and Notification

Protocol). Used by MSN Messenger, other MS products and 3rd party vendors.

–  330 million users

•  Official protocol details are hard to come by. Many developers start here - ‘MSNP12’

•  http://msnpiki.msnfanatic.com/index.php/Main_Page •  Early IETF draft MSNP1 (1999, Microsoft)

•  http://www.hypothetic.org/docs/msn/ietf_draft.txt

Page 3: Instant Messaging (IM) · • Integrated in to many other apps, gmail, facebook • Multi-protocol IM clients (Gaim, Trillian) exist that bridge these different communities. • Increasing

MSNP •  Mobile Status and Notification Protocol (MSNP). •  Supports ‘presence’, ‘messaging’ and direct file

transfers. –  Presence: Providing online status (i.e., busy, away), and attributes

about available resources (i.e., webcam) of the IM client. –  Messaging: The exchange of messages between IM clients.

•  MSNP clients connect to multiple parties during their operation: –  Dispatch Server: Provides client with an IP of a Notification Server. –  Notification Server: Provides authentication, responsible for ‘presence’ maintenance, supports the use of switchboards.

–  Switchboard Server: IM clients connect to the same switchboard via which messages are exchanged.

–  Other MSNP clients: Allow a P2P exchange of files (images, custom emoticons).

•  Uses TCP between client and servers on known ports for out of band between clients (file transfer)

Page 4: Instant Messaging (IM) · • Integrated in to many other apps, gmail, facebook • Multi-protocol IM clients (Gaim, Trillian) exist that bridge these different communities. • Increasing

More information

•  The course book does not cover IM •  The spec defines many of the messages

used in the example scenario and defines the functionality of the various servers

•  I would recommend that you read the spec •  http://www.hypothetic.org/docs/msn/ietf_draft.txt

Page 5: Instant Messaging (IM) · • Integrated in to many other apps, gmail, facebook • Multi-protocol IM clients (Gaim, Trillian) exist that bridge these different communities. • Increasing

MSNP in action

Dispatch Server

Notification Server

Switchboard Server

MSNP Client B

MSNP Client A

Discover Appropriate Notification Server

Page 6: Instant Messaging (IM) · • Integrated in to many other apps, gmail, facebook • Multi-protocol IM clients (Gaim, Trillian) exist that bridge these different communities. • Increasing

MSNP in action

Dispatch Server

Notification Server

Switchboard Server

Authenticate, synchronize and provide initial ‘presence’

state of ‘available’

MSNP Client A

MSNP Client B

Page 7: Instant Messaging (IM) · • Integrated in to many other apps, gmail, facebook • Multi-protocol IM clients (Gaim, Trillian) exist that bridge these different communities. • Increasing

MSNP in action

Dispatch Server

Notification Server

Switchboard Server

Notification Server updates B of A’s ‘presence’ state being available. B requests

a switchboard server.

MSNP Client A

MSNP Client B

Page 8: Instant Messaging (IM) · • Integrated in to many other apps, gmail, facebook • Multi-protocol IM clients (Gaim, Trillian) exist that bridge these different communities. • Increasing

MSNP in action

Dispatch Server

Notification Server

Switchboard Server MSNP Client A

MSNP Client B

B establishes connection to switchboard provided by

Notification Server

Page 9: Instant Messaging (IM) · • Integrated in to many other apps, gmail, facebook • Multi-protocol IM clients (Gaim, Trillian) exist that bridge these different communities. • Increasing

MSNP in action

Dispatch Server

Notification Server

Switchboard Server MSNP Client A

MSNP Client B

B invites A to the switchboard

A receives request from B to join switchboard

Page 10: Instant Messaging (IM) · • Integrated in to many other apps, gmail, facebook • Multi-protocol IM clients (Gaim, Trillian) exist that bridge these different communities. • Increasing

MSNP in action

Dispatch Server

Notification Server

Switchboard Server MSNP Client A

MSNP Client B

A sends MIME encoded Instant Message to B

Page 11: Instant Messaging (IM) · • Integrated in to many other apps, gmail, facebook • Multi-protocol IM clients (Gaim, Trillian) exist that bridge these different communities. • Increasing

MSNP in action

Dispatch Server

Notification Server

Switchboard Server MSNP Client A

MSNP Client B

Message from A to B

Page 12: Instant Messaging (IM) · • Integrated in to many other apps, gmail, facebook • Multi-protocol IM clients (Gaim, Trillian) exist that bridge these different communities. • Increasing

MSNP in action

Dispatch Server

Notification Server

Switchboard Server MSNP Client A

MSNP Client B

File Transfer Negotiation between

B and A

Page 13: Instant Messaging (IM) · • Integrated in to many other apps, gmail, facebook • Multi-protocol IM clients (Gaim, Trillian) exist that bridge these different communities. • Increasing

MSNP in action

Dispatch Server

Notification Server

Switchboard Server MSNP Client A

MSNP Client B

Forward File Transfer Negotiation

Page 14: Instant Messaging (IM) · • Integrated in to many other apps, gmail, facebook • Multi-protocol IM clients (Gaim, Trillian) exist that bridge these different communities. • Increasing

MSNP in action

Dispatch Server

Notification Server

Switchboard Server MSNP Client A

MSNP Client B

File

Page 15: Instant Messaging (IM) · • Integrated in to many other apps, gmail, facebook • Multi-protocol IM clients (Gaim, Trillian) exist that bridge these different communities. • Increasing

Sending a message Client A was invited to connect to switch board. It connected on port 1863 and provided authentication string and session id.

Server informs Client A that Client B is already at this session id

Client A send B a message. Requesting the reception to be acknowledged.

C: ANS 1 [email protected] 849102291.520491113 11752013\r\n!S: IRO 1 1 2 [email protected] Client B\r\n!S: ANS 1 OK\r\n!C: MSG 4 N 133\r\n! MIME-Version: 1.0\r\n! Content-Type: <attribute pairs>! X-MMS-IM-Format: <attribute pairs>! \r\n! Hello! How are you?!C: ACK 4!

ANS - accept a request from switchboard (c=>s) IRO - provide roster (s=>c)

Page 16: Instant Messaging (IM) · • Integrated in to many other apps, gmail, facebook • Multi-protocol IM clients (Gaim, Trillian) exist that bridge these different communities. • Increasing

File transfer

MSG [email protected] clientA 277\r\n !MIME-Version: 1.0\r\n !Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n \r\n Application-Name: File Transfer\r\n !Application-GUID: {5D3E02AB-6190-11d3-BBBB-00C04F795683}\r\n Invitation-Command: INVITE\r\n !Invitation-Cookie: 135395\r\n !Application-File: turtle.txt\r\n!

Application-FileSize: 2341\r\n \r\n

Client A asks B to accept a file transfer, it does so by sending a message to the switchboard, which is forwarded to B.

Filename and size

Client B accepts (omited). Client A responds. <partial fragment of message>!

MSG [email protected] clientA 244\r\n !MIME-Version: 1.0\r\n !Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n \r\n Invitation-Command: ACCEPT\r\n !Invitation-Cookie: 135395\r\n !IP-Address: 203.121.147.134\r\n Port: 6891\r\n !AuthCookie: 1639797\r\n Launch-Application: FALSE\r\n Request-Data: IP-Address:\r\n \r\n !

ClientA provides an IP and port for B to use.


Recommended