Fix header file include guard names
[openssl.git] / include / openssl / trace.h
index f6088b50e892cfa590af3449c31442918533507f..31e6fcc3f5f33ef524a47fab0d5afa3adb56c2cd 100644 (file)
@@ -7,8 +7,8 @@
  * https://www.openssl.org/source/license.html
  */
 
-#ifndef OSSL_TRACE_H
-# define OSSL_TRACE_H
+#ifndef OPENSSL_TRACE_H
+# define OPENSSL_TRACE_H
 
 # include <stdarg.h>
 
@@ -30,21 +30,27 @@ extern "C" {
  * BIO which sends all trace output it receives to the registered application
  * callback.
  *
- * The ANY category is used as a fallback category.
+ * The ALL category can be used as a fallback category to register a single
+ * channel which receives the output from all categories. However, if the
+ * application intends to print the trace channel name in the line prefix,
+ * it is better to register channels for all categories separately.
+ * (This is how the openssl application does it.)
  */
-# define OSSL_TRACE_CATEGORY_ANY                 0 /* The fallback */
-# define OSSL_TRACE_CATEGORY_INIT                1
-# define OSSL_TRACE_CATEGORY_TLS                 2
-# define OSSL_TRACE_CATEGORY_TLS_CIPHER          3
-# define OSSL_TRACE_CATEGORY_ENGINE_CONF         4
-# define OSSL_TRACE_CATEGORY_ENGINE_TABLE        5
-# define OSSL_TRACE_CATEGORY_ENGINE_REF_COUNT    6
-# define OSSL_TRACE_CATEGORY_PKCS5V2             7
-# define OSSL_TRACE_CATEGORY_PKCS12_KEYGEN       8
-# define OSSL_TRACE_CATEGORY_PKCS12_DECRYPT      9
-# define OSSL_TRACE_CATEGORY_X509V3_POLICY      10
-# define OSSL_TRACE_CATEGORY_BN_CTX             11
-# define OSSL_TRACE_CATEGORY_NUM                12
+# define OSSL_TRACE_CATEGORY_ALL                 0 /* The fallback */
+# define OSSL_TRACE_CATEGORY_TRACE               1
+# define OSSL_TRACE_CATEGORY_INIT                2
+# define OSSL_TRACE_CATEGORY_TLS                 3
+# define OSSL_TRACE_CATEGORY_TLS_CIPHER          4
+# define OSSL_TRACE_CATEGORY_CONF                5
+# define OSSL_TRACE_CATEGORY_ENGINE_TABLE        6
+# define OSSL_TRACE_CATEGORY_ENGINE_REF_COUNT    7
+# define OSSL_TRACE_CATEGORY_PKCS5V2             8
+# define OSSL_TRACE_CATEGORY_PKCS12_KEYGEN       9
+# define OSSL_TRACE_CATEGORY_PKCS12_DECRYPT     10
+# define OSSL_TRACE_CATEGORY_X509V3_POLICY      11
+# define OSSL_TRACE_CATEGORY_BN_CTX             12
+# define OSSL_TRACE_CATEGORY_CMP                13
+# define OSSL_TRACE_CATEGORY_NUM                14
 
 /* Returns the trace category number for the given |name| */
 int OSSL_trace_get_category_num(const char *name);
@@ -94,7 +100,7 @@ typedef size_t (*OSSL_trace_cb)(const char *buffer, size_t count,
  * Possible |cmd| numbers.
  */
 # define OSSL_TRACE_CTRL_BEGIN  0
-# define OSSL_TRACE_CTRL_DURING 1
+# define OSSL_TRACE_CTRL_WRITE  1
 # define OSSL_TRACE_CTRL_END    2
 
 /*