/usr/share/doc/dhcpcanon/html/integration.html is in dhcpcanon 0.7.3-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>dhcpcanon integration with network managers — DHCP anonymity profile 0.2.0 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<link rel="author" title="About these documents" href="about.html" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="dhcpcanon Python API Reference" href="api.html" />
<link rel="prev" title="Minimising dhcpcanon privileges" href="privileges.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head>
<body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="dhcpcanon-integration-with-network-managers">
<span id="integration"></span><h1><code class="docutils literal"><span class="pre">dhcpcanon</span></code> integration with network managers<a class="headerlink" href="#dhcpcanon-integration-with-network-managers" title="Permalink to this headline">¶</a></h1>
<div class="section" id="integration-with-gnome-network-manager">
<h2>Integration with Gnome <code class="docutils literal"><span class="pre">Network</span> <span class="pre">Manager</span></code><a class="headerlink" href="#integration-with-gnome-network-manager" title="Permalink to this headline">¶</a></h2>
<p><a class="reference external" href="https://wiki.gnome.org/Projects/NetworkManager/">Gnome Network Manager</a>
has several components.</p>
<p>In Debian the service <code class="docutils literal"><span class="pre">NetworkManager</span></code> by default
calls <a class="reference external" href="https://www.isc.org/">dhclient</a>
which in turn calls <code class="docutils literal"><span class="pre">nm-dhcp-helper</span></code>.
Depending on the configuration, dhclient is called with the parameters:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>/sbin/dhclient -d -q
-sf /usr/lib/NetworkManager/nm-dhcp-helper
-pf /var/run/dhclient-<interface>.pid
-lf /var/lib/NetworkManager/dhclient-<?>-<interface>.lease
-cf /var/lib/NetworkManager/dhclient-<interface>.conf
<interface>
</pre></div>
</div>
<p>Dclient calls <code class="docutils literal"><span class="pre">nm-dhcp-helper</span></code> via the <code class="docutils literal"><span class="pre">-sf</span></code> parameter,
which seems to communicate back with <code class="docutils literal"><span class="pre">NetworkManager</span></code> via D-Bus.</p>
<p><code class="docutils literal"><span class="pre">NetworkManager</span></code> can be configured to use <a class="reference external" href="https://roy.marples.name/git/dhcpcd.git">dhcpcd</a>
or <code class="docutils literal"><span class="pre">internal</span></code>, as DHCP clients instead of <code class="docutils literal"><span class="pre">dhclient</span></code>.</p>
<pre class="literal-block">
FIXME: Configuring <code class="docutils literal"><span class="pre">NetworkManager</span></code> to use <code class="docutils literal"><span class="pre">internal</span></code> did not work
(why?). Is it using systemd DHCP client code? (<code class="docutils literal"><span class="pre">libsystemd-network</span> <span class="pre"><https://github.com/NetworkManager/NetworkManager/tree/master/src/systemd/src/libsystemd-network`>`_</span>
<span class="pre">is</span> <span class="pre">included</span> <span class="pre">in</span> <span class="pre">``NetworkManager</span></code> source code, which is in <code class="docutils literal"><span class="pre">systemd</span></code>
<a class="reference external" href="https://github.com/systemd/systemd/tree/master/src/libsystemd-network">code</a>).
It does not work either with <code class="docutils literal"><span class="pre">dhcpcd</span></code>:
NetworkManager[12712]: <warn> [1493146345.7994] dhcp-init: DHCP client 'dhcpcd' not available
</pre>
<div class="section" id="environment-variables-that-dhclient-returns">
<h3>Environment variables that <code class="docutils literal"><span class="pre">dhclient</span></code> returns<a class="headerlink" href="#environment-variables-that-dhclient-returns" title="Permalink to this headline">¶</a></h3>
<p>When <code class="docutils literal"><span class="pre">dhclient</span></code> call the script, by default <code class="docutils literal"><span class="pre">/sbin/dhcpcanon-script</span></code>,
or when called by <code class="docutils literal"><span class="pre">NetworkManager</span></code>, <code class="docutils literal"><span class="pre">nm-dhcp-helper</span></code>, it pass environment
variables.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>FIXME: Are these variables documented somewhere?.
</pre></div>
</div>
<p>In <code class="docutils literal"><span class="pre">man</span>  <span class="pre">dhclient-script</span></code> there is the list of values that the variable <code class="docutils literal"><span class="pre">reason</span></code> can take:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">The</span> <span class="n">following</span> <span class="n">reasons</span>
<span class="n">are</span> <span class="n">currently</span> <span class="n">defined</span><span class="p">:</span> <span class="n">MEDIUM</span><span class="p">,</span> <span class="n">PREINIT</span><span class="p">,</span> <span class="n">BOUND</span><span class="p">,</span> <span class="n">RENEW</span><span class="p">,</span> <span class="n">REBIND</span><span class="p">,</span> <span class="n">REBOOT</span><span class="p">,</span>
<span class="n">EXPIRE</span><span class="p">,</span> <span class="n">FAIL</span><span class="p">,</span> <span class="n">STOP</span><span class="p">,</span> <span class="n">RELEASE</span><span class="p">,</span> <span class="n">NBI</span> <span class="ow">and</span> <span class="n">TIMEOUT</span><span class="o">.</span>
</pre></div>
</div>
<p>But there are more variables.
By setting <code class="docutils literal"><span class="pre">RUN=yes</span></code> in <code class="docutils literal"><span class="pre">/etc/dhcp/debug</span></code>, these variables are found
in <code class="docutils literal"><span class="pre">/tmp/dhclient-script.debug</span></code>:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">reason</span><span class="o">=</span><span class="s1">'PREINIT'</span>
<span class="n">interface</span><span class="o">=</span>
<span class="o">--------------------------</span>
<span class="n">reason</span><span class="o">=</span><span class="s1">'REBOOT'</span>
<span class="n">interface</span><span class="o">=</span>
<span class="n">new_ip_address</span><span class="o">=</span>
<span class="n">new_network_number</span><span class="o">=</span>
<span class="n">new_subnet_mask</span><span class="o">=</span>
<span class="n">new_broadcast_address</span><span class="o">=</span>
<span class="n">new_routers</span><span class="o">=</span>
<span class="n">new_domain_name</span><span class="o">=</span>
<span class="n">new_domain_name_servers</span><span class="o">=</span>
</pre></div>
</div>
<p>Looking at the code <a class="reference external" href="https://source.isc.org/cgi-bin/gitweb.cgi?p=dhcp.git;a=blob;f=client/dhclient.c;h=f7486c6a754f741fecb2a2999d78778ab79a5970;hb=846d0ecce7480257723c86c59f653687217181bc">dhclient v4.3.5</a>
there seem to be more variables.</p>
</div>
<div class="section" id="environment-variables-that-nm-dhcp-helper-gets">
<h3>Environment variables that <code class="docutils literal"><span class="pre">nm-dhcp-helper</span></code> gets<a class="headerlink" href="#environment-variables-that-nm-dhcp-helper-gets" title="Permalink to this headline">¶</a></h3>
<p>TBD</p>
<p>??</p>
</div>
<div class="section" id="dhcpcanon-required-modifications">
<h3><code class="docutils literal"><span class="pre">dhcpcanon</span></code> required modifications<a class="headerlink" href="#dhcpcanon-required-modifications" title="Permalink to this headline">¶</a></h3>
<p>If <code class="docutils literal"><span class="pre">dhcpcanon</span></code> accepts the same arguments as <code class="docutils literal"><span class="pre">dhclient</span></code> and calls
the script <code class="docutils literal"><span class="pre">nm-dhcp-helper</span></code> with the same environment
variables as <code class="docutils literal"><span class="pre">dhclient</span></code>, it should be integrated.</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">FIXME</span><span class="p">:</span> <span class="n">however</span> <span class="k">for</span> <span class="n">some</span> <span class="n">reason</span> <span class="n">this</span> <span class="n">generates</span> <span class="n">D</span><span class="o">-</span><span class="n">Bus</span> <span class="n">errors</span><span class="o">.</span>
</pre></div>
</div>
<p><code class="docutils literal"><span class="pre">dhcpcanon</span></code> could also implement the D-Bus input/output that
<code class="docutils literal"><span class="pre">NetworkManager</span></code> needs.</p>
<p>There’s a <a class="reference external" href="https://developer.gnome.org/NetworkManager/unstable/spec.html">NetworkManager D-Bus API</a>
specification.</p>
<p>There’s also a Python API, <a class="reference external" href="https://pythonhosted.org/python-networkmanager/">python-networkmanager</a>,
so <code class="docutils literal"><span class="pre">dhcpcanon</span></code> could communicate directly with <code class="docutils literal"><span class="pre">NetworkManager</span></code> instead
communicating with <code class="docutils literal"><span class="pre">nm-dhcp-helper</span></code>.</p>
</div>
</div>
<div class="section" id="nm-notes">
<h2>nm notes<a class="headerlink" href="#nm-notes" title="Permalink to this headline">¶</a></h2>
<p>Debugging:</p>
<blockquote>
<div>[logging]
level=DEBUG</div></blockquote>
<p>It is not possible to set <code class="docutils literal"><span class="pre">dhcp-send-hostname</span></code>
(<a class="reference external" href="https://bugzilla.gnome.org/show_bug.cgi?id=768076#c5">Bug 768076 - No way to set dhcp-send-hostname globally</a>)
globally.</p>
<p>To modify <code class="docutils literal"><span class="pre">dhcp-send-hostname</span></code> per interface:</p>
<blockquote>
<div>nmcli connection modify “Wired connection” ipv4.dhcp-send-hostname no
nmcli connection show “Wired connection”</div></blockquote>
<dl class="docutils">
<dt>Or the files:</dt>
<dd>/etc/NetworkManager/system-connections/Wiredconnection</dd>
</dl>
<p>There is currently no way that when a new device is create it defaults to a configuration.</p>
</div>
<div class="section" id="integration-with-wicd">
<h2>Integration with <code class="docutils literal"><span class="pre">wicd</span></code><a class="headerlink" href="#integration-with-wicd" title="Permalink to this headline">¶</a></h2>
<p>TBD</p>
<p><a class="reference external" href="https://wicd.sourceforge.net/">wicd</a></p>
<p><a class="reference external" href="https://bazaar.launchpad.net/~wicd-devel/wicd/experimental/view/head:/README">wicd documentation</a></p>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#"><code class="docutils literal"><span class="pre">dhcpcanon</span></code> integration with network managers</a><ul>
<li><a class="reference internal" href="#integration-with-gnome-network-manager">Integration with Gnome <code class="docutils literal"><span class="pre">Network</span> <span class="pre">Manager</span></code></a><ul>
<li><a class="reference internal" href="#environment-variables-that-dhclient-returns">Environment variables that <code class="docutils literal"><span class="pre">dhclient</span></code> returns</a></li>
<li><a class="reference internal" href="#environment-variables-that-nm-dhcp-helper-gets">Environment variables that <code class="docutils literal"><span class="pre">nm-dhcp-helper</span></code> gets</a></li>
<li><a class="reference internal" href="#dhcpcanon-required-modifications"><code class="docutils literal"><span class="pre">dhcpcanon</span></code> required modifications</a></li>
</ul>
</li>
<li><a class="reference internal" href="#nm-notes">nm notes</a></li>
<li><a class="reference internal" href="#integration-with-wicd">Integration with <code class="docutils literal"><span class="pre">wicd</span></code></a></li>
</ul>
</li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li>Previous: <a href="privileges.html" title="previous chapter">Minimising <code class="docutils literal"><span class="pre">dhcpcanon</span></code> privileges</a></li>
<li>Next: <a href="api.html" title="next chapter">dhcpcanon Python API Reference</a></li>
</ul></li>
</ul>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/integration.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
©2017, juga.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 1.6.5</a>
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.8</a>
|
<a href="_sources/integration.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>
|