aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/coverage/index.net.c.37012fce13860cefc5963f57e0f36732.html
diff options
context:
space:
mode:
authoregor-tensin <egor@tensin.name>2024-04-25 03:50:51 +0000
committeregor-tensin <egor@tensin.name>2024-04-25 03:50:51 +0000
commitd1cd99244f96bd95bbd67cc737248df346dec08b (patch)
treebd6fc02cb1bb7b5cf3dba0badb7c13c68e78acf1 /coverage/index.net.c.37012fce13860cefc5963f57e0f36732.html
downloadcimple-gh-pages.tar.gz
cimple-gh-pages.zip
Deploying to gh-pages from @ egor-tensin/cimple@8e652dd2cb69928ea1596aa3e59845fef6854e2c 🚀gh-pages
Diffstat (limited to 'coverage/index.net.c.37012fce13860cefc5963f57e0f36732.html')
-rw-r--r--coverage/index.net.c.37012fce13860cefc5963f57e0f36732.html2386
1 files changed, 2386 insertions, 0 deletions
diff --git a/coverage/index.net.c.37012fce13860cefc5963f57e0f36732.html b/coverage/index.net.c.37012fce13860cefc5963f57e0f36732.html
new file mode 100644
index 0000000..25c157c
--- /dev/null
+++ b/coverage/index.net.c.37012fce13860cefc5963f57e0f36732.html
@@ -0,0 +1,2386 @@
+<!DOCTYPE html>
+<html>
+
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>GCC Code Coverage Report</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+ <link rel="stylesheet" href="index.css">
+ </head>
+
+ <body>
+ <h1>GCC Code Coverage Report</h1>
+
+ <hr/>
+
+ <div class="summary">
+<div>
+ <table class="legend">
+ <tr>
+ <th scope="row">Directory:</th>
+ <td>src/</td>
+ </tr>
+ <tr>
+ <th scope="row">File:</th>
+ <td>src/net.c</td>
+ </tr>
+ <tr>
+ <th scope="row">Date:</th>
+ <td>2024-04-25 03:45:42</td>
+ </tr>
+ </table>
+</div>
+<div>
+ <table class="coverage">
+ <tr>
+ <th></th>
+ <th scope="col">Exec</th>
+ <th scope="col">Total</th>
+ <th scope="col">Coverage</th>
+ </tr>
+ <tr>
+ <th scope="row">Lines:</th>
+ <td>87</td>
+ <td>139</td>
+ <td class="coverage-low">62.6%</td>
+ </tr>
+ <tr>
+ <th scope="row">Branches:</th>
+ <td>30</td>
+ <td>92</td>
+ <td class="coverage-low">32.6%</td>
+ </tr>
+ </table>
+</div>
+ </div>
+
+ <hr/>
+
+<div class="file-source">
+ <table>
+ <tr>
+ <th align="right">Line</th>
+ <th align="right">Branch</th>
+ <th align="right">Exec</th>
+ <th align="left">Source</th>
+ </tr>
+
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l1" href="#l1">1</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="cm">/*</span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l2" href="#l2">2</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="cm"> * Copyright (c) 2022 Egor Tensin &lt;egor@tensin.name&gt;</span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l3" href="#l3">3</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="cm"> * This file is part of the &quot;cimple&quot; project.</span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l4" href="#l4">4</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="cm"> * For details, see https://github.com/egor-tensin/cimple.</span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l5" href="#l5">5</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="cm"> * Distributed under the MIT License.</span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l6" href="#l6">6</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="cm"> */</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l7" href="#l7">7</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l8" href="#l8">8</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="cp">#include</span><span class="w"> </span><span class="cpf">&quot;net.h&quot;</span><span class="cp"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l9" href="#l9">9</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="cp">#include</span><span class="w"> </span><span class="cpf">&quot;buf.h&quot;</span><span class="cp"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l10" href="#l10">10</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="cp">#include</span><span class="w"> </span><span class="cpf">&quot;file.h&quot;</span><span class="cp"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l11" href="#l11">11</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="cp">#include</span><span class="w"> </span><span class="cpf">&quot;log.h&quot;</span><span class="cp"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l12" href="#l12">12</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l13" href="#l13">13</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;netdb.h&gt;</span><span class="cp"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l14" href="#l14">14</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;stdint.h&gt;</span><span class="cp"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l15" href="#l15">15</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;stdlib.h&gt;</span><span class="cp"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l16" href="#l16">16</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;string.h&gt;</span><span class="cp"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l17" href="#l17">17</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;sys/socket.h&gt;</span><span class="cp"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l18" href="#l18">18</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;sys/types.h&gt;</span><span class="cp"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l19" href="#l19">19</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;unistd.h&gt;</span><span class="cp"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l20" href="#l20">20</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l21" href="#l21">21</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="cp">#define gai_log_errno(ec) log_err(&quot;getaddrinfo: %s\n&quot;, gai_strerror(ec))</span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l22" href="#l22">22</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l23" href="#l23">23</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">29</td>
+ <td class="src coveredLine"><span class="kt">int</span><span class="w"> </span><span class="nf">net_bind</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">port</span><span class="p">)</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l24" href="#l24">24</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l25" href="#l25">25</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">flags</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">SOCK_CLOEXEC</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l26" href="#l26">26</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">29</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">addrinfo</span><span class="w"> </span><span class="o">*</span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">it</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l27" href="#l27">27</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">addrinfo</span><span class="w"> </span><span class="n">hints</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l28" href="#l28">28</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">29</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">socket_fd</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l29" href="#l29">29</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l30" href="#l30">30</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">29</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="n">memset</span><span class="p">(</span><span class="o">&amp;</span><span class="n">hints</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="k">sizeof</span><span class="p">(</span><span class="n">hints</span><span class="p">));</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l31" href="#l31">31</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">29</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="n">hints</span><span class="p">.</span><span class="n">ai_family</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">AF_INET6</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l32" href="#l32">32</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">29</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="n">hints</span><span class="p">.</span><span class="n">ai_socktype</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">SOCK_STREAM</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l33" href="#l33">33</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">29</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="n">hints</span><span class="p">.</span><span class="n">ai_flags</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">AI_PASSIVE</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l34" href="#l34">34</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l35" href="#l35">35</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">29</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">getaddrinfo</span><span class="p">(</span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">port</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">hints</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">result</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l36" href="#l36">36</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">1/2</summary>
+ <div class="linebranchContents">
+ <div class="notTakenBranch">&cross; Branch 0 not taken.</div>
+ <div class="takenBranch">&check; Branch 1 taken 29 times.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">29</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">ret</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l37" href="#l37">37</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="n">gai_log_errno</span><span class="p">(</span><span class="n">ret</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l38" href="#l38">38</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l39" href="#l39">39</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l40" href="#l40">40</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l41" href="#l41">41</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">1/2</summary>
+ <div class="linebranchContents">
+ <div class="takenBranch">&check; Branch 0 taken 29 times.</div>
+ <div class="notTakenBranch">&cross; Branch 1 not taken.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">29</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">it</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">result</span><span class="p">;</span><span class="w"> </span><span class="n">it</span><span class="p">;</span><span class="w"> </span><span class="n">it</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">it</span><span class="o">-&gt;</span><span class="n">ai_next</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l42" href="#l42">42</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">29</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="n">socket_fd</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">socket</span><span class="p">(</span><span class="n">it</span><span class="o">-&gt;</span><span class="n">ai_family</span><span class="p">,</span><span class="w"> </span><span class="n">it</span><span class="o">-&gt;</span><span class="n">ai_socktype</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">flags</span><span class="p">,</span><span class="w"> </span><span class="n">it</span><span class="o">-&gt;</span><span class="n">ai_protocol</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l43" href="#l43">43</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">1/2</summary>
+ <div class="linebranchContents">
+ <div class="notTakenBranch">&cross; Branch 0 not taken.</div>
+ <div class="takenBranch">&check; Branch 1 taken 29 times.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">29</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">socket_fd</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l44" href="#l44">44</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="n">log_errno</span><span class="p">(</span><span class="s">&quot;socket&quot;</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l45" href="#l45">45</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="k">continue</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l46" href="#l46">46</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l47" href="#l47">47</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l48" href="#l48">48</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">yes</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l49" href="#l49">49</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">no</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l50" href="#l50">50</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l51" href="#l51">51</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">1/2</summary>
+ <div class="linebranchContents">
+ <div class="takenBranch">&check; Branch 0 taken 29 times.</div>
+ <div class="notTakenBranch">&cross; Branch 1 not taken.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">29</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">it</span><span class="o">-&gt;</span><span class="n">ai_family</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="n">AF_INET6</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l52" href="#l52">52</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">1/2</summary>
+ <div class="linebranchContents">
+ <div class="notTakenBranch">&cross; Branch 1 not taken.</div>
+ <div class="takenBranch">&check; Branch 2 taken 29 times.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">29</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">setsockopt</span><span class="p">(</span><span class="n">socket_fd</span><span class="p">,</span><span class="w"> </span><span class="n">IPPROTO_IPV6</span><span class="p">,</span><span class="w"> </span><span class="n">IPV6_V6ONLY</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">no</span><span class="p">,</span><span class="w"> </span><span class="k">sizeof</span><span class="p">(</span><span class="n">no</span><span class="p">))</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l53" href="#l53">53</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="n">log_errno</span><span class="p">(</span><span class="s">&quot;setsockopt&quot;</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l54" href="#l54">54</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">close_socket</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l55" href="#l55">55</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l56" href="#l56">56</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l57" href="#l57">57</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l58" href="#l58">58</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">1/2</summary>
+ <div class="linebranchContents">
+ <div class="notTakenBranch">&cross; Branch 1 not taken.</div>
+ <div class="takenBranch">&check; Branch 2 taken 29 times.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">29</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">setsockopt</span><span class="p">(</span><span class="n">socket_fd</span><span class="p">,</span><span class="w"> </span><span class="n">SOL_SOCKET</span><span class="p">,</span><span class="w"> </span><span class="n">SO_REUSEADDR</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">yes</span><span class="p">,</span><span class="w"> </span><span class="k">sizeof</span><span class="p">(</span><span class="n">yes</span><span class="p">))</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l59" href="#l59">59</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="n">log_errno</span><span class="p">(</span><span class="s">&quot;setsockopt&quot;</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l60" href="#l60">60</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">close_socket</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l61" href="#l61">61</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l62" href="#l62">62</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l63" href="#l63">63</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">1/2</summary>
+ <div class="linebranchContents">
+ <div class="notTakenBranch">&cross; Branch 1 not taken.</div>
+ <div class="takenBranch">&check; Branch 2 taken 29 times.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">29</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">bind</span><span class="p">(</span><span class="n">socket_fd</span><span class="p">,</span><span class="w"> </span><span class="n">it</span><span class="o">-&gt;</span><span class="n">ai_addr</span><span class="p">,</span><span class="w"> </span><span class="n">it</span><span class="o">-&gt;</span><span class="n">ai_addrlen</span><span class="p">)</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l64" href="#l64">64</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="n">log_errno</span><span class="p">(</span><span class="s">&quot;bind&quot;</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l65" href="#l65">65</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">close_socket</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l66" href="#l66">66</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l67" href="#l67">67</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l68" href="#l68">68</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">29</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">break</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l69" href="#l69">69</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l70" href="#l70">70</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="nl">close_socket</span><span class="p">:</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l71" href="#l71">71</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="n">net_close</span><span class="p">(</span><span class="n">socket_fd</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l72" href="#l72">72</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l73" href="#l73">73</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l74" href="#l74">74</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">29</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="n">freeaddrinfo</span><span class="p">(</span><span class="n">result</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l75" href="#l75">75</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l76" href="#l76">76</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">1/2</summary>
+ <div class="linebranchContents">
+ <div class="notTakenBranch">&cross; Branch 0 not taken.</div>
+ <div class="takenBranch">&check; Branch 1 taken 29 times.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">29</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">it</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l77" href="#l77">77</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="n">log_err</span><span class="p">(</span><span class="s">&quot;Couldn&#39;t bind to port %s</span><span class="se">\n</span><span class="s">&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">port</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l78" href="#l78">78</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l79" href="#l79">79</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l80" href="#l80">80</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l81" href="#l81">81</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">29</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">listen</span><span class="p">(</span><span class="n">socket_fd</span><span class="p">,</span><span class="w"> </span><span class="mi">4096</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l82" href="#l82">82</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">1/2</summary>
+ <div class="linebranchContents">
+ <div class="notTakenBranch">&cross; Branch 0 not taken.</div>
+ <div class="takenBranch">&check; Branch 1 taken 29 times.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">29</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">ret</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l83" href="#l83">83</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="n">log_errno</span><span class="p">(</span><span class="s">&quot;listen&quot;</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l84" href="#l84">84</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">fail</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l85" href="#l85">85</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l86" href="#l86">86</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l87" href="#l87">87</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">29</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">socket_fd</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l88" href="#l88">88</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l89" href="#l89">89</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="nl">fail</span><span class="p">:</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l90" href="#l90">90</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="n">net_close</span><span class="p">(</span><span class="n">socket_fd</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l91" href="#l91">91</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l92" href="#l92">92</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">ret</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l93" href="#l93">93</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l94" href="#l94">94</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l95" href="#l95">95</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">27620</td>
+ <td class="src coveredLine"><span class="kt">int</span><span class="w"> </span><span class="nf">net_accept</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">fd</span><span class="p">)</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l96" href="#l96">96</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l97" href="#l97">97</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">flags</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">SOCK_CLOEXEC</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l98" href="#l98">98</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">27620</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l99" href="#l99">99</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l100" href="#l100">100</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">27620</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">accept4</span><span class="p">(</span><span class="n">fd</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="n">flags</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l101" href="#l101">101</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">1/2</summary>
+ <div class="linebranchContents">
+ <div class="notTakenBranch">&cross; Branch 0 not taken.</div>
+ <div class="takenBranch">&check; Branch 1 taken 27620 times.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">27620</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">ret</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l102" href="#l102">102</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="n">log_errno</span><span class="p">(</span><span class="s">&quot;accept4&quot;</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l103" href="#l103">103</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">ret</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l104" href="#l104">104</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l105" href="#l105">105</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l106" href="#l106">106</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">27620</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">ret</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l107" href="#l107">107</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l108" href="#l108">108</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l109" href="#l109">109</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">27620</td>
+ <td class="src coveredLine"><span class="kt">int</span><span class="w"> </span><span class="nf">net_connect</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">host</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">port</span><span class="p">)</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l110" href="#l110">110</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l111" href="#l111">111</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">flags</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">SOCK_CLOEXEC</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l112" href="#l112">112</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">27620</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">addrinfo</span><span class="w"> </span><span class="o">*</span><span class="n">result</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">it</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">NULL</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l113" href="#l113">113</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">addrinfo</span><span class="w"> </span><span class="n">hints</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l114" href="#l114">114</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">27620</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">socket_fd</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">-1</span><span class="p">,</span><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l115" href="#l115">115</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l116" href="#l116">116</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">27620</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="n">memset</span><span class="p">(</span><span class="o">&amp;</span><span class="n">hints</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="k">sizeof</span><span class="p">(</span><span class="n">hints</span><span class="p">));</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l117" href="#l117">117</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">27620</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="n">hints</span><span class="p">.</span><span class="n">ai_family</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">AF_UNSPEC</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l118" href="#l118">118</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">27620</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="n">hints</span><span class="p">.</span><span class="n">ai_socktype</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">SOCK_STREAM</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l119" href="#l119">119</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l120" href="#l120">120</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">27620</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">getaddrinfo</span><span class="p">(</span><span class="n">host</span><span class="p">,</span><span class="w"> </span><span class="n">port</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">hints</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">result</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l121" href="#l121">121</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">1/2</summary>
+ <div class="linebranchContents">
+ <div class="notTakenBranch">&cross; Branch 0 not taken.</div>
+ <div class="takenBranch">&check; Branch 1 taken 27620 times.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">27620</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">ret</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l122" href="#l122">122</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="n">gai_log_errno</span><span class="p">(</span><span class="n">ret</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l123" href="#l123">123</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l124" href="#l124">124</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l125" href="#l125">125</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l126" href="#l126">126</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">1/2</summary>
+ <div class="linebranchContents">
+ <div class="takenBranch">&check; Branch 0 taken 27620 times.</div>
+ <div class="notTakenBranch">&cross; Branch 1 not taken.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">27620</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">it</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">result</span><span class="p">;</span><span class="w"> </span><span class="n">it</span><span class="p">;</span><span class="w"> </span><span class="n">it</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">it</span><span class="o">-&gt;</span><span class="n">ai_next</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l127" href="#l127">127</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">27620</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="n">socket_fd</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">socket</span><span class="p">(</span><span class="n">it</span><span class="o">-&gt;</span><span class="n">ai_family</span><span class="p">,</span><span class="w"> </span><span class="n">it</span><span class="o">-&gt;</span><span class="n">ai_socktype</span><span class="w"> </span><span class="o">|</span><span class="w"> </span><span class="n">flags</span><span class="p">,</span><span class="w"> </span><span class="n">it</span><span class="o">-&gt;</span><span class="n">ai_protocol</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l128" href="#l128">128</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">1/2</summary>
+ <div class="linebranchContents">
+ <div class="notTakenBranch">&cross; Branch 0 not taken.</div>
+ <div class="takenBranch">&check; Branch 1 taken 27620 times.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">27620</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">socket_fd</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l129" href="#l129">129</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="n">log_errno</span><span class="p">(</span><span class="s">&quot;socket&quot;</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l130" href="#l130">130</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="k">continue</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l131" href="#l131">131</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l132" href="#l132">132</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l133" href="#l133">133</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">1/2</summary>
+ <div class="linebranchContents">
+ <div class="notTakenBranch">&cross; Branch 1 not taken.</div>
+ <div class="takenBranch">&check; Branch 2 taken 27620 times.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">27620</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">connect</span><span class="p">(</span><span class="n">socket_fd</span><span class="p">,</span><span class="w"> </span><span class="n">it</span><span class="o">-&gt;</span><span class="n">ai_addr</span><span class="p">,</span><span class="w"> </span><span class="n">it</span><span class="o">-&gt;</span><span class="n">ai_addrlen</span><span class="p">)</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l134" href="#l134">134</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="n">log_errno</span><span class="p">(</span><span class="s">&quot;connect&quot;</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l135" href="#l135">135</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">close_socket</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l136" href="#l136">136</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l137" href="#l137">137</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l138" href="#l138">138</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">27620</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">break</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l139" href="#l139">139</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l140" href="#l140">140</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="nl">close_socket</span><span class="p">:</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l141" href="#l141">141</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="n">net_close</span><span class="p">(</span><span class="n">socket_fd</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l142" href="#l142">142</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l143" href="#l143">143</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l144" href="#l144">144</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">27620</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="n">freeaddrinfo</span><span class="p">(</span><span class="n">result</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l145" href="#l145">145</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l146" href="#l146">146</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">1/2</summary>
+ <div class="linebranchContents">
+ <div class="notTakenBranch">&cross; Branch 0 not taken.</div>
+ <div class="takenBranch">&check; Branch 1 taken 27620 times.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">27620</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">it</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l147" href="#l147">147</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="n">log_err</span><span class="p">(</span><span class="s">&quot;Couldn&#39;t connect to host %s, port %s</span><span class="se">\n</span><span class="s">&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">host</span><span class="p">,</span><span class="w"> </span><span class="n">port</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l148" href="#l148">148</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l149" href="#l149">149</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l150" href="#l150">150</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l151" href="#l151">151</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">27620</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">socket_fd</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l152" href="#l152">152</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l153" href="#l153">153</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l154" href="#l154">154</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">64503</td>
+ <td class="src coveredLine"><span class="kt">void</span><span class="w"> </span><span class="nf">net_close</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">fd</span><span class="p">)</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l155" href="#l155">155</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l156" href="#l156">156</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">64503</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="n">file_close</span><span class="p">(</span><span class="n">fd</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l157" href="#l157">157</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">64503</td>
+ <td class="src coveredLine"><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l158" href="#l158">158</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l159" href="#l159">159</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">92012</td>
+ <td class="src coveredLine"><span class="k">static</span><span class="w"> </span><span class="kt">ssize_t</span><span class="w"> </span><span class="nf">net_send_part</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">fd</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="o">*</span><span class="n">buf</span><span class="p">,</span><span class="w"> </span><span class="kt">size_t</span><span class="w"> </span><span class="n">size</span><span class="p">)</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l160" href="#l160">160</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l161" href="#l161">161</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="k">static</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">flags</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">MSG_NOSIGNAL</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l162" href="#l162">162</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l163" href="#l163">163</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">92012</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="kt">ssize_t</span><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">send</span><span class="p">(</span><span class="n">fd</span><span class="p">,</span><span class="w"> </span><span class="n">buf</span><span class="p">,</span><span class="w"> </span><span class="n">size</span><span class="p">,</span><span class="w"> </span><span class="n">flags</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l164" href="#l164">164</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">1/2</summary>
+ <div class="linebranchContents">
+ <div class="notTakenBranch">&cross; Branch 0 not taken.</div>
+ <div class="takenBranch">&check; Branch 1 taken 92012 times.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">92012</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">ret</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l165" href="#l165">165</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="n">log_errno</span><span class="p">(</span><span class="s">&quot;send&quot;</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l166" href="#l166">166</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l167" href="#l167">167</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l168" href="#l168">168</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l169" href="#l169">169</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">92012</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">ret</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l170" href="#l170">170</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l171" href="#l171">171</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l172" href="#l172">172</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">92012</td>
+ <td class="src coveredLine"><span class="kt">int</span><span class="w"> </span><span class="nf">net_send</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">fd</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="o">*</span><span class="n">buf</span><span class="p">,</span><span class="w"> </span><span class="kt">size_t</span><span class="w"> </span><span class="n">size</span><span class="p">)</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l173" href="#l173">173</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l174" href="#l174">174</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">92012</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="kt">size_t</span><span class="w"> </span><span class="n">sent_total</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l175" href="#l175">175</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l176" href="#l176">176</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">2/2</summary>
+ <div class="linebranchContents">
+ <div class="takenBranch">&check; Branch 0 taken 92012 times.</div>
+ <div class="takenBranch">&check; Branch 1 taken 92012 times.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">184024</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">(</span><span class="n">sent_total</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="n">size</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l177" href="#l177">177</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="kt">ssize_t</span><span class="w"> </span><span class="n">sent_now</span><span class="w"> </span><span class="o">=</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l178" href="#l178">178</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">92012</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="n">net_send_part</span><span class="p">(</span><span class="n">fd</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">buf</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">sent_total</span><span class="p">,</span><span class="w"> </span><span class="n">size</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">sent_total</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l179" href="#l179">179</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">1/2</summary>
+ <div class="linebranchContents">
+ <div class="notTakenBranch">&cross; Branch 0 not taken.</div>
+ <div class="takenBranch">&check; Branch 1 taken 92012 times.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">92012</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">sent_now</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l180" href="#l180">180</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l181" href="#l181">181</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">92012</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="n">sent_total</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">sent_now</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l182" href="#l182">182</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l183" href="#l183">183</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l184" href="#l184">184</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">92012</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l185" href="#l185">185</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l186" href="#l186">186</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l187" href="#l187">187</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">92012</td>
+ <td class="src coveredLine"><span class="kt">int</span><span class="w"> </span><span class="nf">net_recv</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">fd</span><span class="p">,</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="o">*</span><span class="n">buf</span><span class="p">,</span><span class="w"> </span><span class="kt">size_t</span><span class="w"> </span><span class="n">size</span><span class="p">)</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l188" href="#l188">188</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l189" href="#l189">189</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">92012</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="kt">ssize_t</span><span class="w"> </span><span class="n">read_total</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l190" href="#l190">190</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l191" href="#l191">191</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">2/2</summary>
+ <div class="linebranchContents">
+ <div class="takenBranch">&check; Branch 0 taken 109165 times.</div>
+ <div class="takenBranch">&check; Branch 1 taken 92012 times.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">201177</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">while</span><span class="w"> </span><span class="p">((</span><span class="kt">size_t</span><span class="p">)</span><span class="n">read_total</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="n">size</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l192" href="#l192">192</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">109165</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="kt">ssize_t</span><span class="w"> </span><span class="n">read_now</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">read</span><span class="p">(</span><span class="n">fd</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="kt">unsigned</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="p">)</span><span class="n">buf</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">read_total</span><span class="p">,</span><span class="w"> </span><span class="n">size</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="n">read_total</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l193" href="#l193">193</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">1/2</summary>
+ <div class="linebranchContents">
+ <div class="notTakenBranch">&cross; Branch 0 not taken.</div>
+ <div class="takenBranch">&check; Branch 1 taken 109165 times.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">109165</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">read_now</span><span class="p">)</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l194" href="#l194">194</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="k">break</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l195" href="#l195">195</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l196" href="#l196">196</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">1/2</summary>
+ <div class="linebranchContents">
+ <div class="notTakenBranch">&cross; Branch 0 not taken.</div>
+ <div class="takenBranch">&check; Branch 1 taken 109165 times.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">109165</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">read_now</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l197" href="#l197">197</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="n">log_errno</span><span class="p">(</span><span class="s">&quot;read&quot;</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l198" href="#l198">198</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l199" href="#l199">199</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l200" href="#l200">200</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l201" href="#l201">201</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">109165</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="n">read_total</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="n">read_now</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l202" href="#l202">202</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l203" href="#l203">203</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l204" href="#l204">204</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">1/2</summary>
+ <div class="linebranchContents">
+ <div class="notTakenBranch">&cross; Branch 0 not taken.</div>
+ <div class="takenBranch">&check; Branch 1 taken 92012 times.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">92012</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">((</span><span class="kt">size_t</span><span class="p">)</span><span class="n">read_total</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="n">size</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l205" href="#l205">205</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="n">log_err</span><span class="p">(</span><span class="s">&quot;Received only %zd bytes out of %zu</span><span class="se">\n</span><span class="s">&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">read_total</span><span class="p">,</span><span class="w"> </span><span class="n">size</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l206" href="#l206">206</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l207" href="#l207">207</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l208" href="#l208">208</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l209" href="#l209">209</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">92012</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l210" href="#l210">210</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l211" href="#l211">211</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l212" href="#l212">212</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">46006</td>
+ <td class="src coveredLine"><span class="kt">int</span><span class="w"> </span><span class="nf">net_send_buf</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">fd</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">buf</span><span class="w"> </span><span class="o">*</span><span class="n">buf</span><span class="p">)</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l213" href="#l213">213</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l214" href="#l214">214</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">46006</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l215" href="#l215">215</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l216" href="#l216">216</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">46006</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="kt">uint32_t</span><span class="w"> </span><span class="n">size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">htonl</span><span class="p">(</span><span class="n">buf_get_size</span><span class="p">(</span><span class="n">buf</span><span class="p">));</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l217" href="#l217">217</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">46006</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">net_send</span><span class="p">(</span><span class="n">fd</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">size</span><span class="p">,</span><span class="w"> </span><span class="k">sizeof</span><span class="p">(</span><span class="n">size</span><span class="p">));</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l218" href="#l218">218</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">1/2</summary>
+ <div class="linebranchContents">
+ <div class="notTakenBranch">&cross; Branch 0 not taken.</div>
+ <div class="takenBranch">&check; Branch 1 taken 46006 times.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">46006</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">ret</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l219" href="#l219">219</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">ret</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l220" href="#l220">220</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l221" href="#l221">221</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">46006</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">net_send</span><span class="p">(</span><span class="n">fd</span><span class="p">,</span><span class="w"> </span><span class="n">buf_get_data</span><span class="p">(</span><span class="n">buf</span><span class="p">),</span><span class="w"> </span><span class="n">buf_get_size</span><span class="p">(</span><span class="n">buf</span><span class="p">));</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l222" href="#l222">222</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">1/2</summary>
+ <div class="linebranchContents">
+ <div class="notTakenBranch">&cross; Branch 0 not taken.</div>
+ <div class="takenBranch">&check; Branch 1 taken 46006 times.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">46006</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">ret</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l223" href="#l223">223</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">ret</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l224" href="#l224">224</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l225" href="#l225">225</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">46006</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">ret</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l226" href="#l226">226</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l227" href="#l227">227</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l228" href="#l228">228</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">46006</td>
+ <td class="src coveredLine"><span class="kt">int</span><span class="w"> </span><span class="nf">net_recv_buf</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">fd</span><span class="p">,</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">buf</span><span class="w"> </span><span class="o">**</span><span class="n">buf</span><span class="p">)</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l229" href="#l229">229</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l230" href="#l230">230</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">46006</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="kt">uint32_t</span><span class="w"> </span><span class="n">size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l231" href="#l231">231</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">46006</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l232" href="#l232">232</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l233" href="#l233">233</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">46006</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">net_recv</span><span class="p">(</span><span class="n">fd</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">size</span><span class="p">,</span><span class="w"> </span><span class="k">sizeof</span><span class="p">(</span><span class="n">size</span><span class="p">));</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l234" href="#l234">234</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">1/2</summary>
+ <div class="linebranchContents">
+ <div class="notTakenBranch">&cross; Branch 0 not taken.</div>
+ <div class="takenBranch">&check; Branch 1 taken 46006 times.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">46006</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">ret</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l235" href="#l235">235</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="n">log_err</span><span class="p">(</span><span class="s">&quot;Couldn&#39;t read buffer size</span><span class="se">\n</span><span class="s">&quot;</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l236" href="#l236">236</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">fail</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l237" href="#l237">237</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l238" href="#l238">238</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">46006</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="n">size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ntohl</span><span class="p">(</span><span class="n">size</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l239" href="#l239">239</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l240" href="#l240">240</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">46006</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="o">*</span><span class="n">data</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">malloc</span><span class="p">(</span><span class="n">size</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l241" href="#l241">241</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">1/2</summary>
+ <div class="linebranchContents">
+ <div class="notTakenBranch">&cross; Branch 0 not taken.</div>
+ <div class="takenBranch">&check; Branch 1 taken 46006 times.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">46006</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">data</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l242" href="#l242">242</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="n">log_errno</span><span class="p">(</span><span class="s">&quot;malloc&quot;</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l243" href="#l243">243</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">fail</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l244" href="#l244">244</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l245" href="#l245">245</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l246" href="#l246">246</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">46006</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">net_recv</span><span class="p">(</span><span class="n">fd</span><span class="p">,</span><span class="w"> </span><span class="n">data</span><span class="p">,</span><span class="w"> </span><span class="n">size</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l247" href="#l247">247</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">1/2</summary>
+ <div class="linebranchContents">
+ <div class="notTakenBranch">&cross; Branch 0 not taken.</div>
+ <div class="takenBranch">&check; Branch 1 taken 46006 times.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">46006</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">ret</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l248" href="#l248">248</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="n">log_err</span><span class="p">(</span><span class="s">&quot;Couldn&#39;t read buffer</span><span class="se">\n</span><span class="s">&quot;</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l249" href="#l249">249</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">free_data</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l250" href="#l250">250</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="w"> </span><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l251" href="#l251">251</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l252" href="#l252">252</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">46006</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="n">ret</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">buf_create</span><span class="p">(</span><span class="n">buf</span><span class="p">,</span><span class="w"> </span><span class="n">data</span><span class="p">,</span><span class="w"> </span><span class="n">size</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l253" href="#l253">253</a></td>
+ <td class="linebranch">
+ <details class="linebranchDetails">
+ <summary class="linebranchSummary">1/2</summary>
+ <div class="linebranchContents">
+ <div class="notTakenBranch">&cross; Branch 0 not taken.</div>
+ <div class="takenBranch">&check; Branch 1 taken 46006 times.</div>
+ </div>
+ </details>
+ </td>
+ <td class="linecount coveredLine">46006</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">ret</span><span class="w"> </span><span class="o">&lt;</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l254" href="#l254">254</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="k">goto</span><span class="w"> </span><span class="n">free_data</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l255" href="#l255">255</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l256" href="#l256">256</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount coveredLine">46006</td>
+ <td class="src coveredLine"><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">ret</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l257" href="#l257">257</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l258" href="#l258">258</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="nl">free_data</span><span class="p">:</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l259" href="#l259">259</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="n">free</span><span class="p">(</span><span class="n">data</span><span class="p">);</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l260" href="#l260">260</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l261" href="#l261">261</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="nl">fail</span><span class="p">:</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l262" href="#l262">262</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount uncoveredLine">&cross;</td>
+ <td class="src uncoveredLine"><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l263" href="#l263">263</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "><span class="p">}</span><span class="w"></span></td>
+ </tr>
+
+ <tr class="source-line">
+ <td class="lineno"><a id="l264" href="#l264">264</a></td>
+ <td class="linebranch">
+ </td>
+ <td class="linecount "></td>
+ <td class="src "></td>
+ </tr>
+
+ </table>
+</div>
+
+ <hr/>
+
+ <footer>
+ Generated by: <a href="http://gcovr.com">GCOVR (Version 5.0)</a>
+ </footer>
+ </body>
+</html>