Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.82 KB | None | 0 0
  1. == Protocol Header ==
  2. Two versions of the CSP header exists. The 0.9 version was used prior to November 2010, when it was replaced with a new header with support for more hosts and ports. The priority field is currently unused in both headers, since CSP does not support [[Quality of service]] (QoS). The reserved bits must be set to 0. Note that the CSP header does not include a length field. If required, this must be implemented by the physical layer interface.
  3.  
  4. === Version 0.9 ===
  5. The original CSP header supported up to 16 hosts on the network, with 32 ports available on each host. Address 15 is reserved for broadcast traffic. The port range is divided into three segments. Ports 0 to 7 are used for general services such as ping and buffer status, and are implemented by the CSP service handler. The ports from 8 to 15 are used for subsystem specific services. The remaining ports, from 16 to 31, are ephemeral ports used for outgoing connections. Bits 28 and 29 are used for marking packets with HMAC and XTEA encryption.
  6. {| class="wikitable" style="text-align:center"
  7. |+CSP Header
  8. |-
  9. ! Bit offset !!<tt style="font-size:8pt; line-height:1">&nbsp;0</tt>!!<tt style="font-size:8pt; line-height:1">&nbsp;1</tt>!!<tt style="font-size:8pt; line-height:1">&nbsp;2</tt>!!<tt style="font-size:8pt; line-height:1">&nbsp;3</tt>!!<tt style="font-size:8pt; line-height:1">&nbsp;4</tt>!!<tt style="font-size:8pt; line-height:1">&nbsp;5</tt>!!<tt style="font-size:8pt; line-height:1">&nbsp;6</tt>!!<tt style="font-size:8pt; line-height:1">&nbsp;7</tt>!!<tt style="font-size:8pt; line-height:1">&nbsp;8</tt>!!<tt style="font-size:8pt; line-height:1">&nbsp;9</tt>!!<tt style="font-size:8pt; line-height:1; font-family=verdana; font-color:blue">10</tt>!!<tt style="font-size:8pt; line-height:1">11</tt>!!<tt style="font-size:8pt; line-height:1;font-color:green">12</tt>!!<tt style="font-size:8pt; line-height:1">13</tt>!!<tt style="font-size:8pt; line-height:1">14</tt>!!<tt style="font-size:8pt; line-height:1; font-color:yellow">15</tt>!!<tt style="font-size:8pt; line-height:1">16</tt>!!<tt style="font-size:8pt; line-height:1;font-color:orange">17</tt>!!<tt style="font-size:8pt; line-height:1">18</tt>!!<tt style="font-size:8pt; line-height:1">19</tt>!!<tt style="font-size:8pt; line-height:1;font-color:orange">20</tt>!!<tt style="font-size:8pt; line-height:1">21</tt>!!<tt style="font-size:8pt; line-height:1;font-color:orange">22</tt>!!<tt style="font-size:8pt; line-height:1;font-color:orange">23</tt>!!<tt style="font-size:8pt; line-height:1">24</tt>!!<tt style="font-size:8pt; line-height:1">25</tt>!!<tt style="font-size:8pt; line-height:1">26</tt>!!<tt style="font-size:8pt; line-height:1">27</tt>!!<tt style="font-size:8pt; line-height:1">28</tt>!!<tt style="font-size:8pt; line-height:1">29</tt>!!<tt style="font-size:8pt; line-height:1">30</tt>!!<tt style="font-size:8pt; line-height:1">31</tt>
  10. |-
  11. | '''0''' || colspan="3"| Protocol || colspan="3" | Priority || colspan="4" | Source || colspan="4"| Destination || colspan="5"| Destination<br>Port || colspan="5"| Source<br>Port || colspan="4"| Reserved ||colspan="1"|<tt style="font-size:8pt; line-height:1">H<br>M<br>A<br>C</tt>||colspan="1"|<tt style="font-size:8pt; line-height:1">X<br>T<br>E<br>A</tt> ||colspan="1"|<tt style="font-size:8pt; line-height:1">R<br>E<br>S<br>1</tt> ||colspan="1"|<tt style="font-size:8pt; line-height:1">R<br>E<br>S<br>2</tt>
  12. |-
  13. | '''32''' || colspan="32" bgcolor="#FFDDDD" | Data (0 - 65535 bytes)
  14. |}
  15. The CSP header does not include a length field. If required, this must be implemented by the physical layer interface before the header.
  16.  
  17. === Version 1+ ===
  18. In November 2010, the header was redefined to support more hosts and ports. The protocol field was removed, and RDP packets instead are identified by a set bit in the flags field. The priority field was adjusted to two bits, and the freed bits were used to double both the host and port range. CSP now supports up to 32 hosts on the network, with 64 ports available on each host. Address 31 is reserved for broadcast traffic.
  19.  
  20. The port range is still divided into three adjustable segments. Ports 0 to 7 are used for general services such as ping and buffer status, and are implemented by the CSP service handler. The ports from 8 to 47 are used for subsystem specific services. All remaining ports, from 48 to 63, are ephemeral ports used for outgoing connections. The bits from 28 to 31 are used for marking packets with HMAC, XTEA encryption, RDP header and CRC32 checksum.
  21. {| class="wikitable" style="text-align:center"
  22. |+CSP Header
  23. |-
  24. ! Bit offset !!<tt style="font-size:8pt; line-height:1">&nbsp;0</tt>!!<tt style="font-size:8pt; line-height:1">&nbsp;1</tt>!!<tt style="font-size:8pt; line-height:1">&nbsp;2</tt>!!<tt style="font-size:8pt; line-height:1">&nbsp;3</tt>!!<tt style="font-size:8pt; line-height:1">&nbsp;4</tt>!!<tt style="font-size:8pt; line-height:1">&nbsp;5</tt>!!<tt style="font-size:8pt; line-height:1">&nbsp;6</tt>!!<tt style="font-size:8pt; line-height:1">&nbsp;7</tt>!!<tt style="font-size:8pt; line-height:1">&nbsp;8</tt>!!<tt style="font-size:8pt; line-height:1">&nbsp;9</tt>!!<tt style="font-size:8pt; line-height:1; font-family=verdana; font-color:blue">10</tt>!!<tt style="font-size:8pt; line-height:1">11</tt>!!<tt style="font-size:8pt; line-height:1;font-color:green">12</tt>!!<tt style="font-size:8pt; line-height:1">13</tt>!!<tt style="font-size:8pt; line-height:1">14</tt>!!<tt style="font-size:8pt; line-height:1; font-color:yellow">15</tt>!!<tt style="font-size:8pt; line-height:1">16</tt>!!<tt style="font-size:8pt; line-height:1;font-color:orange">17</tt>!!<tt style="font-size:8pt; line-height:1">18</tt>!!<tt style="font-size:8pt; line-height:1">19</tt>!!<tt style="font-size:8pt; line-height:1;font-color:orange">20</tt>!!<tt style="font-size:8pt; line-height:1">21</tt>!!<tt style="font-size:8pt; line-height:1;font-color:orange">22</tt>!!<tt style="font-size:8pt; line-height:1;font-color:orange">23</tt>!!<tt style="font-size:8pt; line-height:1">24</tt>!!<tt style="font-size:8pt; line-height:1">25</tt>!!<tt style="font-size:8pt; line-height:1">26</tt>!!<tt style="font-size:8pt; line-height:1">27</tt>!!<tt style="font-size:8pt; line-height:1">28</tt>!!<tt style="font-size:8pt; line-height:1">29</tt>!!<tt style="font-size:8pt; line-height:1">30</tt>!!<tt style="font-size:8pt; line-height:1">31</tt>
  25. |-
  26. | '''0''' || colspan="2"| Priority || colspan="5"| Source || colspan="5"| Destination || colspan="6"| Destination<br>Port || colspan="6"| Source<br>Port || colspan="4"| Reserved ||colspan="1"|<tt style="font-size:8pt; line-height:1">H<br>M<br>A<br>C</tt>||colspan="1"|<tt style="font-size:8pt; line-height:1">X<br>T<br>E<br>A</tt> ||colspan="1"|<tt style="font-size:8pt; line-height:1">R<br>D<br>P</tt> ||colspan="1"|<tt style="font-size:8pt; line-height:1">C<br>R<br>C</tt>
  27. |-
  28. | '''32''' || colspan="32" bgcolor="#FFDDDD" | Data (0 - 65535 bytes)
  29. |}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement