summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcp/README
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2014-02-25 14:22:22 +0100
committerJouke Witteveen <j.witteveen@gmail.com>2014-02-27 13:48:49 +0100
commit7f497011aee03f141a5bd055222ca337383f43a3 (patch)
tree3e790e15f1e007de95b95e18a71ec020dbc615eb /src/lib/dhcp/README
parent03afcdce237b2dc52a6c1fea72b715cf6c34bf05 (diff)
downloadnetctl-7f497011aee03f141a5bd055222ca337383f43a3.tar.gz
netctl-7f497011aee03f141a5bd055222ca337383f43a3.tar.xz
Factor out DHCP client support
Support for additional DHCP clients is now easy to add.
Diffstat (limited to 'src/lib/dhcp/README')
-rw-r--r--src/lib/dhcp/README34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/lib/dhcp/README b/src/lib/dhcp/README
new file mode 100644
index 0000000..f55a06e
--- /dev/null
+++ b/src/lib/dhcp/README
@@ -0,0 +1,34 @@
+Support for dhcp clients is implemented by files in
+
+ /usr/lib/network/dhcp/
+
+The file name determines the name of the client for the profile, so
+support for a client named dhcpcd is provided by the file:
+
+ /usr/lib/network/connections/dhcpcd
+
+Files that implement support for a connection type should NOT be
+executable. Such files should contain valid Bash code, among which two
+functions, namely <client_name>_start and <client_name>_stop. For
+the client named dhcpcd these would be:
+
+ dhcpcd_start
+ dhcpcd_stop
+
+These functions are responsible for starting and stopping the dhcp
+client. When the functions are called, three bash files are already
+sourced, so all functions and variables in those files are available.
+The readily sourced files are:
+
+ /usr/lib/network/network
+ /usr/lib/network/globals
+ /etc/netctl/<profile>
+
+Here, <profile> is the profile file specifying the desired network
+configuration.
+
+When called, the start and stop functions get as their first argument
+the version of the IP protocol that the dhcp client is expected to use.
+In the case of starting the client for IPv6, an additional second
+argument 'noaddr' may be supplied, which indicates that the dhcp client
+should configure everything but an IP address.