Send connman mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."


Today's Topics:

   1. [PATCH] stats: add --enable-stats/--disable-stats compile
      flag. (Feng Wang)
   2. Re: [PATCH] dhcpv6: use correct dhcp renew time when valid
      life-time is infinity. (Patrik Flykt)
   3. Re: [PATCH] dhcpv6: use correct dhcp renew time when valid
      life-time is infinity. (wangfe-nestlabs)


----------------------------------------------------------------------

Message: 1
Date: Thu, 30 Jun 2016 14:35:53 -0700
From: Feng Wang <[email protected]>
To: [email protected]
Subject: [PATCH] stats: add --enable-stats/--disable-stats compile
        flag.
Message-ID: <[email protected]>

This flag turns on/off the persistent statistic numbers support.
---
 Makefile.am  |  4 ++++
 configure.ac |  5 +++++
 src/stats.c  | 36 ++++++++++++++++++++++++++++++++++++
 3 files changed, 45 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index d70725c..fd38bb9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -223,6 +223,10 @@ else
 AM_CPPFLAGS = -I$(builddir)/include -I$(builddir)/src -I$(srcdir)/gdbus
 endif
 
+if STATS
+AM_CPPFLAGS += -DCONNMAN_WITH_STATS
+endif
+
 src_connmand_CFLAGS = @DBUS_CFLAGS@ @GLIB_CFLAGS@ @XTABLES_CFLAGS@ \
                                @GNUTLS_CFLAGS@ $(builtin_cflags) \
                                -DCONNMAN_PLUGIN_BUILTIN \
diff --git a/configure.ac b/configure.ac
index c330314..a8a03a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -352,6 +352,11 @@ AC_ARG_ENABLE(tools, AC_HELP_STRING([--disable-tools],
                                        [enable_tools=${enableval}])
 AM_CONDITIONAL(TOOLS, test "${enable_tools}" != "no")
 
+AC_ARG_ENABLE(stats, AC_HELP_STRING([--disable-stats],
+              [disable stats file support]),
+                                       [enable_stats=${enableval}])
+AM_CONDITIONAL(STATS, test "${enable_stats}" != "no")
+
 if (test "${enable_tools}" != "no"); then
        AC_PATH_PROGS(IPTABLES_SAVE, [iptables-save], [],
                                                $PATH:/sbin:/usr/sbin)
diff --git a/src/stats.c b/src/stats.c
index 26343b1..8fb2139 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -37,6 +37,7 @@
 
 #include "connman.h"
 
+#ifdef CONNMAN_WITH_STATS
 #define MODE           (S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | \
                        S_IXGRP | S_IROTH | S_IXOTH)
 
@@ -823,3 +824,38 @@ void __connman_stats_cleanup(void)
        g_hash_table_destroy(stats_hash);
        stats_hash = NULL;
 }
+
+#else
+
+int __connman_stats_service_register(struct connman_service *service)
+{
+       return -ENOTSUP;
+}
+
+void __connman_stats_service_unregister(struct connman_service *service)
+{
+}
+
+int  __connman_stats_update(struct connman_service *service,
+                               bool roaming,
+                               struct connman_stats_data *data)
+{
+       return 0;
+}
+
+int __connman_stats_get(struct connman_service *service,
+                               bool roaming,
+                               struct connman_stats_data *data)
+{
+       return 0;
+}
+
+int __connman_stats_init(void)
+{
+       return 0;
+}
+
+void __connman_stats_cleanup(void)
+{
+}
+#endif /* CONNMAN_WITH_STATS */
-- 
2.8.0.rc3.226.g39d4020



------------------------------

Message: 2
Date: Fri, 01 Jul 2016 15:05:11 +0300
From: Patrik Flykt <[email protected]>
To: Feng Wang <[email protected]>, [email protected]
Subject: Re: [PATCH] dhcpv6: use correct dhcp renew time when valid
        life-time is infinity.
Message-ID: <[email protected]>
Content-Type: text/plain; charset="UTF-8"

On Tue, 2016-06-28 at 14:34 -0700, Feng Wang wrote:
> Based on RFC 3315, 22.6, the valid life-time is infinite when its
> value is 0xffffffff. In the g_dhcpv6_client_get_timeouts, the expire
> data type is time_t. If time_t is uint32, the last_request time plus
> 0xffffffff will wrapover so that expire time is smaller than current
> time. Thus the dhcpv6 will restart immediately(dhcpv6_restart
> called).

If the timeout value is inifinite, should we actually omit setting the
timer? That way also our lease will be inifinite?

Cheers,

        Patrik



------------------------------

Message: 3
Date: Fri, 1 Jul 2016 09:56:58 -0700
From: wangfe-nestlabs <[email protected]>
To: Patrik Flykt <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] dhcpv6: use correct dhcp renew time when valid
        life-time is infinity.
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8

When the value is infinite, we didn?t start any timer. And the lease will be 
infinite.
But this only happens when the t1 value is not set.

Thanks,

Feng

> On Jul 1, 2016, at 5:05 AM, Patrik Flykt <[email protected]> wrote:
> 
> On Tue, 2016-06-28 at 14:34 -0700, Feng Wang wrote:
>> Based on RFC 3315, 22.6, the valid life-time is infinite when its
>> value is 0xffffffff. In the g_dhcpv6_client_get_timeouts, the expire
>> data type is time_t. If time_t is uint32, the last_request time plus
>> 0xffffffff will wrapover so that expire time is smaller than current
>> time. Thus the dhcpv6 will restart immediately(dhcpv6_restart
>> called).
> 
> If the timeout value is inifinite, should we actually omit setting the
> timer? That way also our lease will be inifinite?
> 
> Cheers,
> 
>       Patrik
> 



------------------------------

Subject: Digest Footer

_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman


------------------------------

End of connman Digest, Vol 9, Issue 1
*************************************

Reply via email to