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,324 @@
1
+ = The Security Flag in the IPv4 Header
2
+ Steven M. Bellovin <bellovin@acm.org>
3
+ :doctype: internet-draft
4
+ :abbrev: The Security Flag in the IPv4 Header
5
+ :status: info
6
+ :name: rfc-3514
7
+ :ipr: trust200902
8
+ :area: Internet
9
+ :workgroup: Network Working Group
10
+ :revdate: 2003-04-01T00:00:00Z
11
+ :forename_initials: S.
12
+ :organization: AT&T Labs Research
13
+ :phone: +1 973-360-8656
14
+ :street: 180 Park Avenue
15
+ :city: Florham Park
16
+ :code: NJ 07932
17
+ :smart-quotes: false
18
+
19
+ [abstract]
20
+ Firewalls, packet filters, intrusion detection systems, and the like
21
+ often have difficulty distinguishing between packets that have
22
+ malicious intent and those that are merely unusual. We define a
23
+ security flag in the IPv4 header as a means of distinguishing the two
24
+ cases.
25
+
26
+ [[introduction]]
27
+ == Introduction
28
+
29
+ Firewalls <<CBR03>>, packet filters, intrusion detection systems, and
30
+ the like often have difficulty distinguishing between packets that
31
+ have malicious intent and those that are merely unusual. The problem
32
+ is that making such determinations is hard. To solve this problem,
33
+ we define a security flag, known as the "evil" bit, in the IPv4
34
+ <<RFC0791>> header. Benign packets have this bit set to 0; those that
35
+ are used for an attack will have the bit set to 1.
36
+
37
+ [[terminology]]
38
+ === Terminology
39
+
40
+ The keywords **MUST**, **MUST NOT**, **REQUIRED**, **SHALL**, **SHALL NOT**, **SHOULD**,
41
+ **SHOULD NOT**, **RECOMMENDED**, **MAY**, and **OPTIONAL**, when they appear in this
42
+ document, are to be interpreted as described in <<RFC2119>>.
43
+
44
+ [[syntax]]
45
+ == Syntax
46
+
47
+ The high-order bit of the IP fragment offset field is the only unused
48
+ bit in the IP header. Accordingly, the selection of the bit position
49
+ is not left to IANA.
50
+
51
+ The bit field is laid out as follows:
52
+
53
+ ....
54
+ 0
55
+ +-+
56
+ |E|
57
+ +-+
58
+ ....
59
+
60
+ Currently-assigned values are defined as follows:
61
+
62
+ 0x0::
63
+ +
64
+ If the bit is set to 0, the packet has no evil intent. Hosts,
65
+ network elements, etc., **SHOULD** assume that the packet is
66
+ harmless, and **SHOULD NOT** take any defensive measures. (We note
67
+ that this part of the spec is already implemented by many common
68
+ desktop operating systems.)
69
+
70
+ 0x1::
71
+ +
72
+ If the bit is set to 1, the packet has evil intent. Secure
73
+ systems **SHOULD** try to defend themselves against such packets.
74
+ Insecure systems **MAY** chose to crash, be penetrated, etc.
75
+
76
+ [[setting-the-evil-bit]]
77
+ == Setting the Evil Bit
78
+
79
+ There are a number of ways in which the evil bit may be set. Attack
80
+ applications may use a suitable API to request that it be set.
81
+ Systems that do not have other mechanisms **MUST** provide such an API;
82
+ attack programs **MUST** use it.
83
+
84
+ Multi-level insecure operating systems may have special levels for
85
+ attack programs; the evil bit **MUST** be set by default on packets
86
+ emanating from programs running at such levels. However, the system
87
+ *MAY* provide an API to allow it to be cleared for non-malicious
88
+ activity by users who normally engage in attack behavior.
89
+
90
+ Fragments that by themselves are dangerous **MUST** have the evil bit
91
+ set. If a packet with the evil bit set is fragmented by an
92
+ intermediate router and the fragments themselves are not dangerous,
93
+ the evil bit **MUST** be cleared in the fragments, and **MUST** be turned
94
+ back on in the reassembled packet.
95
+
96
+ Intermediate systems are sometimes used to launder attack
97
+ connections. Packets to such systems that are intended to be relayed
98
+ to a target SHOULD have the evil bit set.
99
+
100
+ Some applications hand-craft their own packets. If these packets are
101
+ part of an attack, the application **MUST** set the evil bit by itself.
102
+
103
+ In networks protected by firewalls, it is axiomatic that all
104
+ attackers are on the outside of the firewall. Therefore, hosts
105
+ inside the firewall **MUST NOT** set the evil bit on any packets.
106
+
107
+ Because NAT <<RFC3022>> boxes modify packets, they **SHOULD** set the evil
108
+ bit on such packets. "Transparent" http and email proxies **SHOULD** set
109
+ the evil bit on their reply packets to the innocent client host.
110
+
111
+ Some hosts scan other hosts in a fashion that can alert intrusion
112
+ detection systems. If the scanning is part of a benign research
113
+ project, the evil bit **MUST NOT** be set. If the scanning per se is
114
+ innocent, but the ultimate intent is evil and the destination site
115
+ has such an intrusion detection system, the evil bit **SHOULD** be set.
116
+
117
+ [[processing-of-the-evil-bit]]
118
+ == Processing of the Evil Bit
119
+
120
+ Devices such as firewalls **MUST** drop all inbound packets that have the
121
+ evil bit set. Packets with the evil bit off **MUST NOT** be dropped.
122
+ Dropped packets **SHOULD** be noted in the appropriate MIB variable.
123
+
124
+ Intrusion detection systems (IDSs) have a harder problem. Because of
125
+ their known propensity for false negatives and false positives, IDSs
126
+ **MUST** apply a probabilistic correction factor when evaluating the evil
127
+ bit. If the evil bit is set, a suitable random number generator
128
+ <<RFC1750>> must be consulted to determine if the attempt should be
129
+ logged. Similarly, if the bit is off, another random number
130
+ generator must be consulted to determine if it should be logged
131
+ despite the setting.
132
+
133
+ The default probabilities for these tests depends on the type of IDS.
134
+ Thus, a signature-based IDS would have a low false positive value but
135
+ a high false negative value. A suitable administrative interface
136
+ **MUST** be provided to permit operators to reset these values.
137
+
138
+ Routers that are not intended as as security devices **SHOULD NOT**
139
+ examine this bit. This will allow them to pass packets at higher
140
+ speeds.
141
+
142
+ As outlined earlier, host processing of evil packets is operating-
143
+ system dependent; however, all hosts **MUST** react appropriately
144
+ according to their nature.
145
+
146
+ [[related-work]]
147
+ == Related Work
148
+
149
+ Although this document only defines the IPv4 evil bit, there are
150
+ complementary mechanisms for other forms of evil. We sketch some of
151
+ those here.
152
+
153
+ For IPv6 <<RFC2460>>, evilness is conveyed by two options. The first,
154
+ a hop-by-hop option, is used for packets that damage the network,
155
+ such as DDoS packets. The second, an end-to-end option, is for
156
+ packets intended to damage destination hosts. In either case, the
157
+ option contains a 128-bit strength indicator, which says how evil the
158
+ packet is, and a 128-bit type code that describes the particular type
159
+ of attack intended.
160
+
161
+ Some link layers, notably those based on optical switching, may
162
+ bypass routers (and hence firewalls) entirely. Accordingly, some
163
+ link-layer scheme **MUST** be used to denote evil. This may involve evil
164
+ lambdas, evil polarizations, etc.
165
+
166
+ DDoS attack packets are denoted by a special diffserv code point.
167
+
168
+ An application/evil MIME type is defined for Web- or email-carried
169
+ mischief. Other MIME types can be embedded inside of evil sections;
170
+ this permit easy encoding of word processing documents with macro
171
+ viruses, etc.
172
+
173
+ [[iana-considerations]]
174
+ == IANA Considerations
175
+
176
+ This document defines the behavior of security elements for the 0x0
177
+ and 0x1 values of this bit. Behavior for other values of the bit may
178
+ be defined only by IETF consensus <<RFC2434>>.
179
+
180
+ [[security-considerations]]
181
+ == Security Considerations
182
+
183
+ Correct functioning of security mechanisms depend critically on the
184
+ evil bit being set properly. If faulty components do not set the
185
+ evil bit to 1 when appropriate, firewalls will not be able to do
186
+ their jobs properly. Similarly, if the bit is set to 1 when it
187
+ shouldn't be, a denial of service condition may occur.
188
+
189
+
190
+ [bibliography]
191
+ == Normative References
192
+ ++++
193
+
194
+ <reference anchor="RFC0791" target="https://www.rfc-editor.org/info/rfc791">
195
+ <front>
196
+ <title>Internet Protocol</title>
197
+ <author initials="J." surname="Postel" fullname="J. Postel">
198
+ <organization/>
199
+ </author>
200
+ <date year="1981" month="September"/>
201
+ </front>
202
+ <seriesInfo name="STD" value="5"/>
203
+ <seriesInfo name="RFC" value="791"/>
204
+ <seriesInfo name="DOI" value="10.17487/RFC0791"/>
205
+ </reference>
206
+
207
+ <reference anchor="RFC1750" target="https://www.rfc-editor.org/info/rfc1750">
208
+ <front>
209
+ <title>Randomness Recommendations for Security</title>
210
+ <author initials="D." surname="Eastlake 3rd" fullname="D. Eastlake 3rd">
211
+ <organization/>
212
+ </author>
213
+ <author initials="S." surname="Crocker" fullname="S. Crocker">
214
+ <organization/>
215
+ </author>
216
+ <author initials="J." surname="Schiller" fullname="J. Schiller">
217
+ <organization/>
218
+ </author>
219
+ <date year="1994" month="December"/>
220
+ <abstract>
221
+ <t>
222
+ Choosing random quantities to foil a resourceful and motivated adversary is surprisingly difficult. This paper points out many pitfalls in using traditional pseudo-random number generation techniques for choosing such quantities. It recommends the use of truly random hardware techniques and shows that the existing hardware on many systems can be used for this purpose. This memo provides information for the Internet community. This memo does not specify an Internet standard of any kind.
223
+ </t>
224
+ </abstract>
225
+ </front>
226
+ <seriesInfo name="RFC" value="1750"/>
227
+ <seriesInfo name="DOI" value="10.17487/RFC1750"/>
228
+ </reference>
229
+
230
+ <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119">
231
+ <front>
232
+ <title>
233
+ Key words for use in RFCs to Indicate Requirement Levels
234
+ </title>
235
+ <author initials="S." surname="Bradner" fullname="S. Bradner">
236
+ <organization/>
237
+ </author>
238
+ <date year="1997" month="March"/>
239
+ <abstract>
240
+ <t>
241
+ In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.
242
+ </t>
243
+ </abstract>
244
+ </front>
245
+ <seriesInfo name="BCP" value="14"/>
246
+ <seriesInfo name="RFC" value="2119"/>
247
+ <seriesInfo name="DOI" value="10.17487/RFC2119"/>
248
+ </reference>
249
+
250
+ <reference anchor="RFC2434" target="https://www.rfc-editor.org/info/rfc2434">
251
+ <front>
252
+ <title>
253
+ Guidelines for Writing an IANA Considerations Section in RFCs
254
+ </title>
255
+ <author initials="T." surname="Narten" fullname="T. Narten">
256
+ <organization/>
257
+ </author>
258
+ <author initials="H." surname="Alvestrand" fullname="H. Alvestrand">
259
+ <organization/>
260
+ </author>
261
+ <date year="1998" month="October"/>
262
+ <abstract>
263
+ <t>
264
+ This document discusses issues that should be considered in formulating a policy for assigning values to a name space and provides guidelines to document authors on the specific text that must be included in documents that place demands on the IANA. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.
265
+ </t>
266
+ </abstract>
267
+ </front>
268
+ <seriesInfo name="RFC" value="2434"/>
269
+ <seriesInfo name="DOI" value="10.17487/RFC2434"/>
270
+ </reference>
271
+
272
+ <reference anchor="RFC2460" target="https://www.rfc-editor.org/info/rfc2460">
273
+ <front>
274
+ <title>Internet Protocol, Version 6 (IPv6) Specification</title>
275
+ <author initials="S." surname="Deering" fullname="S. Deering">
276
+ <organization/>
277
+ </author>
278
+ <author initials="R." surname="Hinden" fullname="R. Hinden">
279
+ <organization/>
280
+ </author>
281
+ <date year="1998" month="December"/>
282
+ <abstract>
283
+ <t>
284
+ This document specifies version 6 of the Internet Protocol (IPv6), also sometimes referred to as IP Next Generation or IPng. [STANDARDS-TRACK]
285
+ </t>
286
+ </abstract>
287
+ </front>
288
+ <seriesInfo name="RFC" value="2460"/>
289
+ <seriesInfo name="DOI" value="10.17487/RFC2460"/>
290
+ </reference>
291
+
292
+ <reference anchor="RFC3022" target="https://www.rfc-editor.org/info/rfc3022">
293
+ <front>
294
+ <title>
295
+ Traditional IP Network Address Translator (Traditional NAT)
296
+ </title>
297
+ <author initials="P." surname="Srisuresh" fullname="P. Srisuresh">
298
+ <organization/>
299
+ </author>
300
+ <author initials="K." surname="Egevang" fullname="K. Egevang">
301
+ <organization/>
302
+ </author>
303
+ <date year="2001" month="January"/>
304
+ <abstract>
305
+ <t>
306
+ The NAT operation described in this document extends address translation introduced in RFC 1631 and includes a new type of network address and TCP/UDP port translation. In addition, this document corrects the Checksum adjustment algorithm published in RFC 1631 and attempts to discuss NAT operation and limitations in detail. This memo provides information for the Internet community.
307
+ </t>
308
+ </abstract>
309
+ </front>
310
+ <seriesInfo name="RFC" value="3022"/>
311
+ <seriesInfo name="DOI" value="10.17487/RFC3022"/>
312
+ </reference>
313
+
314
+ <reference anchor='CBR03' target=''>
315
+ <front>
316
+ <title>Firewalls and Internet Security: Repelling the Wily Hacker, Second Edition</title>
317
+ <author initials='W.R.' surname='Cheswick' fullname='W.R. Cheswick'></author>
318
+ <author initials='S.M.' surname='Bellovin' fullname='S.M. Bellovin'></author>
319
+ <author initials='A.D.' surname='Rubin' fullname='A.D. Rubin'></author>
320
+ <date year='2003' />
321
+ </front>
322
+ <seriesInfo name="Addison-Wesley" value='' />
323
+ </reference>
324
+ ++++
@@ -0,0 +1,342 @@
1
+ % Title = "TCP Option to Denote Packet Mood"
2
+ % abbrev = "TCP Option to Denote Packet Mood"
3
+ % category = "info"
4
+ % docName = "rfc-5841"
5
+ % ipr= "trust200902"
6
+ % area = "Internet"
7
+ % workgroup = "Network Working Group"
8
+ % keyword = [""]
9
+ %
10
+ % date = 2010-04-01T00:00:00Z
11
+ %
12
+ % [pi]
13
+ % toc = "no"
14
+ %
15
+ % #Independent Submission
16
+ % [[author]]
17
+ % initials="R."
18
+ % surname="Hay"
19
+ % fullname="Richard Hay"
20
+ % organization = "Google"
21
+ % [author.address]
22
+ % email = "rhay@google.com"
23
+ % [author.address.postal]
24
+ % street = "1600 Amphitheatre Pkwy"
25
+ % city = "Mountain View"
26
+ % code = "CA 94043"
27
+ %
28
+ % [[author]]
29
+ % initials="W."
30
+ % surname="Turkal"
31
+ % fullname="Warren Turkal"
32
+ % organization = "Google"
33
+ % [author.address]
34
+ % email = "turkal@google.com"
35
+ % [author.address.postal]
36
+ % street = "1600 Amphitheatre Pkwy"
37
+ % city = "Mountain View"
38
+ % code = "CA 94043"
39
+
40
+ .# Abstract
41
+
42
+ This document proposes a new TCP option to denote packet mood.
43
+
44
+ {mainmatter}
45
+
46
+ # Introduction
47
+
48
+ In an attempt to anthropomorphize the bit streams on countless
49
+ physical layer networks throughout the world, we propose a TCP option
50
+ to express packet mood [@?DSM-IV].
51
+
52
+ Packets cannot feel. They are created for the purpose of moving data
53
+ from one system to another. However, it is clear that in specific
54
+ situations some measure of emotion can be inferred or added. For
55
+ instance, a packet that is retransmitted to resend data for a packet
56
+ for which no ACK was received could be described as an 'angry'
57
+ packet, or a 'frustrated' packet (if it is not the first
58
+ retransmission for instance). So how can these kinds of feelings be
59
+ conveyed in the packets themselves. This can be addressed by adding
60
+ TCP Options [@?RFC0793] to the TCP header, using ASCII characters that
61
+ encode commonly used "emoticons" to convey packet mood.
62
+
63
+ ## Terminology
64
+
65
+ The keywords **MUST**, **MUST NOT**, **REQUIRED**, **SHALL**, **SHALL NOT**, **SHOULD**,
66
+ **SHOULD NOT**, **RECOMMENDED**, **MAY**, and **OPTIONAL**, when they appear in this
67
+ document, are to be interpreted as described in [@?RFC2119].
68
+
69
+ # Syntax
70
+
71
+ A TCP Option has a 1-byte kind field, followed by a 1-byte length
72
+ field @RFC0793. It is proposed that option 25 (released 2000-12-18)
73
+ be used to define packet mood. This option would have a length value
74
+ of 4 or 5 bytes. All the simple emotions described as expressible
75
+ via this mechanism can be displayed with two or three 7-bit, ASCII-
76
+ encoded characters. Multiple mood options may appear in a TCP
77
+ header, so as to express more complex moods than those defined here
78
+ (for instance if a packet were happy and surprised).
79
+
80
+ {align="center"}
81
+ Kind Length Meaning
82
+ ---- -------- -------
83
+ 25 Variable Packet Mood
84
+ Figure: TCP Header Format
85
+
86
+ In more detail:
87
+
88
+ {align="left"}
89
+ +--------+--------+--------+--------+
90
+ |00011001|00000100|00111010|00101001|
91
+ +--------+--------+--------+--------+
92
+ Kind=25 Length=4 ASCII : ASCII )
93
+
94
+ +--------+--------+--------+--------+--------+
95
+ |00011001|00000101|00111110|00111010|01000000|
96
+ +--------+--------+--------+--------+--------+
97
+ Kind=25 Length=5 ASCII > ACSII : ASCII @
98
+
99
+ # Simple Emotional Representation
100
+
101
+ It is proposed that common emoticons be used to denote packet mood.
102
+ Packets do not "feel" per se. The emotions they could be tagged with
103
+ are a reflection of the user mood expressed through packets.
104
+
105
+ So the humanity expressed in a packet would be entirely sourced from
106
+ humans.
107
+
108
+ To this end, it is proposed that simple emotions be used convey mood
109
+ as follows.
110
+
111
+ {align="left"}
112
+ ASCII Mood
113
+ ===== ====
114
+ :) Happy
115
+ :( Sad
116
+ :D Amused
117
+ %( Confused
118
+ :o Bored
119
+ :O Surprised
120
+ :P Silly
121
+ :@ Frustrated
122
+ >:@ Angry
123
+ :| Apathetic
124
+ ;) Sneaky
125
+ >:) Evil
126
+
127
+ Proposed ASCII character encoding
128
+
129
+ {align="left"}
130
+ Binary Dec Hex Character
131
+ ======== === === =========
132
+ 010 0101 37 25 %
133
+ 010 1000 40 28 (
134
+ 010 1001 41 29 )
135
+ 011 1010 58 3A :
136
+ 011 1011 59 3B ;
137
+ 011 1110 62 3E >
138
+ 100 0000 64 40 @
139
+ 100 0100 68 44 D
140
+ 100 1111 79 4F O
141
+ 101 0000 80 50 P
142
+ 110 1111 111 6F o
143
+ 111 1100 124 7C |
144
+
145
+ For the purposes of this RFC, 7-bit ASCII encoding is sufficient for
146
+ representing emoticons. The ASCII characters will be sent in 8-bit
147
+ bytes with the leading bit always set to 0.
148
+
149
+ # Use Cases
150
+
151
+ There are two ways to denote packet mood. One is to infer the mood
152
+ based on an event in the TCP session. The other is to derive mood
153
+ from a higher-order action at a higher layer (subject matter of
154
+ payload for instance).
155
+
156
+ For packets where the 'mood' is inferred from activity within the TCP
157
+ session, the 'mood' **MUST** be set by the host that is watching for the
158
+ trigger event. If a client sends a frame and receives no ACK, then
159
+ the retransmitted frame **MAY** contain the TCP OPTION header with a mood
160
+ set.
161
+
162
+ Any packet that exhibits behavior that allows for mood to be inferred
163
+ **SHOULD** add the TCP OPTION to the packets with the implied mood.
164
+
165
+ Applications can take advantage of the defined moods by expressing
166
+ them in the packets. This can be done in the SYN packet sent from
167
+ the client. All packets in the session can be then tagged with the
168
+ mood set in the SYN packet, but this would have a per-packet
169
+ performance cost (see (#performance-considerations) "Performance Considerations").
170
+
171
+ Each application **MUST** define the preconditions for marking packets as
172
+ happy, sad, bored, confused, angry, apathetic, and so on. This is a
173
+ framework for defining how such moods can be expressed, but it is up
174
+ to the developers to determine when to apply these encoded labels.
175
+
176
+ ## Happy Packets
177
+
178
+ Healthy packets are happy packets you could say. If the ACK packets
179
+ return within <10 ms end-to-end from a sender's stack to a receiver's
180
+ stack and back again, this would reflect high-speed bidirectional
181
+ capability, and if no retransmits are required and all ACKs are
182
+ received, all subsequent packets in that session **SHOULD** be marked as
183
+ 'happy'.
184
+
185
+ No loss, low-latency packets also makes for happy users. So the
186
+ packet would be reflecting the end-user experience.
187
+
188
+ ## Sad Packets
189
+
190
+ If retransmission rates achieve greater than 20% of all packets sent
191
+ in a session, it is fair to say the session can be in mourning for
192
+ all of the good packets lost in the senseless wasteland of the wild
193
+ Internet.
194
+
195
+ This should not be confused with retransmitted packets marked as
196
+ 'angry' since this tag would apply to all frames in the session
197
+ numbed by the staggering loss of packet life.
198
+
199
+ ## Amused Packets
200
+
201
+ Any packet that is carrying a text joke **SHOULD** be marked as 'amused'.
202
+
203
+ Example:
204
+
205
+ {align="left"}
206
+ 1: Knock Knock
207
+ 2: Who's there?
208
+ 1: Impatient chicken
209
+ 2: Impatient chi...
210
+ 1: BAWK!!!!
211
+
212
+ If such a joke is in the packet payload then, honestly, how can you
213
+ not be amused by one of the only knock-knock jokes that survives the
214
+ 3rd grade?
215
+
216
+ ## Confused Packets
217
+
218
+ When is a packet confused? There are network elements that perform
219
+ per-packet load balancing, and if there are asymmetries in the
220
+ latencies between end-to-end paths, out-of-order packet delivery can
221
+ occur.
222
+
223
+ When a receiver host gets out-of-order packets, it **SHOULD** mark TCP
224
+ ACK packets sent back to the sender as confused.
225
+
226
+ The same can be said for packets that are sent to incorrect VLAN
227
+ segments or are misdirected. The receivers might be aware that the
228
+ packet is confused, but there is no way to know at ingress if that
229
+ will be the fate of the frame.
230
+
231
+ That being said, application developers **SHOULD** mark packets as
232
+ confused if the payload contains complex philosophical questions that
233
+ make one ponder the meaning of life and one's place in the universe.
234
+
235
+ ## Bored Packets
236
+
237
+ Packets carrying accounting data with debits, credits, and so on **MUST**
238
+ be marked as 'bored'.
239
+
240
+ It could be said that many people consider RFCs boring. Packets
241
+ containing RFC text **MAY** be marked as 'bored'.
242
+
243
+ Packets with phone book listings **MUST** be marked 'bored'.
244
+
245
+ Packets containing legal disclaimers and anything in Latin **SHOULD** be
246
+ marked 'bored'.
247
+
248
+ ## Surprised Packets
249
+
250
+ Who doesn't love when the out-of-order packets in your session
251
+ surprise you while waiting in a congested queue for 20 ms?
252
+
253
+ Packets do not have birthdays, so packets can be marked as surprised
254
+ when they encounter unexpected error conditions.
255
+
256
+ So when ICMP destination unreachable messages are received (perhaps
257
+ due to a routing loop or congestion discards), all subsequent packets
258
+ in that session **SHOULD** be marked as surprised.
259
+
260
+ ## Silly Packets
261
+
262
+ Not all packets are sent as part of a session. Random keepalives
263
+ during a TCP session **MAY** be set up as a repartee between systems
264
+ connected as client and server. Such random and even playful
265
+ interchanges **SHOULD** be marked as silly.
266
+
267
+ ## Frustrated Packets
268
+
269
+ Packets that are retransmitted more than once **SHOULD** be marked as
270
+ frustrated.
271
+
272
+ ## Angry Packets
273
+
274
+ Packets that are retransmitted **SHOULD** be marked as angry.
275
+
276
+ ## Apathetic Packets
277
+
278
+ When sending a RST packet to a connected system, the packet should be
279
+ marked as apathetic so that the receiver knows that your system does
280
+ not care what happens after that.
281
+
282
+ ## Sneaky Packets
283
+
284
+ When a packet is used in a particularly clever way, it **SHOULD** be
285
+ marked as sneaky. What is "clever" is rather subjective, so it would
286
+ be prudent to get a few opinions about a particular use to make sure
287
+ that it is clever.
288
+
289
+ ## Evil Packets
290
+
291
+ It is hard for a TCP packet to discern higher moral quandaries like
292
+ the meaning of life or what exactly defines 'evil' and from whose
293
+ perspective such a characterization is being made. However,
294
+ developers of TCP-based applications **MAY** choose to see some
295
+ activities as evil when viewed through their particular lens of the
296
+ world. At that point, they **SHOULD** mark packets as evil.
297
+
298
+ Some organizations are prohibited from using this mood by mission
299
+ statement. This would also prohibit using the security flag in the
300
+ IP header described in [@?RFC3514] for the same reasons.
301
+
302
+ # Performance Considerations
303
+
304
+ Adding extensions to the TCP header has a cost. Using TCP extensions
305
+ with the ASCII-encoded mood of the packet would detract from the
306
+ available MSS usable for data payload. If the TCP header is more
307
+ than 20 bytes, then the extra bytes would be unavailable for use in
308
+ the payload of the frame.
309
+
310
+ This added per-packet overhead should be considered when using packet
311
+ mood extensions.
312
+
313
+ # Security Considerations
314
+
315
+ The TCP checksum, as a 16-bit value, could be mistaken if ASCII
316
+ characters with the same number of zeros and ones were substituted
317
+ out. A happy `:)` could be replaced with a frown by a malicious
318
+ attacker, by using a winking eye `;(`. This could misrepresent the
319
+ intended mood of the sender to the receiver.
320
+
321
+ # Related Work
322
+
323
+ This document does not seek to build a sentient network stack.
324
+ However, this framework could be used to express the emotions of a
325
+ sentient stack. If that were to happen, a new technical job class of
326
+ network psychologists could be created. Who doesn't like new jobs? :)
327
+
328
+ # IANA Considerations
329
+
330
+ If this work is standardized, IANA is requested to officially assign
331
+ value 25 as described in (#simple-emotional-representation). Additional moods and emoticon
332
+ representations would require IESG approval or standards action [@?RFC5226].
333
+
334
+ <reference anchor='DSM-IV' target='http://www.psychiatryonline.com/resourceTOC.aspx?resourceID=1'>
335
+ <front>
336
+ <title>Diagnostic and Statistical Manual of Mental Disorders (DSM)</title>
337
+ <author></author>
338
+ <date></date>
339
+ </front>
340
+ </reference>
341
+
342
+ {backmatter}