search for: mode_address

Displaying 8 results from an estimated 8 matches for "mode_address".

2019 Sep 28
2
[PATCH nbdkit 1/2] common/include: Add function for subtracting struct timeval.
--- common/include/test-tvdiff.c | 75 +++++++++++++++++++++++++++++------- common/include/tvdiff.h | 13 ++++++- 2 files changed, 74 insertions(+), 14 deletions(-) diff --git a/common/include/test-tvdiff.c b/common/include/test-tvdiff.c index 9cbcfc0..abefb2e 100644 --- a/common/include/test-tvdiff.c +++ b/common/include/test-tvdiff.c @@ -36,7 +36,6 @@ #include <stdlib.h> #include
2019 Sep 28
0
[PATCH nbdkit 2/2] reflection: Add mode for reflecting server time.
...#include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> @@ -48,14 +49,29 @@ #include <nbdkit-plugin.h> +#include "byte-swapping.h" +#include "tvdiff.h" + /* The mode. */ enum mode { MODE_EXPORTNAME, MODE_BASE64EXPORTNAME, MODE_ADDRESS, + MODE_TIME, + MODE_UPTIME, + MODE_CONNTIME, }; static enum mode mode = MODE_EXPORTNAME; +/* Plugin load time. */ +static struct timeval load_t; + +static void +reflection_load (void) +{ + gettimeofday (&load_t, NULL); +} + static int reflection_config (const char *key, const char *v...
2019 Sep 28
0
[PATCH nbdkit v2 3/4] info: Add mode for sending back server time.
...#include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> @@ -48,14 +49,29 @@ #include <nbdkit-plugin.h> +#include "byte-swapping.h" +#include "tvdiff.h" + /* The mode. */ enum mode { MODE_EXPORTNAME, MODE_BASE64EXPORTNAME, MODE_ADDRESS, + MODE_TIME, + MODE_UPTIME, + MODE_CONNTIME, }; static enum mode mode = MODE_EXPORTNAME; +/* Plugin load time. */ +static struct timeval load_t; + +static void +info_load (void) +{ + gettimeofday (&load_t, NULL); +} + static int info_config (const char *key, const char *value) { @@...
2019 Sep 15
0
[PATCH nbdkit 4/4] reflection: Enhance plugin to support client address mode.
...e <string.h> +#include <sys/socket.h> +#include <netinet/in.h> +#include <arpa/inet.h> #if defined(HAVE_GNUTLS) && defined(HAVE_GNUTLS_BASE64_DECODE2) #include <gnutls/gnutls.h> @@ -49,6 +52,7 @@ enum mode { MODE_EXPORTNAME, MODE_BASE64EXPORTNAME, + MODE_ADDRESS, }; static enum mode mode = MODE_EXPORTNAME; @@ -67,6 +71,9 @@ reflection_config (const char *key, const char *value) return -1; #endif } + else if (strcasecmp (value, "address") == 0) { + mode = MODE_ADDRESS; + } else { nbdkit_error ("unknown...
2019 Sep 15
0
Re: [PATCH nbdkit 0/4] Reflection plugin, peer name.
...should only request + * multi-conn with the same export name. + */ + case MODE_EXPORTNAME: + case MODE_BASE64EXPORTNAME: + return 1; + /* Unsafe for mode=address because all multi-conn connections + * won't necessarily originate from the same client address. + */ + case MODE_ADDRESS: + return 0; + } } /* Cache. */ Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
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
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.
2020 May 19
1
[PATCH nbdkit] common/include: Add locale-safe ascii_strcasecmp and ascii_strncasecmp.
...f 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; - else if (strcasecmp (value, "time") == 0) + else if (ascii_strcasecmp (value, "time") == 0) mode = MODE_TIME; - else if (strcasecmp (value, "uptime") == 0) + else if (ascii_strcasecmp (value, "uptime") == 0) mode = MODE_UPTIME; -...