<div dir="auto"><div style="font-family:sans-serif;font-size:12.8px" dir="auto"><div style="margin:16px 0px"><div dir="ltr"><div style="font-family:monospace,monospace;font-size:large">get_use_time -> get_usebytes, the implementation of it libcharon is as shown below snippet. </div><div style="font-family:monospace,monospace;font-size:large">1) if bytes, packets are both zero, is the below code correct ?</div><div style="font-family:monospace,monospace;font-size:large">2) here if they { *bytes, *packets } are '0' for both not calling update_usebytes in code below won't cause dpd to be triggered inspite of traffic.</div><div style="font-family:monospace,monospace;font-size:large" dir="auto">3) <span style="font-family:sans-serif;font-size:12.8px">In our case following keep alive ping are being exhanges between peers.</span></div><div style="font-family:monospace,monospace;font-size:large">thanks,</div><div style="font-family:monospace,monospace;font-size:large">Regards</div><div style="font-family:monospace,monospace;font-size:large">Venu</div><div style="font-family:monospace,monospace;font-size:large"><br></div><div style="font-family:monospace,monospace;font-size:large"><table style="width:1466.4px;table-layout:auto!important;border:1px solid rgb(226,226,226);border-collapse:collapse;background-color:rgb(250,250,250);color:rgb(54,0,12);font-family:'verdana',sans-serif;font-size:10.8px"><tbody style="font-family:'consolas','menlo','liberation mono','courier',monospace;font-size:12px"><tr><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">METHOD(child_sa_t, get_usestats, <span style="color:rgb(0,136,136);font-weight:bold">void</span>,
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L676" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">676</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">    private_child_sa_t *this, <span style="color:rgb(0,170,136);font-weight:bold">bool</span> inbound,
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L677" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">677</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">    time_t *time, uint64_t *bytes, uint64_t *packets)
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L678" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">678</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">{
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L679" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">679</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">    <span style="color:rgb(0,136,0);font-weight:bold">if</span> ((!bytes && !packets) || update_usebytes(this, inbound) != FAILED)
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L680" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">680</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">    {
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L681" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">681</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">        <span style="color:rgb(119,119,119)">/* there was traffic since last update or the kernel interface</span>
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L682" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">682</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px"><span style="color:rgb(119,119,119)">         * does not support querying the number of usebytes.</span>
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L683" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">683</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px"><span style="color:rgb(119,119,119)">         */</span>
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L684" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">684</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">        <span style="color:rgb(0,136,0);font-weight:bold">if</span> (time)
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L685" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">685</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">        {
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L686" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">686</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">            <span style="color:rgb(0,136,0);font-weight:bold">if</span> (!update_usetime(this, inbound) && !bytes && !packets)
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L687" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">687</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">            {
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L688" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">688</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">                <span style="color:rgb(119,119,119)">/* if policy query did not yield a usetime, query SAs instead */</span>
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L689" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">689</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">                update_usebytes(this, inbound);
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L690" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">690</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">            }
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L691" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">691</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">        }
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L692" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">692</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">    }
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L693" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">693</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">    <span style="color:rgb(0,136,0);font-weight:bold">if</span> (time)
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L694" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">694</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">    {
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L695" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">695</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">        *time = inbound ? this->my_usetime : this->other_usetime;
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L696" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">696</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">    }
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L697" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">697</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">    <span style="color:rgb(0,136,0);font-weight:bold">if</span> (bytes)
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L698" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">698</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">    {
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L699" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">699</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">        *bytes = inbound ? this->my_usebytes : this->other_usebytes;
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L700" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">700</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">    }
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L701" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">701</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">    <span style="color:rgb(0,136,0);font-weight:bold">if</span> (packets)
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L702" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">702</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">    {
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L703" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">703</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">        *packets = inbound ? this->my_usepackets : this->other_usepackets;
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L704" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">704</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">    }
</pre></td></tr><tr><th style="border:1px solid rgb(226,226,226);background-color:rgb(238,238,238);text-align:right;width:26.6px;padding:0px 3px 0px 0px;color:rgb(153,153,153);font-weight:normal"><a href="https://wiki.strongswan.org/projects/strongswan/repository/revisions/master/entry/src/libcharon/sa/child_sa.c#L705" style="text-decoration-line:none;color:rgb(138,0,32);font-weight:bold">705</a></th><td style="padding:0px 0px 0px 4px"><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px">}</pre><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px"><br></pre><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px"><br></pre><pre style="white-space:pre-wrap;font-family:'consolas','menlo','liberation mono','courier',monospace;margin-top:0px;margin-bottom:0px"><br></pre></td></tr></tbody></table></div></div></div></div><div style="font-family:sans-serif;font-size:12.8px" dir="auto"><div style="height:0px"></div></div><div style="font-family:sans-serif;font-size:12.8px;height:96px" dir="auto"><br></div><br></div>