openssl-qlog.7ossl 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  1. .\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
  2. .\"
  3. .\" Standard preamble:
  4. .\" ========================================================================
  5. .de Sp \" Vertical space (when we can't use .PP)
  6. .if t .sp .5v
  7. .if n .sp
  8. ..
  9. .de Vb \" Begin verbatim text
  10. .ft CW
  11. .nf
  12. .ne \\$1
  13. ..
  14. .de Ve \" End verbatim text
  15. .ft R
  16. .fi
  17. ..
  18. .\" Set up some character translations and predefined strings. \*(-- will
  19. .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
  20. .\" double quote, and \*(R" will give a right double quote. \*(C+ will
  21. .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
  22. .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
  23. .\" nothing in troff, for use with C<>.
  24. .tr \(*W-
  25. .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
  26. .ie n \{\
  27. . ds -- \(*W-
  28. . ds PI pi
  29. . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
  30. . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
  31. . ds L" ""
  32. . ds R" ""
  33. . ds C` ""
  34. . ds C' ""
  35. 'br\}
  36. .el\{\
  37. . ds -- \|\(em\|
  38. . ds PI \(*p
  39. . ds L" ``
  40. . ds R" ''
  41. . ds C`
  42. . ds C'
  43. 'br\}
  44. .\"
  45. .\" Escape single quotes in literal strings from groff's Unicode transform.
  46. .ie \n(.g .ds Aq \(aq
  47. .el .ds Aq '
  48. .\"
  49. .\" If the F register is >0, we'll generate index entries on stderr for
  50. .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
  51. .\" entries marked with X<> in POD. Of course, you'll have to process the
  52. .\" output yourself in some meaningful fashion.
  53. .\"
  54. .\" Avoid warning from groff about undefined register 'F'.
  55. .de IX
  56. ..
  57. .nr rF 0
  58. .if \n(.g .if rF .nr rF 1
  59. .if (\n(rF:(\n(.g==0)) \{\
  60. . if \nF \{\
  61. . de IX
  62. . tm Index:\\$1\t\\n%\t"\\$2"
  63. ..
  64. . if !\nF==2 \{\
  65. . nr % 0
  66. . nr F 2
  67. . \}
  68. . \}
  69. .\}
  70. .rr rF
  71. .\"
  72. .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
  73. .\" Fear. Run. Save yourself. No user-serviceable parts.
  74. . \" fudge factors for nroff and troff
  75. .if n \{\
  76. . ds #H 0
  77. . ds #V .8m
  78. . ds #F .3m
  79. . ds #[ \f1
  80. . ds #] \fP
  81. .\}
  82. .if t \{\
  83. . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
  84. . ds #V .6m
  85. . ds #F 0
  86. . ds #[ \&
  87. . ds #] \&
  88. .\}
  89. . \" simple accents for nroff and troff
  90. .if n \{\
  91. . ds ' \&
  92. . ds ` \&
  93. . ds ^ \&
  94. . ds , \&
  95. . ds ~ ~
  96. . ds /
  97. .\}
  98. .if t \{\
  99. . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
  100. . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
  101. . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
  102. . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
  103. . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
  104. . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
  105. .\}
  106. . \" troff and (daisy-wheel) nroff accents
  107. .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
  108. .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
  109. .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
  110. .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
  111. .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
  112. .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
  113. .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
  114. .ds ae a\h'-(\w'a'u*4/10)'e
  115. .ds Ae A\h'-(\w'A'u*4/10)'E
  116. . \" corrections for vroff
  117. .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
  118. .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
  119. . \" for low resolution devices (crt and lpr)
  120. .if \n(.H>23 .if \n(.V>19 \
  121. \{\
  122. . ds : e
  123. . ds 8 ss
  124. . ds o a
  125. . ds d- d\h'-1'\(ga
  126. . ds D- D\h'-1'\(hy
  127. . ds th \o'bp'
  128. . ds Th \o'LP'
  129. . ds ae ae
  130. . ds Ae AE
  131. .\}
  132. .rm #[ #] #H #V #F C
  133. .\" ========================================================================
  134. .\"
  135. .IX Title "OPENSSL-QLOG 7ossl"
  136. .TH OPENSSL-QLOG 7ossl "2024-09-03" "3.3.2" "OpenSSL"
  137. .\" For nroff, turn off justification. Always turn off hyphenation; it makes
  138. .\" way too many mistakes in technical documents.
  139. .if n .ad l
  140. .nh
  141. .SH "NAME"
  142. openssl\-qlog \- OpenSSL qlog tracing functionality
  143. .SH "DESCRIPTION"
  144. .IX Header "DESCRIPTION"
  145. OpenSSL has unstable support for generating logs in the qlog logging format,
  146. which can be used to obtain diagnostic data for \s-1QUIC\s0 connections. The data
  147. generated includes information on packets sent and received and the frames
  148. contained within them, as well as loss detection and other events.
  149. .PP
  150. The qlog output generated by OpenSSL can be used to obtain diagnostic
  151. visualisations of a given \s-1QUIC\s0 connection using tools such as \fBqvis\fR.
  152. .PP
  153. \&\fB\s-1WARNING:\s0\fR The output of OpenSSL's qlog functionality uses an unstable format
  154. based on a draft specification. qlog output is not subject to any format
  155. stability or compatibility guarantees at this time, and \fBwill\fR change in
  156. incompatible ways in future versions of OpenSSL. See \fB\s-1FORMAT STABILITY\s0\fR below
  157. for details.
  158. .SH "USAGE"
  159. .IX Header "USAGE"
  160. When OpenSSL is built with qlog support, qlog is enabled at run time by setting
  161. the standard \fB\s-1QLOGDIR\s0\fR environment variable to point to a directory where qlog
  162. files should be written. Once set, any \s-1QUIC\s0 connection established by OpenSSL
  163. will have a qlog file written automatically to the specified directory.
  164. .PP
  165. Log files are generated in the \fI.sqlog\fR format based on JSON-SEQ (\s-1RFC 7464\s0).
  166. .PP
  167. The filenames of generated log files under the specified \fB\s-1QLOGDIR\s0\fR use the
  168. following structure:
  169. .PP
  170. .Vb 1
  171. \& {connection_odcid}_{vantage_point_type}.sqlog
  172. .Ve
  173. .PP
  174. where \fB{connection_odcid}\fR is the lowercase hexadecimal encoding of a \s-1QUIC\s0
  175. connection's Original Destination Connection \s-1ID,\s0 which is the Destination
  176. Connection \s-1ID\s0 used in the header of the first Initial packet sent as part of the
  177. connection process, and \fB{vantage_point_type}\fR is either \f(CW\*(C`client\*(C'\fR or
  178. \&\f(CW\*(C`server\*(C'\fR, reflecting the perspective of the endpoint producing the qlog output.
  179. .PP
  180. The qlog functionality can be disabled at OpenSSL build time using the
  181. \&\fIno-unstable-qlog\fR configure flag.
  182. .SH "SUPPORTED EVENT TYPES"
  183. .IX Header "SUPPORTED EVENT TYPES"
  184. The following event types are currently supported:
  185. .IP "\fBconnectivity:connection_started\fR" 4
  186. .IX Item "connectivity:connection_started"
  187. .PD 0
  188. .IP "\fBconnectivity:connection_state_updated\fR" 4
  189. .IX Item "connectivity:connection_state_updated"
  190. .IP "\fBconnectivity:connection_closed\fR" 4
  191. .IX Item "connectivity:connection_closed"
  192. .IP "\fBtransport:parameters_set\fR" 4
  193. .IX Item "transport:parameters_set"
  194. .IP "\fBtransport:packet_sent\fR" 4
  195. .IX Item "transport:packet_sent"
  196. .IP "\fBtransport:packet_received\fR" 4
  197. .IX Item "transport:packet_received"
  198. .IP "\fBrecovery:packet_lost\fR" 4
  199. .IX Item "recovery:packet_lost"
  200. .PD
  201. .SH "FILTERS"
  202. .IX Header "FILTERS"
  203. By default, all supported event types are logged. The \fB\s-1OSSL_QFILTER\s0\fR
  204. environment variable can be used to configure a filter specification which
  205. determines which event types are to be logged. Each event type can be turned on
  206. and off individually. The filter specification is a space-separated list of
  207. terms listing event types to enable or disable. The terms are applied in order,
  208. thus the effects of later terms override the effects of earlier terms.
  209. .SS "Examples"
  210. .IX Subsection "Examples"
  211. Here are some example filter specifications:
  212. .ie n .IP """*"" (or ""+*"")" 4
  213. .el .IP "\f(CW*\fR (or \f(CW+*\fR)" 4
  214. .IX Item "* (or +*)"
  215. Enable all supported qlog event types.
  216. .ie n .IP """\-*""" 4
  217. .el .IP "\f(CW\-*\fR" 4
  218. .IX Item "-*"
  219. Disable all qlog event types.
  220. .ie n .IP """* \-transport:packet_received""" 4
  221. .el .IP "\f(CW* \-transport:packet_received\fR" 4
  222. .IX Item "* -transport:packet_received"
  223. Enable all qlog event types, but disable the \fBtransport:packet_received\fR event
  224. type.
  225. .ie n .IP """\-* transport:packet_sent""" 4
  226. .el .IP "\f(CW\-* transport:packet_sent\fR" 4
  227. .IX Item "-* transport:packet_sent"
  228. Disable all qlog event types, except for the \fBtransport:packet_sent\fR event type.
  229. .ie n .IP """\-* connectivity:* transport:parameters_set""" 4
  230. .el .IP "\f(CW\-* connectivity:* transport:parameters_set\fR" 4
  231. .IX Item "-* connectivity:* transport:parameters_set"
  232. Disable all qlog event types, except for \fBtransport:parameters_set\fR and all
  233. supported event types in the \fBconnectivity\fR category.
  234. .SS "Filter Syntax Specification"
  235. .IX Subsection "Filter Syntax Specification"
  236. Formally, the format of the filter specification in \s-1ABNF\s0 is as follows:
  237. .PP
  238. .Vb 1
  239. \& filter = *filter\-term
  240. \&
  241. \& filter\-term = add\-sub\-term
  242. \&
  243. \& add\-sub\-term = ["\-" / "+"] specifier
  244. \&
  245. \& specifier = global\-specifier / qualified\-specifier
  246. \&
  247. \& global\-specifier = wildcard
  248. \&
  249. \& qualified\-specifier = component\-specifier ":" component\-specifier
  250. \&
  251. \& component\-specifier = name / wildcard
  252. \&
  253. \& wildcard = "*"
  254. \&
  255. \& name = 1*(ALPHA / DIGIT / "_" / "\-")
  256. .Ve
  257. .PP
  258. Filter terms are interpreted as follows:
  259. .ie n .IP """+*"" (or ""*"")" 4
  260. .el .IP "\f(CW+*\fR (or \f(CW*\fR)" 4
  261. .IX Item "+* (or *)"
  262. Enables all event types.
  263. .ie n .IP """\-*""" 4
  264. .el .IP "\f(CW\-*\fR" 4
  265. .IX Item "-*"
  266. Disables all event types.
  267. .ie n .IP """+foo:*"" (or ""foo:*"")" 4
  268. .el .IP "\f(CW+foo:*\fR (or \f(CWfoo:*\fR)" 4
  269. .IX Item "+foo:* (or foo:*)"
  270. Enables all event types in the \fBfoo\fR category.
  271. .ie n .IP """\-foo:*""" 4
  272. .el .IP "\f(CW\-foo:*\fR" 4
  273. .IX Item "-foo:*"
  274. Disables all event types in the \fBfoo\fR category.
  275. .ie n .IP """+foo:bar"" (or ""foo:bar"")" 4
  276. .el .IP "\f(CW+foo:bar\fR (or \f(CWfoo:bar\fR)" 4
  277. .IX Item "+foo:bar (or foo:bar)"
  278. Enables a specific event type \fBfoo:bar\fR.
  279. .ie n .IP """\-foo:bar""" 4
  280. .el .IP "\f(CW\-foo:bar\fR" 4
  281. .IX Item "-foo:bar"
  282. Disables a specific event type \fBfoo:bar\fR.
  283. .PP
  284. Partial wildcard matches are not supported at this time.
  285. .SS "Default Configuration"
  286. .IX Subsection "Default Configuration"
  287. If the \fB\s-1OSSL_QFILTER\s0\fR environment variable is not set or set to the empty
  288. string, this is equivalent to enabling all event types (i.e., it is equivalent
  289. to a filter of \f(CW\*(C`*\*(C'\fR). Note that the \fB\s-1QLOGDIR\s0\fR environment variable must also be
  290. set to enable qlog.
  291. .SH "FORMAT STABILITY"
  292. .IX Header "FORMAT STABILITY"
  293. The OpenSSL qlog functionality currently implements a draft version of the qlog
  294. specification. Future revisions to the qlog specification in advance of formal
  295. standardisation are expected to introduce incompatible and breaking changes to
  296. the qlog format. The OpenSSL qlog functionality will transition to producing
  297. output in this format in the future once standardisation is complete.
  298. .PP
  299. Because of this, the qlog output of OpenSSL \fBwill\fR change in incompatible and
  300. breaking ways in the future, including in non-major releases of OpenSSL. The
  301. qlog output of OpenSSL is considered unstable and not subject to any format
  302. stability or compatibility guarantees at this time.
  303. .PP
  304. Users of the OpenSSL qlog functionality must be aware that the output may change
  305. arbitrarily between releases and that the preservation of compatibility with any
  306. given tool between releases is not guaranteed.
  307. .SS "Aims"
  308. .IX Subsection "Aims"
  309. The OpenSSL draft qlog functionality is primarily intended for use in
  310. conjunction with the qvis tool <https://qvis.quictools.info/>. In terms of
  311. format compatibility, the output format of the OpenSSL qlog functionality is
  312. expected to track what is supported by qvis. As such, future changes to the
  313. output of the OpenSSL qlog functionality are expected to track changes in qvis
  314. as they occur, and reflect the versions of qlog currently supported by qvis.
  315. .PP
  316. This means that prior to the finalisation of the qlog standard, in the event of
  317. a disparity between the current draft and what qvis supports, the OpenSSL qlog
  318. functionality will generally aim for qvis compatibility over compliance with the
  319. latest draft.
  320. .PP
  321. As such, OpenSSL's qlog functionality currently implements qlog version 0.3 as
  322. defined in \fBdraft\-ietf\-quic\-qlog\-main\-schema\-05\fR and
  323. \&\fBdraft\-ietf\-quic\-qlog\-quic\-events\-04\fR. These revisions are intentionally used
  324. instead of more recent revisions due to their qvis compatibility.
  325. .SH "LIMITATIONS"
  326. .IX Header "LIMITATIONS"
  327. The OpenSSL implementation of qlog currently has the following limitations:
  328. .IP "\(bu" 4
  329. Not all event types defined by the draft specification are implemented.
  330. .IP "\(bu" 4
  331. Only the JSON-SEQ (\fB.sqlog\fR) output format is supported.
  332. .IP "\(bu" 4
  333. Only the \fB\s-1QLOGDIR\s0\fR environment variable is supported for configuring the qlog
  334. output directory. The standard \fB\s-1QLOGFILE\s0\fR environment variable is not
  335. supported.
  336. .IP "\(bu" 4
  337. There is no \s-1API\s0 for programmatically enabling or controlling the qlog
  338. functionality.
  339. .SH "SEE ALSO"
  340. .IX Header "SEE ALSO"
  341. \&\fBopenssl\-quic\fR\|(7), \fBopenssl\-env\fR\|(7)
  342. .SH "HISTORY"
  343. .IX Header "HISTORY"
  344. This functionality was added in OpenSSL 3.3.
  345. .SH "COPYRIGHT"
  346. .IX Header "COPYRIGHT"
  347. Copyright 2024 The OpenSSL Project Authors. All Rights Reserved.
  348. .PP
  349. Licensed under the Apache License 2.0 (the \*(L"License\*(R"). You may not use
  350. this file except in compliance with the License. You can obtain a copy
  351. in the file \s-1LICENSE\s0 in the source distribution or at
  352. <https://www.openssl.org/source/license.html>.