asciidoctor-rfc 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +5 -0
  3. data/.oss-guides.rubocop.yml +1077 -0
  4. data/.rspec +1 -0
  5. data/.rubocop.yml +19 -1063
  6. data/.travis.yml +3 -2
  7. data/Guardfile +22 -0
  8. data/README.adoc +1151 -0
  9. data/Rakefile +1 -1
  10. data/asciidoctor-rfc.gemspec +20 -3
  11. data/bin/asciidoctor-rfc2 +15 -0
  12. data/bin/asciidoctor-rfc3 +15 -0
  13. data/bin/rspec +0 -1
  14. data/lib/asciidoctor-rfc.rb +4 -0
  15. data/lib/asciidoctor/rfc/common/base.rb +218 -0
  16. data/lib/asciidoctor/rfc/common/front.rb +120 -0
  17. data/lib/asciidoctor/rfc/v2/base.rb +341 -0
  18. data/lib/asciidoctor/rfc/v2/blocks.rb +192 -0
  19. data/lib/asciidoctor/rfc/v2/converter.rb +64 -0
  20. data/lib/asciidoctor/rfc/v2/front.rb +69 -0
  21. data/lib/asciidoctor/rfc/v2/inline_anchor.rb +102 -0
  22. data/lib/asciidoctor/rfc/v2/lists.rb +134 -0
  23. data/lib/asciidoctor/rfc/v2/table.rb +112 -0
  24. data/lib/asciidoctor/rfc/v2/validate.rb +738 -0
  25. data/lib/asciidoctor/rfc/v2/validate2.rng +716 -0
  26. data/lib/asciidoctor/rfc/v3/base.rb +358 -0
  27. data/lib/asciidoctor/rfc/v3/blocks.rb +203 -0
  28. data/lib/asciidoctor/rfc/v3/converter.rb +64 -0
  29. data/lib/asciidoctor/rfc/v3/front.rb +115 -0
  30. data/lib/asciidoctor/rfc/v3/inline_anchor.rb +90 -0
  31. data/lib/asciidoctor/rfc/v3/lists.rb +190 -0
  32. data/lib/asciidoctor/rfc/v3/svg.rng +9081 -0
  33. data/lib/asciidoctor/rfc/v3/table.rb +65 -0
  34. data/lib/asciidoctor/rfc/v3/validate.rb +2168 -0
  35. data/lib/asciidoctor/rfc/v3/validate.rng +2143 -0
  36. data/lib/asciidoctor/rfc/version.rb +2 -2
  37. data/spec/asciidoctor/rfc/v2/appendix_spec.rb +124 -0
  38. data/spec/asciidoctor/rfc/v2/area_spec.rb +60 -0
  39. data/spec/asciidoctor/rfc/v2/author_spec.rb +444 -0
  40. data/spec/asciidoctor/rfc/v2/comments_spec.rb +316 -0
  41. data/spec/asciidoctor/rfc/v2/crossref_spec.rb +205 -0
  42. data/spec/asciidoctor/rfc/v2/date_spec.rb +166 -0
  43. data/spec/asciidoctor/rfc/v2/dlist_spec.rb +108 -0
  44. data/spec/asciidoctor/rfc/v2/document_spec.rb +161 -0
  45. data/spec/asciidoctor/rfc/v2/example_spec.rb +50 -0
  46. data/spec/asciidoctor/rfc/v2/front_spec.rb +75 -0
  47. data/spec/asciidoctor/rfc/v2/image_spec.rb +81 -0
  48. data/spec/asciidoctor/rfc/v2/indexterm_spec.rb +66 -0
  49. data/spec/asciidoctor/rfc/v2/inline_formatting_spec.rb +177 -0
  50. data/spec/asciidoctor/rfc/v2/keyword_spec.rb +63 -0
  51. data/spec/asciidoctor/rfc/v2/listing_spec.rb +59 -0
  52. data/spec/asciidoctor/rfc/v2/literal_spec.rb +53 -0
  53. data/spec/asciidoctor/rfc/v2/olist_spec.rb +147 -0
  54. data/spec/asciidoctor/rfc/v2/paragraph_spec.rb +68 -0
  55. data/spec/asciidoctor/rfc/v2/preamble_spec.rb +140 -0
  56. data/spec/asciidoctor/rfc/v2/quote_spec.rb +24 -0
  57. data/spec/asciidoctor/rfc/v2/references_spec.rb +96 -0
  58. data/spec/asciidoctor/rfc/v2/section_spec.rb +260 -0
  59. data/spec/asciidoctor/rfc/v2/sidebar_spec.rb +32 -0
  60. data/spec/asciidoctor/rfc/v2/table_spec.rb +293 -0
  61. data/spec/asciidoctor/rfc/v2/ulist_spec.rb +96 -0
  62. data/spec/asciidoctor/rfc/v2/workgroup_spec.rb +60 -0
  63. data/spec/asciidoctor/rfc/v3/appendix_spec.rb +130 -0
  64. data/spec/asciidoctor/rfc/v3/area_spec.rb +63 -0
  65. data/spec/asciidoctor/rfc/v3/author_spec.rb +540 -0
  66. data/spec/asciidoctor/rfc/v3/comments_spec.rb +308 -0
  67. data/spec/asciidoctor/rfc/v3/crossref_spec.rb +269 -0
  68. data/spec/asciidoctor/rfc/v3/date_spec.rb +149 -0
  69. data/spec/asciidoctor/rfc/v3/dlist_spec.rb +121 -0
  70. data/spec/asciidoctor/rfc/v3/document_spec.rb +109 -0
  71. data/spec/asciidoctor/rfc/v3/example_spec.rb +34 -0
  72. data/spec/asciidoctor/rfc/v3/front_spec.rb +43 -0
  73. data/spec/asciidoctor/rfc/v3/image_spec.rb +81 -0
  74. data/spec/asciidoctor/rfc/v3/indexterm_spec.rb +69 -0
  75. data/spec/asciidoctor/rfc/v3/inline_formatting_spec.rb +319 -0
  76. data/spec/asciidoctor/rfc/v3/keyword_spec.rb +33 -0
  77. data/spec/asciidoctor/rfc/v3/link_spec.rb +34 -0
  78. data/spec/asciidoctor/rfc/v3/listing_spec.rb +59 -0
  79. data/spec/asciidoctor/rfc/v3/literal_spec.rb +51 -0
  80. data/spec/asciidoctor/rfc/v3/olist_spec.rb +168 -0
  81. data/spec/asciidoctor/rfc/v3/paragraph_spec.rb +73 -0
  82. data/spec/asciidoctor/rfc/v3/preamble_spec.rb +112 -0
  83. data/spec/asciidoctor/rfc/v3/quote_spec.rb +91 -0
  84. data/spec/asciidoctor/rfc/v3/references_spec.rb +147 -0
  85. data/spec/asciidoctor/rfc/v3/section_spec.rb +198 -0
  86. data/spec/asciidoctor/rfc/v3/series_info_spec.rb +151 -0
  87. data/spec/asciidoctor/rfc/v3/sidebar_spec.rb +30 -0
  88. data/spec/asciidoctor/rfc/v3/table_spec.rb +275 -0
  89. data/spec/asciidoctor/rfc/v3/ulist_spec.rb +74 -0
  90. data/spec/asciidoctor/rfc/v3/workgroup_spec.rb +33 -0
  91. data/spec/examples/davies-template-bare-06.adoc +361 -0
  92. data/spec/examples/davies-template-bare-06.xml.orig +426 -0
  93. data/spec/examples/example-v2.adoc +181 -0
  94. data/spec/examples/example-v2.xml +675 -0
  95. data/spec/examples/example-v3.adoc +185 -0
  96. data/spec/examples/example-v3.xml +1009 -0
  97. data/spec/examples/mib-doc-template-xml-06.adoc +596 -0
  98. data/spec/examples/mib-doc-template-xml-06.xml.orig +654 -0
  99. data/spec/examples/rfc1149.md +76 -0
  100. data/spec/examples/rfc1149.md.2.xml +94 -0
  101. data/spec/examples/rfc1149.md.3.xml +93 -0
  102. data/spec/examples/rfc1149.md.adoc +65 -0
  103. data/spec/examples/rfc2100.md +149 -0
  104. data/spec/examples/rfc2100.md.2.xml +169 -0
  105. data/spec/examples/rfc2100.md.3.xml +163 -0
  106. data/spec/examples/rfc2100.md.adoc +136 -0
  107. data/spec/examples/rfc3514.md +203 -0
  108. data/spec/examples/rfc3514.md.2.xml +238 -0
  109. data/spec/examples/rfc3514.md.3.xml +258 -0
  110. data/spec/examples/rfc3514.md.adoc +324 -0
  111. data/spec/examples/rfc5841.md +342 -0
  112. data/spec/examples/rfc5841.md.2.xml +393 -0
  113. data/spec/examples/rfc5841.md.3.xml +449 -0
  114. data/spec/examples/rfc5841.md.adoc +414 -0
  115. data/spec/examples/rfc6350.adoc +3499 -0
  116. data/spec/examples/rfc6350.bib +763 -0
  117. data/spec/examples/rfc748.md +79 -0
  118. data/spec/examples/rfc748.md.2.xml +116 -0
  119. data/spec/examples/rfc748.md.3.xml +109 -0
  120. data/spec/examples/rfc748.md.adoc +80 -0
  121. data/spec/examples/rfc7511.md +257 -0
  122. data/spec/examples/rfc7511.md.2.xml +300 -0
  123. data/spec/examples/rfc7511.md.3.xml +347 -0
  124. data/spec/examples/rfc7511.md.adoc +417 -0
  125. data/spec/spec_helper.rb +115 -5
  126. metadata +274 -9
  127. data/.hound.yml +0 -3
  128. data/README.md +0 -84
  129. data/lib/asciidoctor/rfc.rb +0 -7
  130. data/spec/asciidoctor-rfc/.keep +0 -0
@@ -0,0 +1,393 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE rfc SYSTEM 'rfc2629.dtd' []>
3
+ <rfc ipr="trust200902" category="info" docName="rfc-5841">
4
+ <?rfc toc="no"?>
5
+ <?rfc symrefs="yes"?>
6
+ <?rfc sortrefs="yes"?>
7
+ <?rfc compact="yes"?>
8
+ <?rfc subcompact="no"?>
9
+ <?rfc private=""?>
10
+ <?rfc topblock="yes"?>
11
+ <?rfc comments="no"?>
12
+ <front>
13
+ <title abbrev="TCP Option to Denote Packet Mood">TCP Option to Denote Packet Mood</title>
14
+
15
+ <author initials="R." surname="Hay" fullname="Richard Hay">
16
+ <organization>Google</organization>
17
+ <address>
18
+ <postal>
19
+ <street>1600 Amphitheatre Pkwy</street>
20
+ <city>Mountain View</city>
21
+ <code>CA 94043</code>
22
+ <country></country>
23
+ <region></region>
24
+ </postal>
25
+ <phone></phone>
26
+ <email>rhay@google.com</email>
27
+ <uri></uri>
28
+ </address>
29
+ </author>
30
+ <author initials="W." surname="Turkal" fullname="Warren Turkal">
31
+ <organization>Google</organization>
32
+ <address>
33
+ <postal>
34
+ <street>1600 Amphitheatre Pkwy</street>
35
+ <city>Mountain View</city>
36
+ <code>CA 94043</code>
37
+ <country></country>
38
+ <region></region>
39
+ </postal>
40
+ <phone></phone>
41
+ <email>turkal@google.com</email>
42
+ <uri></uri>
43
+ </address>
44
+ </author>
45
+ <date year="2010" month="April" day="1"/>
46
+
47
+ <area>Internet</area>
48
+ <workgroup>Network Working Group</workgroup>
49
+ <keyword></keyword>
50
+
51
+
52
+ <abstract>
53
+ <t>This document proposes a new TCP option to denote packet mood.
54
+ </t>
55
+ </abstract>
56
+
57
+
58
+ </front>
59
+
60
+ <middle>
61
+
62
+ <section anchor="introduction" title="Introduction">
63
+ <t>In an attempt to anthropomorphize the bit streams on countless
64
+ physical layer networks throughout the world, we propose a TCP option
65
+ to express packet mood <xref target="DSM-IV"/>.
66
+ </t>
67
+ <t>Packets cannot feel. They are created for the purpose of moving data
68
+ from one system to another. However, it is clear that in specific
69
+ situations some measure of emotion can be inferred or added. For
70
+ instance, a packet that is retransmitted to resend data for a packet
71
+ for which no ACK was received could be described as an 'angry'
72
+ packet, or a 'frustrated' packet (if it is not the first
73
+ retransmission for instance). So how can these kinds of feelings be
74
+ conveyed in the packets themselves. This can be addressed by adding
75
+ TCP Options <xref target="RFC0793"/> to the TCP header, using ASCII characters that
76
+ encode commonly used &quot;emoticons&quot; to convey packet mood.
77
+ </t>
78
+
79
+ <section anchor="terminology" title="Terminology">
80
+ <t>The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD,
81
+ SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL, when they appear in this
82
+ document, are to be interpreted as described in <xref target="RFC2119"/>.
83
+ </t>
84
+ </section>
85
+ </section>
86
+
87
+ <section anchor="syntax" title="Syntax">
88
+ <t>A TCP Option has a 1-byte kind field, followed by a 1-byte length
89
+ field <xref target="RFC0793"/>. It is proposed that option 25 (released 2000-12-18)
90
+ be used to define packet mood. This option would have a length value
91
+ of 4 or 5 bytes. All the simple emotions described as expressible
92
+ via this mechanism can be displayed with two or three 7-bit, ASCII-
93
+ encoded characters. Multiple mood options may appear in a TCP
94
+ header, so as to express more complex moods than those defined here
95
+ (for instance if a packet were happy and surprised).
96
+ </t>
97
+
98
+ <figure align="center" title="TCP Header Format
99
+ "><artwork align="center">
100
+ Kind Length Meaning
101
+ ---- -------- -------
102
+ 25 Variable Packet Mood
103
+ </artwork></figure>
104
+ <t>In more detail:
105
+ </t>
106
+
107
+ <figure align="left"><artwork align="left">
108
+ +--------+--------+--------+--------+
109
+ |00011001|00000100|00111010|00101001|
110
+ +--------+--------+--------+--------+
111
+ Kind=25 Length=4 ASCII : ASCII )
112
+
113
+ +--------+--------+--------+--------+--------+
114
+ |00011001|00000101|00111110|00111010|01000000|
115
+ +--------+--------+--------+--------+--------+
116
+ Kind=25 Length=5 ASCII &gt; ACSII : ASCII @
117
+ </artwork></figure>
118
+ </section>
119
+
120
+ <section anchor="simple-emotional-representation" title="Simple Emotional Representation">
121
+ <t>It is proposed that common emoticons be used to denote packet mood.
122
+ Packets do not &quot;feel&quot; per se. The emotions they could be tagged with
123
+ are a reflection of the user mood expressed through packets.
124
+ </t>
125
+ <t>So the humanity expressed in a packet would be entirely sourced from
126
+ humans.
127
+ </t>
128
+ <t>To this end, it is proposed that simple emotions be used convey mood
129
+ as follows.
130
+ </t>
131
+
132
+ <figure align="left"><artwork align="left">
133
+ ASCII Mood
134
+ ===== ====
135
+ :) Happy
136
+ :( Sad
137
+ :D Amused
138
+ %( Confused
139
+ :o Bored
140
+ :O Surprised
141
+ :P Silly
142
+ :@ Frustrated
143
+ &gt;:@ Angry
144
+ :| Apathetic
145
+ ;) Sneaky
146
+ &gt;:) Evil
147
+ </artwork></figure>
148
+ <t>Proposed ASCII character encoding
149
+ </t>
150
+
151
+ <figure align="left"><artwork align="left">
152
+ Binary Dec Hex Character
153
+ ======== === === =========
154
+ 010 0101 37 25 %
155
+ 010 1000 40 28 (
156
+ 010 1001 41 29 )
157
+ 011 1010 58 3A :
158
+ 011 1011 59 3B ;
159
+ 011 1110 62 3E &gt;
160
+ 100 0000 64 40 @
161
+ 100 0100 68 44 D
162
+ 100 1111 79 4F O
163
+ 101 0000 80 50 P
164
+ 110 1111 111 6F o
165
+ 111 1100 124 7C |
166
+ </artwork></figure>
167
+ <t>For the purposes of this RFC, 7-bit ASCII encoding is sufficient for
168
+ representing emoticons. The ASCII characters will be sent in 8-bit
169
+ bytes with the leading bit always set to 0.
170
+ </t>
171
+ </section>
172
+
173
+ <section anchor="use-cases" title="Use Cases">
174
+ <t>There are two ways to denote packet mood. One is to infer the mood
175
+ based on an event in the TCP session. The other is to derive mood
176
+ from a higher-order action at a higher layer (subject matter of
177
+ payload for instance).
178
+ </t>
179
+ <t>For packets where the 'mood' is inferred from activity within the TCP
180
+ session, the 'mood' MUST be set by the host that is watching for the
181
+ trigger event. If a client sends a frame and receives no ACK, then
182
+ the retransmitted frame MAY contain the TCP OPTION header with a mood
183
+ set.
184
+ </t>
185
+ <t>Any packet that exhibits behavior that allows for mood to be inferred
186
+ SHOULD add the TCP OPTION to the packets with the implied mood.
187
+ </t>
188
+ <t>Applications can take advantage of the defined moods by expressing
189
+ them in the packets. This can be done in the SYN packet sent from
190
+ the client. All packets in the session can be then tagged with the
191
+ mood set in the SYN packet, but this would have a per-packet
192
+ performance cost (see <xref target="performance-considerations"/> &quot;Performance Considerations&quot;).
193
+ </t>
194
+ <t>Each application MUST define the preconditions for marking packets as
195
+ happy, sad, bored, confused, angry, apathetic, and so on. This is a
196
+ framework for defining how such moods can be expressed, but it is up
197
+ to the developers to determine when to apply these encoded labels.
198
+ </t>
199
+
200
+ <section anchor="happy-packets" title="Happy Packets">
201
+ <t>Healthy packets are happy packets you could say. If the ACK packets
202
+ return within &lt;10 ms end-to-end from a sender's stack to a receiver's
203
+ stack and back again, this would reflect high-speed bidirectional
204
+ capability, and if no retransmits are required and all ACKs are
205
+ received, all subsequent packets in that session SHOULD be marked as
206
+ 'happy'.
207
+ </t>
208
+ <t>No loss, low-latency packets also makes for happy users. So the
209
+ packet would be reflecting the end-user experience.
210
+ </t>
211
+ </section>
212
+
213
+ <section anchor="sad-packets" title="Sad Packets">
214
+ <t>If retransmission rates achieve greater than 20% of all packets sent
215
+ in a session, it is fair to say the session can be in mourning for
216
+ all of the good packets lost in the senseless wasteland of the wild
217
+ Internet.
218
+ </t>
219
+ <t>This should not be confused with retransmitted packets marked as
220
+ 'angry' since this tag would apply to all frames in the session
221
+ numbed by the staggering loss of packet life.
222
+ </t>
223
+ </section>
224
+
225
+ <section anchor="amused-packets" title="Amused Packets">
226
+ <t>Any packet that is carrying a text joke SHOULD be marked as 'amused'.
227
+ </t>
228
+ <t>Example:
229
+ </t>
230
+
231
+ <figure align="left"><artwork align="left">
232
+ 1: Knock Knock
233
+ 2: Who's there?
234
+ 1: Impatient chicken
235
+ 2: Impatient chi...
236
+ 1: BAWK!!!!
237
+ </artwork></figure>
238
+ <t>If such a joke is in the packet payload then, honestly, how can you
239
+ not be amused by one of the only knock-knock jokes that survives the
240
+ 3rd grade?
241
+ </t>
242
+ </section>
243
+
244
+ <section anchor="confused-packets" title="Confused Packets">
245
+ <t>When is a packet confused? There are network elements that perform
246
+ per-packet load balancing, and if there are asymmetries in the
247
+ latencies between end-to-end paths, out-of-order packet delivery can
248
+ occur.
249
+ </t>
250
+ <t>When a receiver host gets out-of-order packets, it SHOULD mark TCP
251
+ ACK packets sent back to the sender as confused.
252
+ </t>
253
+ <t>The same can be said for packets that are sent to incorrect VLAN
254
+ segments or are misdirected. The receivers might be aware that the
255
+ packet is confused, but there is no way to know at ingress if that
256
+ will be the fate of the frame.
257
+ </t>
258
+ <t>That being said, application developers SHOULD mark packets as
259
+ confused if the payload contains complex philosophical questions that
260
+ make one ponder the meaning of life and one's place in the universe.
261
+ </t>
262
+ </section>
263
+
264
+ <section anchor="bored-packets" title="Bored Packets">
265
+ <t>Packets carrying accounting data with debits, credits, and so on MUST
266
+ be marked as 'bored'.
267
+ </t>
268
+ <t>It could be said that many people consider RFCs boring. Packets
269
+ containing RFC text MAY be marked as 'bored'.
270
+ </t>
271
+ <t>Packets with phone book listings MUST be marked 'bored'.
272
+ </t>
273
+ <t>Packets containing legal disclaimers and anything in Latin SHOULD be
274
+ marked 'bored'.
275
+ </t>
276
+ </section>
277
+
278
+ <section anchor="surprised-packets" title="Surprised Packets">
279
+ <t>Who doesn't love when the out-of-order packets in your session
280
+ surprise you while waiting in a congested queue for 20 ms?
281
+ </t>
282
+ <t>Packets do not have birthdays, so packets can be marked as surprised
283
+ when they encounter unexpected error conditions.
284
+ </t>
285
+ <t>So when ICMP destination unreachable messages are received (perhaps
286
+ due to a routing loop or congestion discards), all subsequent packets
287
+ in that session SHOULD be marked as surprised.
288
+ </t>
289
+ </section>
290
+
291
+ <section anchor="silly-packets" title="Silly Packets">
292
+ <t>Not all packets are sent as part of a session. Random keepalives
293
+ during a TCP session MAY be set up as a repartee between systems
294
+ connected as client and server. Such random and even playful
295
+ interchanges SHOULD be marked as silly.
296
+ </t>
297
+ </section>
298
+
299
+ <section anchor="frustrated-packets" title="Frustrated Packets">
300
+ <t>Packets that are retransmitted more than once SHOULD be marked as
301
+ frustrated.
302
+ </t>
303
+ </section>
304
+
305
+ <section anchor="angry-packets" title="Angry Packets">
306
+ <t>Packets that are retransmitted SHOULD be marked as angry.
307
+ </t>
308
+ </section>
309
+
310
+ <section anchor="apathetic-packets" title="Apathetic Packets">
311
+ <t>When sending a RST packet to a connected system, the packet should be
312
+ marked as apathetic so that the receiver knows that your system does
313
+ not care what happens after that.
314
+ </t>
315
+ </section>
316
+
317
+ <section anchor="sneaky-packets" title="Sneaky Packets">
318
+ <t>When a packet is used in a particularly clever way, it SHOULD be
319
+ marked as sneaky. What is &quot;clever&quot; is rather subjective, so it would
320
+ be prudent to get a few opinions about a particular use to make sure
321
+ that it is clever.
322
+ </t>
323
+ </section>
324
+
325
+ <section anchor="evil-packets" title="Evil Packets">
326
+ <t>It is hard for a TCP packet to discern higher moral quandaries like
327
+ the meaning of life or what exactly defines 'evil' and from whose
328
+ perspective such a characterization is being made. However,
329
+ developers of TCP-based applications MAY choose to see some
330
+ activities as evil when viewed through their particular lens of the
331
+ world. At that point, they SHOULD mark packets as evil.
332
+ </t>
333
+ <t>Some organizations are prohibited from using this mood by mission
334
+ statement. This would also prohibit using the security flag in the
335
+ IP header described in <xref target="RFC3514"/> for the same reasons.
336
+ </t>
337
+ </section>
338
+ </section>
339
+
340
+ <section anchor="performance-considerations" title="Performance Considerations">
341
+ <t>Adding extensions to the TCP header has a cost. Using TCP extensions
342
+ with the ASCII-encoded mood of the packet would detract from the
343
+ available MSS usable for data payload. If the TCP header is more
344
+ than 20 bytes, then the extra bytes would be unavailable for use in
345
+ the payload of the frame.
346
+ </t>
347
+ <t>This added per-packet overhead should be considered when using packet
348
+ mood extensions.
349
+ </t>
350
+ </section>
351
+
352
+ <section anchor="security-considerations" title="Security Considerations">
353
+ <t>The TCP checksum, as a 16-bit value, could be mistaken if ASCII
354
+ characters with the same number of zeros and ones were substituted
355
+ out. A happy <spanx style="verb">:)</spanx> could be replaced with a frown by a malicious
356
+ attacker, by using a winking eye <spanx style="verb">;(</spanx>. This could misrepresent the
357
+ intended mood of the sender to the receiver.
358
+ </t>
359
+ </section>
360
+
361
+ <section anchor="related-work" title="Related Work">
362
+ <t>This document does not seek to build a sentient network stack.
363
+ However, this framework could be used to express the emotions of a
364
+ sentient stack. If that were to happen, a new technical job class of
365
+ network psychologists could be created. Who doesn't like new jobs? :)
366
+ </t>
367
+ </section>
368
+
369
+ <section anchor="iana-considerations" title="IANA Considerations">
370
+ <t>If this work is standardized, IANA is requested to officially assign
371
+ value 25 as described in <xref target="simple-emotional-representation"/>. Additional moods and emoticon
372
+ representations would require IESG approval or standards action <xref target="RFC5226"/>.
373
+ </t>
374
+ </section>
375
+
376
+ </middle>
377
+ <back>
378
+ <references title="Informative References">
379
+ <reference anchor='DSM-IV' target='http://www.psychiatryonline.com/resourceTOC.aspx?resourceID=1'>
380
+ <front>
381
+ <title>Diagnostic and Statistical Manual of Mental Disorders (DSM)</title>
382
+ <author></author>
383
+ <date></date>
384
+ </front>
385
+ </reference>
386
+ <?rfc include="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.0793.xml"?>
387
+ <?rfc include="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"?>
388
+ <?rfc include="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3514.xml"?>
389
+ <?rfc include="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5226.xml"?>
390
+ </references>
391
+
392
+ </back>
393
+ </rfc>
@@ -0,0 +1,449 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" category="info" docName="rfc-5841">
3
+ <front>
4
+ <title abbrev="TCP Option to Denote Packet Mood">TCP Option to Denote Packet Mood</title>
5
+
6
+ <author initials="R." surname="Hay" fullname="Richard Hay">
7
+ <organization>Google</organization>
8
+ <address>
9
+ <postal>
10
+ <street>1600 Amphitheatre Pkwy</street>
11
+ <city>Mountain View</city>
12
+ <code>CA 94043</code>
13
+ <country></country>
14
+ <region></region>
15
+ </postal>
16
+ <phone></phone>
17
+ <email>rhay@google.com</email>
18
+ <uri></uri>
19
+ </address>
20
+ </author>
21
+ <author initials="W." surname="Turkal" fullname="Warren Turkal">
22
+ <organization>Google</organization>
23
+ <address>
24
+ <postal>
25
+ <street>1600 Amphitheatre Pkwy</street>
26
+ <city>Mountain View</city>
27
+ <code>CA 94043</code>
28
+ <country></country>
29
+ <region></region>
30
+ </postal>
31
+ <phone></phone>
32
+ <email>turkal@google.com</email>
33
+ <uri></uri>
34
+ </address>
35
+ </author>
36
+ <date year="2010" month="April" day="1"/>
37
+
38
+ <area>Internet</area>
39
+ <workgroup>Network Working Group</workgroup>
40
+ <keyword></keyword>
41
+
42
+
43
+ <abstract>
44
+ <t>
45
+ This document proposes a new TCP option to denote packet mood.
46
+ </t>
47
+ </abstract>
48
+
49
+ </front>
50
+
51
+ <middle>
52
+
53
+ <section anchor="introduction">
54
+ <name>Introduction</name>
55
+ <t>
56
+ In an attempt to anthropomorphize the bit streams on countless
57
+ physical layer networks throughout the world, we propose a TCP option
58
+ to express packet mood <xref target="DSM-IV"/>.
59
+ </t>
60
+ <t>
61
+ Packets cannot feel. They are created for the purpose of moving data
62
+ from one system to another. However, it is clear that in specific
63
+ situations some measure of emotion can be inferred or added. For
64
+ instance, a packet that is retransmitted to resend data for a packet
65
+ for which no ACK was received could be described as an 'angry'
66
+ packet, or a 'frustrated' packet (if it is not the first
67
+ retransmission for instance). So how can these kinds of feelings be
68
+ conveyed in the packets themselves. This can be addressed by adding
69
+ TCP Options <xref target="RFC0793"/> to the TCP header, using ASCII characters that
70
+ encode commonly used &quot;emoticons&quot; to convey packet mood.
71
+ </t>
72
+
73
+ <section anchor="terminology">
74
+ <name>Terminology</name>
75
+ <t>
76
+ The keywords <bcp14>MUST</bcp14>, <bcp14>MUST NOT</bcp14>, <bcp14>REQUIRED</bcp14>, <bcp14>SHALL</bcp14>, <bcp14>SHALL NOT</bcp14>, <bcp14>SHOULD</bcp14>,
77
+ <bcp14>SHOULD NOT</bcp14>, <bcp14>RECOMMENDED</bcp14>, <bcp14>MAY</bcp14>, and <bcp14>OPTIONAL</bcp14>, when they appear in this
78
+ document, are to be interpreted as described in <xref target="RFC2119"/>.
79
+ </t>
80
+ </section>
81
+ </section>
82
+
83
+ <section anchor="syntax">
84
+ <name>Syntax</name>
85
+ <t>
86
+ A TCP Option has a 1-byte kind field, followed by a 1-byte length
87
+ field <xref target="RFC0793"/>. It is proposed that option 25 (released 2000-12-18)
88
+ be used to define packet mood. This option would have a length value
89
+ of 4 or 5 bytes. All the simple emotions described as expressible
90
+ via this mechanism can be displayed with two or three 7-bit, ASCII-
91
+ encoded characters. Multiple mood options may appear in a TCP
92
+ header, so as to express more complex moods than those defined here
93
+ (for instance if a packet were happy and surprised).
94
+ </t>
95
+ <figure align="center">
96
+ <name>TCP Header Format
97
+ </name>
98
+ <artwork>
99
+ Kind Length Meaning
100
+ ---- -------- -------
101
+ 25 Variable Packet Mood
102
+ </artwork>
103
+ </figure>
104
+ <t>
105
+ In more detail:
106
+ </t>
107
+ <artwork align="left">
108
+ +--------+--------+--------+--------+
109
+ |00011001|00000100|00111010|00101001|
110
+ +--------+--------+--------+--------+
111
+ Kind=25 Length=4 ASCII : ASCII )
112
+
113
+ +--------+--------+--------+--------+--------+
114
+ |00011001|00000101|00111110|00111010|01000000|
115
+ +--------+--------+--------+--------+--------+
116
+ Kind=25 Length=5 ASCII &gt; ACSII : ASCII @
117
+ </artwork>
118
+ </section>
119
+
120
+ <section anchor="simple-emotional-representation">
121
+ <name>Simple Emotional Representation</name>
122
+ <t>
123
+ It is proposed that common emoticons be used to denote packet mood.
124
+ Packets do not &quot;feel&quot; per se. The emotions they could be tagged with
125
+ are a reflection of the user mood expressed through packets.
126
+ </t>
127
+ <t>
128
+ So the humanity expressed in a packet would be entirely sourced from
129
+ humans.
130
+ </t>
131
+ <t>
132
+ To this end, it is proposed that simple emotions be used convey mood
133
+ as follows.
134
+ </t>
135
+ <artwork align="left">
136
+ ASCII Mood
137
+ ===== ====
138
+ :) Happy
139
+ :( Sad
140
+ :D Amused
141
+ %( Confused
142
+ :o Bored
143
+ :O Surprised
144
+ :P Silly
145
+ :@ Frustrated
146
+ &gt;:@ Angry
147
+ :| Apathetic
148
+ ;) Sneaky
149
+ &gt;:) Evil
150
+ </artwork>
151
+ <t>
152
+ Proposed ASCII character encoding
153
+ </t>
154
+ <artwork align="left">
155
+ Binary Dec Hex Character
156
+ ======== === === =========
157
+ 010 0101 37 25 %
158
+ 010 1000 40 28 (
159
+ 010 1001 41 29 )
160
+ 011 1010 58 3A :
161
+ 011 1011 59 3B ;
162
+ 011 1110 62 3E &gt;
163
+ 100 0000 64 40 @
164
+ 100 0100 68 44 D
165
+ 100 1111 79 4F O
166
+ 101 0000 80 50 P
167
+ 110 1111 111 6F o
168
+ 111 1100 124 7C |
169
+ </artwork>
170
+ <t>
171
+ For the purposes of this RFC, 7-bit ASCII encoding is sufficient for
172
+ representing emoticons. The ASCII characters will be sent in 8-bit
173
+ bytes with the leading bit always set to 0.
174
+ </t>
175
+ </section>
176
+
177
+ <section anchor="use-cases">
178
+ <name>Use Cases</name>
179
+ <t>
180
+ There are two ways to denote packet mood. One is to infer the mood
181
+ based on an event in the TCP session. The other is to derive mood
182
+ from a higher-order action at a higher layer (subject matter of
183
+ payload for instance).
184
+ </t>
185
+ <t>
186
+ For packets where the 'mood' is inferred from activity within the TCP
187
+ session, the 'mood' <bcp14>MUST</bcp14> be set by the host that is watching for the
188
+ trigger event. If a client sends a frame and receives no ACK, then
189
+ the retransmitted frame <bcp14>MAY</bcp14> contain the TCP OPTION header with a mood
190
+ set.
191
+ </t>
192
+ <t>
193
+ Any packet that exhibits behavior that allows for mood to be inferred
194
+ <bcp14>SHOULD</bcp14> add the TCP OPTION to the packets with the implied mood.
195
+ </t>
196
+ <t>
197
+ Applications can take advantage of the defined moods by expressing
198
+ them in the packets. This can be done in the SYN packet sent from
199
+ the client. All packets in the session can be then tagged with the
200
+ mood set in the SYN packet, but this would have a per-packet
201
+ performance cost (see <xref target="performance-considerations"/> &quot;Performance Considerations&quot;).
202
+ </t>
203
+ <t>
204
+ Each application <bcp14>MUST</bcp14> define the preconditions for marking packets as
205
+ happy, sad, bored, confused, angry, apathetic, and so on. This is a
206
+ framework for defining how such moods can be expressed, but it is up
207
+ to the developers to determine when to apply these encoded labels.
208
+ </t>
209
+
210
+ <section anchor="happy-packets">
211
+ <name>Happy Packets</name>
212
+ <t>
213
+ Healthy packets are happy packets you could say. If the ACK packets
214
+ return within &lt;10 ms end-to-end from a sender's stack to a receiver's
215
+ stack and back again, this would reflect high-speed bidirectional
216
+ capability, and if no retransmits are required and all ACKs are
217
+ received, all subsequent packets in that session <bcp14>SHOULD</bcp14> be marked as
218
+ 'happy'.
219
+ </t>
220
+ <t>
221
+ No loss, low-latency packets also makes for happy users. So the
222
+ packet would be reflecting the end-user experience.
223
+ </t>
224
+ </section>
225
+
226
+ <section anchor="sad-packets">
227
+ <name>Sad Packets</name>
228
+ <t>
229
+ If retransmission rates achieve greater than 20% of all packets sent
230
+ in a session, it is fair to say the session can be in mourning for
231
+ all of the good packets lost in the senseless wasteland of the wild
232
+ Internet.
233
+ </t>
234
+ <t>
235
+ This should not be confused with retransmitted packets marked as
236
+ 'angry' since this tag would apply to all frames in the session
237
+ numbed by the staggering loss of packet life.
238
+ </t>
239
+ </section>
240
+
241
+ <section anchor="amused-packets">
242
+ <name>Amused Packets</name>
243
+ <t>
244
+ Any packet that is carrying a text joke <bcp14>SHOULD</bcp14> be marked as 'amused'.
245
+ </t>
246
+ <t>
247
+ Example:
248
+ </t>
249
+ <artwork align="left">
250
+ 1: Knock Knock
251
+ 2: Who's there?
252
+ 1: Impatient chicken
253
+ 2: Impatient chi...
254
+ 1: BAWK!!!!
255
+ </artwork>
256
+ <t>
257
+ If such a joke is in the packet payload then, honestly, how can you
258
+ not be amused by one of the only knock-knock jokes that survives the
259
+ 3rd grade?
260
+ </t>
261
+ </section>
262
+
263
+ <section anchor="confused-packets">
264
+ <name>Confused Packets</name>
265
+ <t>
266
+ When is a packet confused? There are network elements that perform
267
+ per-packet load balancing, and if there are asymmetries in the
268
+ latencies between end-to-end paths, out-of-order packet delivery can
269
+ occur.
270
+ </t>
271
+ <t>
272
+ When a receiver host gets out-of-order packets, it <bcp14>SHOULD</bcp14> mark TCP
273
+ ACK packets sent back to the sender as confused.
274
+ </t>
275
+ <t>
276
+ The same can be said for packets that are sent to incorrect VLAN
277
+ segments or are misdirected. The receivers might be aware that the
278
+ packet is confused, but there is no way to know at ingress if that
279
+ will be the fate of the frame.
280
+ </t>
281
+ <t>
282
+ That being said, application developers <bcp14>SHOULD</bcp14> mark packets as
283
+ confused if the payload contains complex philosophical questions that
284
+ make one ponder the meaning of life and one's place in the universe.
285
+ </t>
286
+ </section>
287
+
288
+ <section anchor="bored-packets">
289
+ <name>Bored Packets</name>
290
+ <t>
291
+ Packets carrying accounting data with debits, credits, and so on <bcp14>MUST</bcp14>
292
+ be marked as 'bored'.
293
+ </t>
294
+ <t>
295
+ It could be said that many people consider RFCs boring. Packets
296
+ containing RFC text <bcp14>MAY</bcp14> be marked as 'bored'.
297
+ </t>
298
+ <t>
299
+ Packets with phone book listings <bcp14>MUST</bcp14> be marked 'bored'.
300
+ </t>
301
+ <t>
302
+ Packets containing legal disclaimers and anything in Latin <bcp14>SHOULD</bcp14> be
303
+ marked 'bored'.
304
+ </t>
305
+ </section>
306
+
307
+ <section anchor="surprised-packets">
308
+ <name>Surprised Packets</name>
309
+ <t>
310
+ Who doesn't love when the out-of-order packets in your session
311
+ surprise you while waiting in a congested queue for 20 ms?
312
+ </t>
313
+ <t>
314
+ Packets do not have birthdays, so packets can be marked as surprised
315
+ when they encounter unexpected error conditions.
316
+ </t>
317
+ <t>
318
+ So when ICMP destination unreachable messages are received (perhaps
319
+ due to a routing loop or congestion discards), all subsequent packets
320
+ in that session <bcp14>SHOULD</bcp14> be marked as surprised.
321
+ </t>
322
+ </section>
323
+
324
+ <section anchor="silly-packets">
325
+ <name>Silly Packets</name>
326
+ <t>
327
+ Not all packets are sent as part of a session. Random keepalives
328
+ during a TCP session <bcp14>MAY</bcp14> be set up as a repartee between systems
329
+ connected as client and server. Such random and even playful
330
+ interchanges <bcp14>SHOULD</bcp14> be marked as silly.
331
+ </t>
332
+ </section>
333
+
334
+ <section anchor="frustrated-packets">
335
+ <name>Frustrated Packets</name>
336
+ <t>
337
+ Packets that are retransmitted more than once <bcp14>SHOULD</bcp14> be marked as
338
+ frustrated.
339
+ </t>
340
+ </section>
341
+
342
+ <section anchor="angry-packets">
343
+ <name>Angry Packets</name>
344
+ <t>
345
+ Packets that are retransmitted <bcp14>SHOULD</bcp14> be marked as angry.
346
+ </t>
347
+ </section>
348
+
349
+ <section anchor="apathetic-packets">
350
+ <name>Apathetic Packets</name>
351
+ <t>
352
+ When sending a RST packet to a connected system, the packet should be
353
+ marked as apathetic so that the receiver knows that your system does
354
+ not care what happens after that.
355
+ </t>
356
+ </section>
357
+
358
+ <section anchor="sneaky-packets">
359
+ <name>Sneaky Packets</name>
360
+ <t>
361
+ When a packet is used in a particularly clever way, it <bcp14>SHOULD</bcp14> be
362
+ marked as sneaky. What is &quot;clever&quot; is rather subjective, so it would
363
+ be prudent to get a few opinions about a particular use to make sure
364
+ that it is clever.
365
+ </t>
366
+ </section>
367
+
368
+ <section anchor="evil-packets">
369
+ <name>Evil Packets</name>
370
+ <t>
371
+ It is hard for a TCP packet to discern higher moral quandaries like
372
+ the meaning of life or what exactly defines 'evil' and from whose
373
+ perspective such a characterization is being made. However,
374
+ developers of TCP-based applications <bcp14>MAY</bcp14> choose to see some
375
+ activities as evil when viewed through their particular lens of the
376
+ world. At that point, they <bcp14>SHOULD</bcp14> mark packets as evil.
377
+ </t>
378
+ <t>
379
+ Some organizations are prohibited from using this mood by mission
380
+ statement. This would also prohibit using the security flag in the
381
+ IP header described in <xref target="RFC3514"/> for the same reasons.
382
+ </t>
383
+ </section>
384
+ </section>
385
+
386
+ <section anchor="performance-considerations">
387
+ <name>Performance Considerations</name>
388
+ <t>
389
+ Adding extensions to the TCP header has a cost. Using TCP extensions
390
+ with the ASCII-encoded mood of the packet would detract from the
391
+ available MSS usable for data payload. If the TCP header is more
392
+ than 20 bytes, then the extra bytes would be unavailable for use in
393
+ the payload of the frame.
394
+ </t>
395
+ <t>
396
+ This added per-packet overhead should be considered when using packet
397
+ mood extensions.
398
+ </t>
399
+ </section>
400
+
401
+ <section anchor="security-considerations">
402
+ <name>Security Considerations</name>
403
+ <t>
404
+ The TCP checksum, as a 16-bit value, could be mistaken if ASCII
405
+ characters with the same number of zeros and ones were substituted
406
+ out. A happy <tt>:)</tt> could be replaced with a frown by a malicious
407
+ attacker, by using a winking eye <tt>;(</tt>. This could misrepresent the
408
+ intended mood of the sender to the receiver.
409
+ </t>
410
+ </section>
411
+
412
+ <section anchor="related-work">
413
+ <name>Related Work</name>
414
+ <t>
415
+ This document does not seek to build a sentient network stack.
416
+ However, this framework could be used to express the emotions of a
417
+ sentient stack. If that were to happen, a new technical job class of
418
+ network psychologists could be created. Who doesn't like new jobs? :)
419
+ </t>
420
+ </section>
421
+
422
+ <section anchor="iana-considerations">
423
+ <name>IANA Considerations</name>
424
+ <t>
425
+ If this work is standardized, IANA is requested to officially assign
426
+ value 25 as described in <xref target="simple-emotional-representation"/>. Additional moods and emoticon
427
+ representations would require IESG approval or standards action <xref target="RFC5226"/>.
428
+ </t>
429
+ </section>
430
+
431
+ </middle>
432
+ <back>
433
+ <references>
434
+ <name>Informative References</name>
435
+ <reference anchor='DSM-IV' target='http://www.psychiatryonline.com/resourceTOC.aspx?resourceID=1'>
436
+ <front>
437
+ <title>Diagnostic and Statistical Manual of Mental Disorders (DSM)</title>
438
+ <author></author>
439
+ <date></date>
440
+ </front>
441
+ </reference>
442
+ <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.0793.xml"/>
443
+ <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
444
+ <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3514.xml"/>
445
+ <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5226.xml"/>
446
+ </references>
447
+
448
+ </back>
449
+ </rfc>