| < draft-ietf-ppsp-base-tracker-protocol-08.txt | draft-ietf-ppsp-base-tracker-protocol-09.txt > | |||
|---|---|---|---|---|
| PPSP Rui S. Cruz | PPSP Rui S. Cruz | |||
| INTERNET-DRAFT Mario S. Nunes | INTERNET-DRAFT Mario S. Nunes | |||
| Intended Status: Standards Track IST/INESC-ID/INOV | Intended Status: Standards Track IST/INESC-ID/INOV | |||
| Expires: July 12, 2015 Yingjie Gu | Expires: September 28, 2015 Yingjie Gu | |||
| Jinwei Xia | Jinwei Xia | |||
| Rachel Huang | Rachel Huang | |||
| Huawei | Huawei | |||
| Joao P. Taveira | Joao P. Taveira | |||
| IST/INOV | IST/INOV | |||
| Deng Lingli | Deng Lingli | |||
| China Mobile | China Mobile | |||
| January 8, 2015 | March 27, 2015 | |||
| PPSP Tracker Protocol-Base Protocol (PPSP-TP/1.0) | PPSP Tracker Protocol-Base Protocol (PPSP-TP/1.0) | |||
| draft-ietf-ppsp-base-tracker-protocol-08 | draft-ietf-ppsp-base-tracker-protocol-09 | |||
| Abstract | Abstract | |||
| This document specifies the base Peer-to-Peer Streaming Protocol- | This document specifies the base Peer-to-Peer Streaming Protocol- | |||
| Tracker Protocol (PPSP-TP/1.0), an application-layer control | Tracker Protocol (PPSP-TP/1.0), an application-layer control | |||
| (signaling) protocol for the exchange of meta information between | (signaling) protocol for the exchange of meta information between | |||
| trackers and peers. The specification outlines the architecture of | trackers and peers. The specification outlines the architecture of | |||
| the protocol and its functionality, and describes message flows, | the protocol and its functionality, and describes message flows, | |||
| message processing instructions, message formats, formal syntax and | message processing instructions, message formats, formal syntax and | |||
| semantics. The PPSP Tracker Protocol enables cooperating peers to | semantics. The PPSP Tracker Protocol enables cooperating peers to | |||
| skipping to change at page 16, line 20 ¶ | skipping to change at page 15, line 20 ¶ | |||
| 4) While TRACKING, a CONNECT message received from that Peer ID with | 4) While TRACKING, a CONNECT message received from that Peer ID with | |||
| valid swarm actions information (section 4.1.1) resets the "track | valid swarm actions information (section 4.1.1) resets the "track | |||
| timer" and is responded with a successful condition. | timer" and is responded with a successful condition. | |||
| 2.3.2 Error Conditions | 2.3.2 Error Conditions | |||
| Peers MUST NOT generate protocol elements that are invalid. | Peers MUST NOT generate protocol elements that are invalid. | |||
| However, several situations of a Peer may lead to abnormal | However, several situations of a Peer may lead to abnormal | |||
| conditions in the interaction with the Tracker. The situations | conditions in the interaction with the Tracker. The situations | |||
| may be related with Peer malfunction or communications errors. | may be related with Peer malfunction or communications errors. The | |||
| The Tracker reacts to the abnormal situations depending on its | Tracker reacts to the abnormal situations depending on its current | |||
| current state related to a Peer ID, as follows: | state related to a Peer ID, as follows: | |||
| A) At PEER REGISTERED state, when a CONNECT Request only contains | A) At PEER REGISTERED state, when a CONNECT Request only contains | |||
| invalid swarm actions (section 6.1.1), the Tracker responds with | invalid swarm actions (section 6.1.1), the Tracker responds with | |||
| error code 403 Forbidden, deletes the registration, transition to | error code 403 Forbidden, deletes the registration, transition to | |||
| TERMINATE state for that Peer ID and the SM is destroyed. | TERMINATE state for that Peer ID and the SM is destroyed. | |||
| At the PEER REGISTERED state, if the Peer ID is considered invalid | At the PEER REGISTERED state, if the Peer ID is considered invalid | |||
| (in the case of a CONNECT request or in the case of FIND or | (in the case of a CONNECT request or in the case of FIND or | |||
| STAT_REPORT requests received from an unregistered Peer ID), the | STAT_REPORT requests received from an unregistered Peer ID), the | |||
| Tracker responds with either error codes authentication required | Tracker responds with either error codes authentication required | |||
| skipping to change at page 18, line 34 ¶ | skipping to change at page 17, line 34 ¶ | |||
| o upload_bandwidth_level is the preferred upload bandwidth capability | o upload_bandwidth_level is the preferred upload bandwidth capability | |||
| of these peers. | of these peers. | |||
| The definition of the scope selector element and attributes is | The definition of the scope selector element and attributes is | |||
| defined as follows: | defined as follows: | |||
| Object { | Object { | |||
| ppsp_tp_integer_t peer_count; | ppsp_tp_integer_t peer_count; | |||
| [ppsp_tp_string_t ability_nat = "NO_NAT" | [ppsp_tp_string_t ability_nat = "NO_NAT" | |||
| | "STUN" | | "STUN" | |||
| | "TURN" | | "TURN";] | |||
| | "PROXY";] | ||||
| [ppsp_tp_string_t concurrent_links = "NORMAL" | [ppsp_tp_string_t concurrent_links = "NORMAL" | |||
| | "LOW" | | "LOW" | |||
| | "HIGH";] | | "HIGH";] | |||
| [ppsp_tp_string_t online_time = "NORMAL" | "HIGH";] | [ppsp_tp_string_t online_time = "NORMAL" | "HIGH";] | |||
| [ppsp_tp_string_t upload_bandwidth_level = "NORMAL" | [ppsp_tp_string_t upload_bandwidth_level = "NORMAL" | |||
| | "HIGH";] | | "HIGH";] | |||
| } ppsp_tp_peer_num_t; | } ppsp_tp_peer_num_t; | |||
| 3.2.3 Swarm Action Element | 3.2.3 Swarm Action Element | |||
| skipping to change at page 20, line 34 ¶ | skipping to change at page 19, line 34 ¶ | |||
| o The IPv4 address is encoded as specified by the IPv4address rule in | o The IPv4 address is encoded as specified by the IPv4address rule in | |||
| Section 3.2.2 of [RFC3986]. | Section 3.2.2 of [RFC3986]. | |||
| o The IPv6 address is encoded as specified in section 4 of [RFC5952]. | o The IPv6 address is encoded as specified in section 4 of [RFC5952]. | |||
| Object { | Object { | |||
| ppsp_tp_string_t address_type; | ppsp_tp_string_t address_type; | |||
| ppsp_tp_addr_value address; | ppsp_tp_addr_value address; | |||
| } ppsp_tp_ip_address; | } ppsp_tp_ip_address; | |||
| The Peer Information in requests or responses is grouped in a | The Peer Information in responses is grouped in a | |||
| ppsp_tp_peer_group_t element: | ppsp_tp_peer_group_t element: | |||
| Object { | Object { | |||
| ppsp_tp_peer_info_t peer_info<1..*>; | ppsp_tp_peer_info_t peer_info<1..*>; | |||
| } ppsp_tp_peer_group_t; | } ppsp_tp_peer_group_t; | |||
| 3.2.5 Statistics and Status Information Element | 3.2.5 Statistics and Status Information Element | |||
| The statistics element (stat) is used to describe several properties | The statistics element (stat) is used to describe several properties | |||
| relevant to the P2P network. These properties can be related with | relevant to the P2P network. These properties can be related with | |||
| skipping to change at page 21, line 12 ¶ | skipping to change at page 20, line 12 ¶ | |||
| all the swarms the peer is actively involved. This specification | all the swarms the peer is actively involved. This specification | |||
| only defines the property type "STREAM_STATS". | only defines the property type "STREAM_STATS". | |||
| The definition of the statistic element and attributes is as follows: | The definition of the statistic element and attributes is as follows: | |||
| Object { | Object { | |||
| ppsp_tp_string_t swarm_id; | ppsp_tp_string_t swarm_id; | |||
| ppsp_tp_integer_t uploaded_bytes; | ppsp_tp_integer_t uploaded_bytes; | |||
| ppsp_tp_integer_t downloaded_bytes; | ppsp_tp_integer_t downloaded_bytes; | |||
| ppsp_tp_integer_t available_bandwidth; | ppsp_tp_integer_t available_bandwidth; | |||
| ppsp_tp_integer_t concurrent_links; | ||||
| } stream_stats; | } stream_stats; | |||
| The semantics of stream_stats attributes are listed in Table 4: | The semantics of stream_stats attributes are listed in Table 4: | |||
| +----------------------+----------------------------------+ | +----------------------+----------------------------------+ | |||
| | Element or Attribute | Description | | | Element or Attribute | Description | | |||
| +----------------------+----------------------------------+ | +----------------------+----------------------------------+ | |||
| | swarm_id | Swarm Identifier | | | swarm_id | Swarm Identifier | | |||
| | uploaded_bytes | Bytes sent to swarm | | | uploaded_bytes | Bytes sent to swarm | | |||
| | downloaded_bytes | Bytes received from swarm | | | downloaded_bytes | Bytes received from swarm | | |||
| | available_bandwidth | Upstream Bandwidth available | | | available_bandwidth | Upstream Bandwidth available | | |||
| | concurrent_links | The number of concurrent links | | ||||
| +----------------------+----------------------------------+ | +----------------------+----------------------------------+ | |||
| Table 4: Semantics of stream_stats. | Table 4: Semantics of stream_stats. | |||
| The Stat Information is grouped in the ppsp_tp_stat_group_t element: | The Stat Information is grouped in the ppsp_tp_stat_group_t element: | |||
| Object { | Object { | |||
| ppsp_tp_string_t type = "STREAM_STATS"; // property type | ppsp_tp_string_t type = "STREAM_STATS"; // property type | |||
| stream_stats stat<1..*>; | stream_stats stat<1..*>; | |||
| } ppsp_tp_stat_group_t | } ppsp_tp_stat_group_t | |||
| skipping to change at page 28, line 13 ¶ | skipping to change at page 28, line 13 ¶ | |||
| would be similar but, optionally not including the peer_num element: | would be similar but, optionally not including the peer_num element: | |||
| POST / HTTP/1.1 | POST / HTTP/1.1 | |||
| Host: tracker.example.com | Host: tracker.example.com | |||
| Content-Length: 494 | Content-Length: 494 | |||
| Content-Type: application/ppsp-tracker+json | Content-Type: application/ppsp-tracker+json | |||
| Accept: application/ppsp-tracker+json | Accept: application/ppsp-tracker+json | |||
| { | { | |||
| "PPSPTrackerProtocol": { | "PPSPTrackerProtocol": { | |||
| "version": 0x01; | "version": 1, | |||
| "request_type": "CONNECT"; | "request_type": "CONNECT", | |||
| "transaction_id" "12345"; | "transaction_id" "12345", | |||
| "peer_id": "656164657220"; | "peer_id": "656164657220", | |||
| "connect":{ | "connect":{ | |||
| "peer_num": { | "peer_num": { | |||
| "peer_count": 15; | "peer_count": 15, | |||
| "ability_nat": "STUN"; | "ability_nat": "STUN", | |||
| "concurrent_links": "NORMAL"; | "concurrent_links": "NORMAL", | |||
| "online_time": "NORMAL"; | "online_time": "NORMAL", | |||
| "upload_bandwidth_level": "NORMAL"; | "upload_bandwidth_level": "NORMAL" | |||
| }; | }, | |||
| "peer_addr": { | "peer_addr": { | |||
| "ip_address": { | "ip_address": { | |||
| "address_type": "ipv4"; | "address_type": "ipv4", | |||
| "address": "192.0.2.2"; | "address": "192.0.2.2" | |||
| }; | }, | |||
| "port": 80; | "port": 80, | |||
| "priority": 1; | "priority": 1, | |||
| "type": "HOST"; | "type": "HOST", | |||
| "connection": "ETHER"; | "connection": "ETHER", | |||
| "asn": "45645"; | "asn": "45645" | |||
| }; | }, | |||
| "Swarm_action": { | "Swarm_action": { | |||
| "swarm_id": "1111"; | "swarm_id": "1111", | |||
| "action": "JOIN"; | "action": "JOIN", | |||
| "peer_mode": "SEED"; | "peer_mode": "SEED" | |||
| }; | }, | |||
| "Swarm_action": { | "Swarm_action": { | |||
| "swarm_id": "2222"; | "swarm_id": "2222", | |||
| "action": "JOIN"; | "action": "JOIN", | |||
| "peer_mode": "SEED"; | "peer_mode": "SEED" | |||
| }; | } | |||
| }; | } | |||
| }; | } | |||
| } | } | |||
| Another example of the message-body of a CONNECT Request corresponds | Another example of the message-body of a CONNECT Request corresponds | |||
| to a peer (PeerMode is LEECH, meaning that the peer is not in | to a peer (PeerMode is LEECH, meaning that the peer is not in | |||
| possession of the content) requesting join to a swarm, in order to | possession of the content) requesting join to a swarm, in order to | |||
| start receiving the stream, and providing optional information on the | start receiving the stream, and providing optional information on the | |||
| addresses of its network interface(s): | addresses of its network interface(s): | |||
| { | { | |||
| "PPSPTrackerProtocol": { | "PPSPTrackerProtocol": { | |||
| "version": 0x01; | "version": 1, | |||
| "request_type": "CONNECT"; | "request_type": "CONNECT", | |||
| "transaction_id" "12345.0"; | "transaction_id" "12345.0", | |||
| "peer_id": "656164657221"; | "peer_id": "656164657221", | |||
| "connect":{ | "connect":{ | |||
| "peer_num": { | "peer_num": { | |||
| "peer_count": 5; | "peer_count": 5, | |||
| "ability_nat": "STUN"; | "ability_nat": "STUN", | |||
| "concurrent_links": "NORMAL"; | "concurrent_links": "NORMAL", | |||
| "online_time": "NORMAL"; | "online_time": "NORMAL", | |||
| "upload_bandwidth_level": "NORMAL"; | "upload_bandwidth_level": "NORMAL" | |||
| }; | }, | |||
| "peer_addr": { | "peer_addr": { | |||
| "ip_address": { | "ip_address": { | |||
| "address_type": "ipv4"; | "address_type": "ipv4", | |||
| "address": "192.0.2.2"; | "address": "192.0.2.2" | |||
| }; | }, | |||
| "port": 80; | "port": 80, | |||
| "priority": 1; | "priority": 1, | |||
| "type": "HOST"; | "type": "HOST", | |||
| "connection": "ETHER"; | "connection": "ETHER", | |||
| "asn": "3256546"; | "asn": "3256546" | |||
| }; | }, | |||
| "peer_addr": { | "peer_addr": { | |||
| "ip_address":{ | "ip_address":{ | |||
| "address_type": "ipv6"; | "address_type": "ipv6", | |||
| "address": "2001:db8::2"; | "address": "2001:db8::2" | |||
| }; | }, | |||
| "port": 80; | "port": 80, | |||
| "priority": 2; | "priority": 2, | |||
| "type": "HOST"; | "type": "HOST", | |||
| "connection": "3G"; | "connection": "3G", | |||
| "asn": "34563456"; | "asn": "34563456", | |||
| "peer_protocol": "PPSP-PP"; | "peer_protocol": "PPSP-PP" | |||
| }; | }, | |||
| "swarm_action": { | "swarm_action": { | |||
| "swarm_id": "1111"; | "swarm_id": "1111", | |||
| "action": "JOIN"; | "action": "JOIN", | |||
| "peer_mode": "LEECH"; | "peer_mode": "LEECH" | |||
| }; | } | |||
| }; | } | |||
| } | } | |||
| The next example of a CONNECT Request corresponds to a peer "leaving" | The next example of a CONNECT Request corresponds to a peer "leaving" | |||
| a previously joined swarm and requesting join to a new swarm. This is | a previously joined swarm and requesting join to a new swarm. This is | |||
| the typical example of a user watching a live channel but then | the typical example of a user watching a live channel but then | |||
| deciding to switch to a different one: | deciding to switch to a different one: | |||
| { | { | |||
| "PPSPTrackerProtocol": { | "PPSPTrackerProtocol": { | |||
| "version": 0x01; | "version": 1, | |||
| "request_type": "CONNECT"; | "request_type": "CONNECT", | |||
| "TransactionID": "12345"; | "TransactionID": "12345", | |||
| "peer_id": "656164657221"; | "peer_id": "656164657221", | |||
| "connect":{ | "connect":{ | |||
| "peer_num": { | "peer_num": { | |||
| "peer_count": 5; | "peer_count": 5, | |||
| "ability_nat": "STUN"; | "ability_nat": "STUN", | |||
| "concurrent_links": "NORMAL"; | "concurrent_links": "NORMAL", | |||
| "online_time": "NORMAL"; | "online_time": "NORMAL", | |||
| "upload_bandwidth_level": "NORMAL"; | "upload_bandwidth_level": "NORMAL" | |||
| }; | }, | |||
| "swarm_action": { | "swarm_action": { | |||
| "swarm_id": "1111"; | "swarm_id": "1111", | |||
| "action": "LEAVE"; | "action": "LEAVE", | |||
| "peer_mode": "LEECH"; | "peer_mode": "LEECH" | |||
| }; | }, | |||
| "swarm_action": { | "swarm_action": { | |||
| "swarm_id": "2222"; | "swarm_id": "2222", | |||
| "action": "JOIN"; | "action": "JOIN", | |||
| "@peer_mode": "LEECH"; | "@peer_mode": "LEECH" | |||
| }; | } | |||
| }; | } | |||
| } | } | |||
| The next example illustrates the Response for the previous example of | The next example illustrates the Response for the previous example of | |||
| CONNECT Request where the peer requested two swarm actions and not | CONNECT Request where the peer requested two swarm actions and not | |||
| more than 5 other peers, receiving from the Tracker a peer list with | more than 5 other peers, receiving from the Tracker a peer list with | |||
| only 2 two other peers in the swarm "2222": | only 2 two other peers in the swarm "2222": | |||
| HTTP/1.1 200 OK | HTTP/1.1 200 OK | |||
| Content-Length: 1342 | Content-Length: 1342 | |||
| Content-Type: application/ppsp-tracker+json | Content-Type: application/ppsp-tracker+json | |||
| { | { | |||
| "PPSPTrackerProtocol": { | "PPSPTrackerProtocol": { | |||
| "version": 0x01; | "version": 1, | |||
| "response_type": 0x00; | "response_type": 0x00, | |||
| "error_code": 0; | "error_code": 0, | |||
| "transaction_id": "12345"; | "transaction_id": "12345", | |||
| "peer_addr": { | "peer_addr": { | |||
| "ip_address": { | "ip_address": { | |||
| "address_type": "ipv4"; | "address_type": "ipv4", | |||
| "address": "198.51.100.1"; | "address": "198.51.100.1" | |||
| }; | }, | |||
| "port": 80; | "port": 80, | |||
| "priority": 1; | "priority": 1, | |||
| "asn": "64496"; | "asn": "64496" | |||
| }; | }, | |||
| "swarm_result": { | "swarm_result": { | |||
| "swarm_id": "2222"; | "swarm_id": "2222", | |||
| "result": 0x00; | "result": 0x00, | |||
| "peer_group": { | "peer_group": { | |||
| "peer_info": { | "peer_info": { | |||
| "peer_id": "956264622298"; | "peer_id": "956264622298", | |||
| "peer_addr": { | "peer_addr": { | |||
| "ip_address": { | "ip_address": { | |||
| "address_type": "ipv4"; | "address_type": "ipv4", | |||
| "address": "198.51.100.22"; | "address": "198.51.100.22" | |||
| }; | }, | |||
| "port": 80; | "port": 80, | |||
| "priority": 2; | "priority": 2, | |||
| "type": "REFLEXIVE"; | "type": "REFLEXIVE", | |||
| "connection": "ADSL"; | "connection": "ADSL", | |||
| "asn": "64496"; | "asn": "64496", | |||
| "peer_protocol": "PPSP-PP" | "peer_protocol": "PPSP-PP" | |||
| }; | } | |||
| }; | }, | |||
| "peer_info": { | "peer_info": { | |||
| "peer_id": "3332001256741"; | "peer_id": "3332001256741", | |||
| "peer_addr": { | "peer_addr": { | |||
| "ip_address": { | "ip_address": { | |||
| "address_type": "ipv4"; | "address_type": "ipv4", | |||
| "address": "198.51.100.201"; | "address": "198.51.100.201" | |||
| }; | }, | |||
| "port": 80; | "port": 80, | |||
| "priority": 2; | "priority": 2, | |||
| "type": "REFLEXIVE"; | "type": "REFLEXIVE", | |||
| "connection": "ADSL"; | "connection": "ADSL", | |||
| "asn": "64496"; | "asn": "64496", | |||
| "peer_protocol": "PPSP-PP"; | "peer_protocol": "PPSP-PP" | |||
| }; | } | |||
| }; | } | |||
| }; | } | |||
| }; | } | |||
| } | } | |||
| 4.1.2 FIND Request | 4.1.2 FIND Request | |||
| This method allows peers to request to the tracker, whenever needed, | This method allows peers to request to the tracker, whenever needed, | |||
| a new peer list for the swarm. | a new peer list for the swarm. | |||
| The FIND request MAY include a peer_number element to indicate to the | The FIND request MAY include a peer_number element to indicate to the | |||
| tracker the maximum number of peers to be returned in a list | tracker the maximum number of peers to be returned in a list | |||
| corresponding to the indicated conditions set by the requesting peer, | corresponding to the indicated conditions set by the requesting peer, | |||
| skipping to change at page 33, line 30 ¶ | skipping to change at page 33, line 30 ¶ | |||
| 4.1.2.1 Example | 4.1.2.1 Example | |||
| An example of the message-body of a FIND Request, where the peer | An example of the message-body of a FIND Request, where the peer | |||
| requests to the Tracker an list of not more than 5 peers in the swarm | requests to the Tracker an list of not more than 5 peers in the swarm | |||
| "1111" conforming to the characteristics expressed (concurrent links, | "1111" conforming to the characteristics expressed (concurrent links, | |||
| online time, and upload bandwidth level) is the following: | online time, and upload bandwidth level) is the following: | |||
| { | { | |||
| "PPSPTrackerProtocol": { | "PPSPTrackerProtocol": { | |||
| "version": 0x01; | "version": 1, | |||
| "request_type": "FIND"; | "request_type": "FIND", | |||
| "transaction_id": "12345"; | "transaction_id": "12345", | |||
| "peer_id": "656164657221"; | "peer_id": "656164657221", | |||
| "swarm_id": "1111"; | "swarm_id": "1111", | |||
| "peer_num": { | "peer_num": { | |||
| "peer_count": 5; | "peer_count": 5, | |||
| "ability_nat": "STUN"; | "ability_nat": "STUN", | |||
| "concurrent_links": "HIGH"; | "concurrent_links": "HIGH", | |||
| "online_time": "NORMAL"; | "online_time": "NORMAL", | |||
| "upload_bandwidth_level": "NORMAL"; | "upload_bandwidth_level": "NORMAL" | |||
| }; | } | |||
| }; | } | |||
| } | } | |||
| An example of the message-body of a Response for the above FIND | An example of the message-body of a Response for the above FIND | |||
| Request, including the requesting peer public IP address information, | Request, including the requesting peer public IP address information, | |||
| is the following: | is the following: | |||
| { | { | |||
| "PPSPTrackerProtocol": { | "PPSPTrackerProtocol": { | |||
| "version": 0x01; | "version": 1, | |||
| "response_type": 0x00; | "response_type": 0x00, | |||
| "error_code": 0; | "error_code": 0, | |||
| "transaction_id": "12345"; | "transaction_id": "12345", | |||
| "swarm_result": { | "swarm_result": { | |||
| "swarm_id": "1111"; | "swarm_id": "1111", | |||
| "result": 0x00; | "result": 0x00, | |||
| "peer_group": { | "peer_group": { | |||
| "peer_info": { | "peer_info": { | |||
| "peer_id": "656164657221"; | "peer_id": "656164657221", | |||
| "peer_addr": { | "peer_addr": { | |||
| "ip_address": { | "ip_address": { | |||
| "address_type": "ipv4"; | "address_type": "ipv4", | |||
| "address": "198.51.100.1"; | "address": "198.51.100.1" | |||
| }; | }, | |||
| "port": 80; | "port": 80, | |||
| "priority": 1; | "priority": 1, | |||
| "type": "REFLEXIVE"; | "type": "REFLEXIVE", | |||
| "connection": "3G"; | "connection": "3G", | |||
| "asn": "64496"; | "asn": "64496" | |||
| }; | } | |||
| }; | }, | |||
| "peer_info": { | "peer_info": { | |||
| "peer_id": "956264622298"; | "peer_id": "956264622298", | |||
| "peer_addr": { | "peer_addr": { | |||
| "ip_address": { | "ip_address": { | |||
| "address_type": "ipv4"; | "address_type": "ipv4", | |||
| "address": "198.51.100.22"; | "address": "198.51.100.22" | |||
| }; | }, | |||
| "port": 80; | "port": 80, | |||
| "priority": 1; | "priority": 1, | |||
| "type": "REFLEXIVE"; | "type": "REFLEXIVE", | |||
| "connection": "3G"; | "connection": "3G", | |||
| "asn": "64496"; | "asn": "64496" | |||
| }; | } | |||
| }; | }, | |||
| "peer_info": { | "peer_info": { | |||
| "peer_id": "3332001256741"; | "peer_id": "3332001256741", | |||
| "peer_addr": { | "peer_addr": { | |||
| "ip_address": { | "ip_address": { | |||
| "address_type": "ipv4"; | "address_type": "ipv4", | |||
| "address": "198.51.100.201"; | "address": "198.51.100.201" | |||
| }; | }, | |||
| "port": 80; | "port": 80, | |||
| "priority": 1; | "priority": 1, | |||
| "type": "REFLEXIVE"; | "type": "REFLEXIVE", | |||
| "connection": "3G"; | "connection": "3G", | |||
| "asn": "64496"; | "asn": "64496" | |||
| }; | } | |||
| }; | } | |||
| }; | } | |||
| }; | } | |||
| }; | } | |||
| } | } | |||
| 4.1.3 STAT_REPORT Request | 4.1.3 STAT_REPORT Request | |||
| This method allows peers to send status and statistic data to | This method allows peers to send status and statistic data to | |||
| trackers. The method is initiated by the peer, periodically while | trackers. The method is initiated by the peer, periodically while | |||
| active. | active. | |||
| The peer MUST set the request_type to "STAT_REPORT", set the peer_id | The peer MUST set the request_type to "STAT_REPORT", set the peer_id | |||
| with the identifier of the peer, and generate and set the | with the identifier of the peer, and generate and set the | |||
| transaction_id. | transaction_id. | |||
| The report MAY include multiple statistics elements describing | The report MAY include multiple statistics elements describing | |||
| several properties relevant to a specific swarm. These properties | several properties relevant to a specific swarm. These properties | |||
| can be related with stream statistics and peer status information, | can be related with stream statistics and peer status information, | |||
| including uploaded_bytes, downloaded_bytes, available_bandwidth and | including uploaded_bytes, downloaded_bytes, available_bandwidth, | |||
| etc. | concurrent_links and etc. | |||
| Other properties may be defined (guidelines in Section 7.1) related | Other properties may be defined (guidelines in Section 7.1) related | |||
| for example, with incentives and reputation mechanisms. In case no | for example, with incentives and reputation mechanisms. In case no | |||
| Statistics Group is included, the STAT_REPORT is used as a "keep- | Statistics Group is included, the STAT_REPORT is used as a "keep- | |||
| alive" message to prevent the tracker from de-registering the peer | alive" message to prevent the tracker from de-registering the peer | |||
| when "track timer" expires. | when "track timer" expires. | |||
| If the request is valid the tracker processes the received | If the request is valid the tracker processes the received | |||
| information for future use, and generates a response message with a | information for future use, and generates a response message with a | |||
| Response value of SUCCESSFUL. | Response value of SUCCESSFUL. | |||
| The response MUST have the same transaction_id value as the request. | The response MUST have the same transaction_id value as the request. | |||
| 4.1.3.1 Example | 4.1.3.1 Example | |||
| An example of the message-body of a STAT_REPORT Request is: | An example of the message-body of a STAT_REPORT Request is: | |||
| { | { | |||
| "PPSPTrackerProtocol": { | "PPSPTrackerProtocol": { | |||
| "version": 0x01; | "version": 1, | |||
| "request_type": "STAT_REPORT"; | "request_type": "STAT_REPORT", | |||
| "transaction_id": "12345"; | "transaction_id": "12345", | |||
| "peer_id": "656164657221"; | "peer_id": "656164657221", | |||
| "stat_report": { | "stat_report": { | |||
| "type": "STREAM_STATS"; | "type": "STREAM_STATS", | |||
| "Stat": { | "Stat": { | |||
| "swarm_id": "1111"; | "swarm_id": "1111", | |||
| "uploaded_bytes": 512; | "uploaded_bytes": 512, | |||
| "downloaded_bytes": 768; | "downloaded_bytes": 768, | |||
| "available_bandwidth": 1024000; | "available_bandwidth": 1024000, | |||
| }; | "concurrent_links": 5 | |||
| }; | } | |||
| }; | } | |||
| } | ||||
| } | } | |||
| An example of the message-body of a Response for the START_REPORT | An example of the message-body of a Response for the START_REPORT | |||
| Request is: | Request is: | |||
| { | { | |||
| "PPSPTrackerProtocol": { | "PPSPTrackerProtocol": { | |||
| "version": 0x01; | "version": 1, | |||
| "response_type": 0x00; | "response_type": 0x00, | |||
| "error_code": 0; | "error_code": 0, | |||
| "transaction_id": "12345"; | "transaction_id": "12345", | |||
| "swarm_result": { | "swarm_result": { | |||
| "swarm_id": "1111"; | "swarm_id": "1111", | |||
| "result": 0x00; | "result": 0x00 | |||
| }; | } | |||
| }; | } | |||
| } | } | |||
| 4.2 Response element in response Messages | 4.2 Response element in response Messages | |||
| Table 7 indicates the response type and corresponding semantics. | Table 7 indicates the response type and corresponding semantics. | |||
| +--------------------+---------------------+ | +--------------------+---------------------+ | |||
| | Response Type | Semantics | | | Response Type | Semantics | | |||
| | | | | | | | | |||
| +--------------------+---------------------+ | +--------------------+---------------------+ | |||
| skipping to change at page 51, line 26 ¶ | skipping to change at page 51, line 26 ¶ | |||
| + refined the presentation language specification to include | + refined the presentation language specification to include | |||
| protocol elements definitions. | protocol elements definitions. | |||
| -05 2014-07-04 Minor Revision | -05 2014-07-04 Minor Revision | |||
| -06 2014-10-27 Minor Revision | -06 2014-10-27 Minor Revision | |||
| -07 2014-12-12 Major Revision | -07 2014-12-12 Major Revision | |||
| + introduced a text-based (JSON) protocol encoding with | + introduced a text-based (JSON) protocol encoding with | |||
| examples for all the messages | examples for all the messages | |||
| + corrections in the specifications of protocol elements | + corrections in the specifications of protocol elements | |||
| + section 5 specification of protocol elements semantics | + section 5 specification of protocol elements semantics | |||
| + introduced a IANA MIME Type registry | + introduced a IANA MIME Type registry | |||
| -08 (Current) Major Revision | -08 2015-01-08 Major Revision | |||
| * merge sections 5 and 4 with section 3; renumbered all other | * merge sections 5 and 4 with section 3; renumbered all other | |||
| + refined the protocol elements definitions for consistency | + refined the protocol elements definitions for consistency | |||
| with the JSON data structures | with the JSON data structures | |||
| + revised protocol messages encoding examples | + revised protocol messages encoding examples | |||
| + additional IANA registry for protocol version | + additional IANA registry for protocol version | |||
| * editorial corrections | * editorial corrections | |||
| -09 (Current version) Major Revision | ||||
| + Add concurrent_link in the stream_stats specification. | ||||
| + Remove "PROXY" value from "ability_nat" specification. | ||||
| + Dividing attributes by "," in the example | ||||
| * editorial corrections | ||||
| Authors' Addresses | Authors' Addresses | |||
| Rui Santos Cruz | Rui Santos Cruz | |||
| IST/INESC-ID/INOV | IST/INESC-ID/INOV | |||
| Phone: +351.939060939 | Phone: +351.939060939 | |||
| Email: rui.cruz@ieee.org | Email: rui.cruz@ieee.org | |||
| Mario Serafim Nunes | Mario Serafim Nunes | |||
| IST/INESC-ID/INOV | IST/INESC-ID/INOV | |||
| End of changes. 48 change blocks. | ||||
| 206 lines changed or deleted | 213 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||