EarthLink SIPshare peers builds its network by sending to each peer in its peers file a stateful SIP Subscribe message Here, the Peer A at 209.179.2.62 is "subscribing" to the peer list of Peer B at 209.179.2.61.:
SUBSCRIBE sip: peer-list@209.179.2.61; transport = udp SIP / 2.0 Call-ID: 5560a044871b02ba7074e4816857f27d@209.179.2.62 CSeq: 1 SUBSCRIBE From: "fluxMark" ; tag = 1308 To: "Peer List" Via: SIP / 2.0 / UDP 209.179.2.62:5060;branch=z9hG4bKed6ffbb76ca2ed9b3aa7d938cb05ee19 Max-Forwards: 70 Contact: "fluxMark" Event: x-earthlink-sip-fpx Accept: application / x-earthlink-peerlist-fpx Content-Length: 0 to which Peer B responds SIP / 2.0 200 OK Call-ID: 5560a044871b02ba7074e4816857f27d@209.179.2.62 CSEQ: 1 Subscribe from: "fluxmark" ; tag = 1308 TO: "peer list" ; tag = 9791 VIA: SIP / 2.0 / UDP 209.179.2.62:5060; branch=z9hg4bked6ffbb76ca2ed9b3aa7d938ca2ed9b3aa7d938cb05ee19 max-forwards: 70 Contact: "far fruit" Expires: 86400 Content-Length: 0 thus creating a dialog for subsequent Notify messages When Peer B learns of peers not already part of its network, it sends an in-dialog Notify to each Peer A that has subscribed to its. Peer List
NOTIFY sip: msp@209.179.2.62: 5060; transport = udp SIP / 2.0 Call-ID: 5560a044871b02ba7074e4816857f27d@209.179.2.62 CSeq: 1 NOTIFY To: "fluxMark" ; tag = 1308 From: "Peer List" ; tag = 9791 Max-Forwards: 70 Via: SIP / 2.0 / UDP 209.179.2.61:5060;branch=z9hG4bKe20d35dcc81aef8501106f28a47d9036 Contact: "fargesiaMark" Event: X-EarthLink-Sip-fpx subscription-state: active; expires = 86400 content-type: Application / X-Earthlink-peerlist-fpx content-length: 96 XML Version = "1.0" Encoding = "UTF-8"?> 209.179.2.62 peerlist> FOLLOWED BY 200 OK from Peer a SIP / 2.0 200 OK Call-ID: 5560A044871B02BA7074E4816857F27D@209.179. 2.62 CSEQ: 1 Notify TO: "FLUXMARK" ; tag = 1308 from: "peer List" ; tag = 9791 Max-Forwards: 70 Via: SIP / 2.0 / UDP 209.179.2.61:5060;branch=z9hG4bKe20d35dcc81aef8501106f28a47d9036 Contact: "fluxMark" Content -Leerth: 0 in this case, Peer B Is Informing Peer a That B NOW KNOWS ABOUT A. this is not particularly useful to peer a, but when b '
s network grows, A will learn from B the addresses of other hosts not A. Distributed content searchWhen Peer U wishes to locate content on the network, it sends a search message to all the Peers V to whom it has subscribed for peer lists. This choice of to which peers to send a content search message is somewhat arbitrary. We could have chosen to send to all peers W of which we are simply aware, whether we are subscribed to their respective peer lists or not, and which is a superset of All peers v. we chose the set v for simplicity.that said, peer u replicity a stateless subscribe to peer v, To whom it happens to be subscribed for peer lists:
SUBSCRIBE sip: search@209.179.2.62; transport = udp SIP / 2.0 Call-ID: d33a2b31a59ea843a33a37e20c56aade@209.179.2.61 CSeq: 1 SUBSCRIBE From: "fargesiaMark" ; tag = 5256 To: "Search " Via: SIP / 2.0 / UDP 209.179.2.61:5060;branch=30392e3137392e322e36313a3530363 Max-Forwards: 70 Contact:" fargesiaMark " Event: X-EarthLink-Sip-fpx accept: Application / X-Earthlink-cachehits-fpx content-type: Application / X-EarthLink-SearchFilter-FPX Content-Length: 88
XML Version = "1.0" Encoding = "UTF-8"?> mount Note That The Subscribe Body Contains a filter document specifying in what content peer u is intended. Peer V responds: SIP / 2.0 200 OK Call-ID: d33a2b31a59ea843a33a37e20c56aade@209.179.2.61 CSeq: 1 SUBSCRIBE From: "fargesiaMark" ; tag = 5256 To: "Search" ; tag = 6132 Via: SIP / 2.0 / UDP 209.179.2.61:5060;branch=30392e3137392e322e36313a3530363 Max-Forwards: 70 Contact: "fluxMark" Expires: 0 Content-Length: 0
NOTIFY sip: 102@209.179.2.61: 5060; transport = udp SIP / 2.0 Call-ID: 03fc7456478dfef5548c5c47af4b2cae@209.179.2.62 CSeq: 1 NOTIFY From: "fluxMark" ; tag = 6243 To: Via: SIP / 2.0 / UDP 209.179.2.62:5060;branch=30392e3137392e322e36323a3530363 Max-Forwards: 70 Contact: "fluxMark" Event: X-EarthLink-Sip-fpx subscription-state: Terminated Content-Type: Application / X-Earthlink-cachehits-fpx content-length: 216 Xml version = "1.0" encoding = "UTF -8 "?> mountains.jpg name> 3342000 size> 287af1e2a0180a4df0edd01ee9b38130 digest> Where peer v Sends a stateless notify Containing Content Hit Information To Peer u's Contact Header Field. Note That with the Notify Message sent, the "subscription" for this content has expired and is terminated. If Peer U wants to be notified of new content on Peer W that matches this same regex, Peer V must perform another search to pick up information on this new content. Peer Wll No, in Other Words, Notify Peer u if Matching Content Develops on W After The Initial Search by u. Peer U Sends ITS 200 OK in Response To Peer V'S Notify:
SIP / 2.0 200 OK Call-ID: 03fc7456478dfef5548c5c47af4b2cae@209.179.2.62 CSeq: 1 NOTIFY From: "fluxMark" ; tag = 6243 To: ; tag = 789 Via: SIP / 2.0 / UDP 209.179.2.62:5060;branch=30392e3137392e322e36323a3530363 Max-Forwards: 70 Contact: "fargesiaMark" Content- Length: 0 The content search becomes fully distributed on behalf of Peer U, when all Peers V send a similar message (not shown) to all Peers W known to it, preserving the Contact header field value from the original message from Peer U. Each receiving Peer W examines its content store and issues a Notify to Peer U similar to Peer V's Notify above, but matching W's content store, not V's. to prevent searches from circulating indefinitely on the network, each Peer W maintains a list of Call-IDs Seen Up to Some Maximum Number, And Refuses To Forward Search Messages Bearin g call-ids seen in the paste.
Content transferWhen Peer U locates interesting content on Peer W, it can request a content transfer using a SIP Invite message The Invite is made to the hash of the content file, learned from the associated Notify above:. INVITE sip: 287af1e2a0180a4df0edd01ee9b38130@209.179.2.62 ; transport = udp SIP / 2.0 Call-ID: a8d78ccab367086072f280ef0b818bca@209.179.2.61 CSeq: 1 INVITE From: "fargesiaMark" ; tag = 6591 To: "Download" Via: SIP / 2.0 / UDP 209.179.2.61:5060;branch=z9hG4bK9e89e38564ca687a0a0ad1a9ec5f23c1 Max-Forwards: 70 Contact: "fargesiaMark" Allow: INVITE, BYE, SUBSCRIBE , Notify Content-Type: Application / SDP Content-Length: 91 V = 0 o = - 0 0 in IP4 209.179.2.62 S = EarthLinkPFX C = in IP4 209.179.2.62 T = 0 m = Data 1960 UDP The Invite SDP body contains offer information on where to connect to the Peer W's FSP file server process, in this case 209.179.2.62 UDP port 1960. Peer W responds with a 200 OK, but changes the SDP service port to match where its FSP server is running and AWAITING FILE TRANSFER BLOCK Requests:
SIP / 2.0 200 OK Call-ID: a8d78ccab367086072f280ef0b818bca@209.179.2.61 CSeq: 1 INVITE From: "fargesiaMark" ; tag = 6591 To: "Download" ; tag = 8923 Via: SIP / 2.0 / UDP 209.179.2.61:5060;branch=z9hG4bK9e89e38564ca687a0a0ad1a9ec5f23c1 Max-Forwards: 70 Content-Type: application / sdp Contact: "fluxMark" Content-Length: 97 V = 0 o = - 0 0 in IP4 209.179.2.62 s = EarthLinkPFX C = in IP4 209.179.2.62 T = 0 M = Data 2121 UDP Which is Followed by Peer u's ACK