<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-tab-span" style="white-space:pre">     </span>Hello,<div><br></div><div><blockquote type="cite">Yeah, I could write more legible comments ;-)</blockquote>In a first time, just begin with "more comments" !! ;-)</div><div><br><div>util.c, timeval_min, ~110:</div><div>I was happy: there is a comment: <span class="Apple-style-span" style="color: rgb(26, 134, 0); font-family: Menlo; font-size: 11px; "></span></div><div>but it seems that {0, x} represents infinity, and not {0, 0}, or I think:</div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span style="color: #b41ca4"><span class="Apple-tab-span" style="white-space:pre">   </span>if</span>(s->tv_sec == <span style="color: #3d02d9">0</span>)</div></div><div>should be</div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span style="color: #b41ca4"><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000000"> </font></span>if</span>(s->tv_sec == <span style="color: #3d02d9">0</span> && s->tv_usec == <span style="color: #3d02d9">0</span>)</div></div><div>no ?</div><div><br></div><div><br></div><div>babel.c, <i>main loop</i>, around 550:</div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(55, 89, 93); "><span style="color: #b41ca4">if</span><span style="color: #000000">(</span><span style="color: #568187">kernel_socket</span><span style="color: #000000"> < </span><span style="color: #3d02d9">0</span><span style="color: #000000">) </span>kernel_setup_socket<span style="color: #000000">(</span><span style="color: #3d02d9">1</span><span style="color: #000000">);</span></div></div><div>Previously, we consider that a bad kernel_socket was sufficient to stop the program. Hum, I don't think the socket is possibly <0 at this point.</div><div>Same remark for the local_socket and local_server_socket.</div><div><br></div><div>Is FD_ZERO a non-raming* syscall?</div><div><br></div><div>It seems necessary to do a <span class="Apple-style-span" style="color: rgb(55, 89, 93); font-family: Menlo; font-size: 11px; ">gettime</span><span class="Apple-style-span" style="color: rgb(55, 89, 93); font-family: Menlo; font-size: 11px; "><span style="color: #000000">(&</span></span><span class="Apple-style-span" style="color: rgb(55, 89, 93); font-family: Menlo; font-size: 11px; "><span style="color: #568187">now</span></span><span class="Apple-style-span" style="color: rgb(55, 89, 93); font-family: Menlo; font-size: 11px; "><span style="color: #000000">);</span></span> <i>only</i> after select (in the other case we don't have wait anything). So I think it's better to put gettime in the "if" statement. If you think that checking for the next timeout may take a consequent time, so put the first "gettime" just before the "if".</div><div><br></div><div><br></div><div>babel.c, somewhere near 590-610:</div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span style="color: #b41ca4">if</span>(errno != EAGAIN && errno != EINTR) {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">    perror(<span style="color: #c72c25">"recv"</span>);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">    sleep(<span style="color: #3d02d9">1</span>);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">}</div></div><div>Euhm… why blocking the entire rest of the program just because of a EAGAIN ? Don't we would sleep (if necessary) at the "select" ?</div><div><br></div><div><br></div><div>And finaly, what is the "*unicast*" things (like "unicast_neighbour", "flush_unicast") ?</div><div><br></div><div>Thanks!</div><div><br></div><div>Matthieu</div></div><div><br></div><div><br></div><div>* <i>qui ne rame pas</i></div></body></html>