Displaying 5 results from an estimated 5 matches for "have_base64".
2019 Sep 15
0
[PATCH nbdkit 1/4] Add reflection plugin.
...SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if defined(HAVE_GNUTLS) && defined(HAVE_GNUTLS_BASE64_DECODE2)
+#include <gnutls/gnutls.h>
+#define HAVE_BASE64 1
+#endif
+
+#define NBDKIT_API_VERSION 2
+
+#include <nbdkit-plugin.h>
+
+/* The mode. */
+enum mode {
+ MODE_EXPORTNAME,
+ MODE_BASE64EXPORTNAME,
+};
+static enum mode mode = MODE_EXPORTNAME;
+
+static int
+reflection_config (const char *key, const char *value)
+{
+ if (strcmp (key, &quo...
2019 Sep 15
13
[PATCH nbdkit 0/4] Reflection plugin, peer name.
This series is based on my blog posting here:
https://rwmj.wordpress.com/2019/09/13/nbdkit-supports-exportnames/
It depends on the fix for realloc:
https://www.redhat.com/archives/libguestfs/2019-September/thread.html#00103
This series adds a fun plugin, and also an semi-related feature I've
long thought to be desirable. You can consider patches 1 & 4, and
patches 2 & 3 as forming
2019 Sep 28
0
[PATCH nbdkit v2 2/4] Rename nbdkit-reflection-plugin to nbdkit-info-plugin.
...define reflection_config_help \
+#define info_config_help \
"mode=exportname|base64exportname|address Plugin mode (default exportname)."
/* Provide a way to detect if the base64 feature is supported. */
static void
-reflection_dump_plugin (void)
+info_dump_plugin (void)
{
#ifdef HAVE_BASE64
- printf ("reflection_base64=yes\n");
+ printf ("info_base64=yes\n");
#endif
}
@@ -228,7 +228,7 @@ handle_address (struct sockaddr *sa, socklen_t addrlen,
* - Leaking host information (eg. paths).
*/
static void *
-reflection_open (int readonly)
+info_open (int readon...
2020 May 19
1
[PATCH nbdkit] common/include: Add locale-safe ascii_strcasecmp and ascii_strncasecmp.
...e if (strcasecmp (value, "base64exportname") == 0 ||
- strcasecmp (value, "base64-export-name") == 0) {
+ else if (ascii_strcasecmp (value, "base64exportname") == 0 ||
+ ascii_strcasecmp (value, "base64-export-name") == 0) {
#ifdef HAVE_BASE64
mode = MODE_BASE64EXPORTNAME;
#else
@@ -89,13 +90,13 @@ info_config (const char *key, const char *value)
return -1;
#endif
}
- else if (strcasecmp (value, "address") == 0)
+ else if (ascii_strcasecmp (value, "address") == 0)
mode = MODE_ADDRESS;...
2019 Sep 28
9
[PATCH nbdkit v2 0/4] info: Add mode for sending back server time.
v1 was:
https://www.redhat.com/archives/libguestfs/2019-September/thread.html#00361
v2:
- Adds a patch to rename the reflection plugin to the info plugin.
- Adds tests.
Rich.