# -*- mode: org; encoding: utf-8-unix; -*- #+TITLE: Draft proposal for the GSoC #+AUTHOR: Rémi Birot-Delrue #+EMAIL: address@hidden See the [[http://www.gnu.org/software/soc-projects/guidelines.html][template]]. * Name of the project (source: http://www.gnu.org/software/soc-projects/ideas-2015.html#guix) Implementing a DHCP client in Guile Scheme * Summary (source: http://www.gnu.org/software/soc-projects/ideas-2015.html#guix) The goal of this project is to write a DHCP client library in Guile Scheme. The library will then be usable as a dmd service, thereby providing better integration. * Benefits The DHCP protocol is widely used to dynamically assign IP addresses. A DHCP client is, therefore, a mandatory component for operating systems. There is no official GNU DHCP client: Debian GNU/Hurd currently uses the [[https://www.isc.org/downloads/dhcp/][ISC DHCP client]], GNU/Linux distributions and BSDs use either ISC’s client or [[http://roy.marples.name/projects/dhcpcd/index][dhcpcd]]. → to rewrite & expand * Deliverables “What software will be added or changed? What parts of the project’s code will be affected? Which documentation will you update?” The client side of the DHCPv4 protocol will be implemented: more specifically, a set of base features will be listed, and then impletement. It will comply with the two following RFCs: - [[https://tools.ietf.org/html/rfc2131][Dynamic Host Configuration Protocol (RFC 2131)]]; - [[https://tools.ietf.org/html/rfc6842][Client Identifier Option in DHCP Server Replies (RFC 6842)]]. If possible, it may comply with the three following RFCs: - [[https://tools.ietf.org/html/rfc3396][Encoding Long Options in the Dynamic Host Configuration Protocol (DHCPv4) (RFC 3396)]]; - [[https://tools.ietf.org/html/rfc4361][Node-specific Client Identifiers for Dynamic Host Configuration Protocol Version Four (DHCPv4) (RFC 4361)]]; - parts of the [[https://tools.ietf.org/html/rfc5494][IANA Allocation Guidelines for the Address Resolution Protocol (ARP) (RFC 5494)]] relative to DHCP. Each part of the software must refer to the related RFC, and if needed (and permitted) quote it. A human-readable documentation of the program will be written, as well as a RFC-compliance TODO list. The final software should be usable as a [[http://www.gnu.org/software/dmd/][dmd service]] and be part of the Guix Software Distribution. * Plan “Please indicate how you and your mentor will track your progress as you work on the project, and how the mid-term evaluation of your project will be made.” *Three successive goals*: 1. A very clean minimal working DHCP client that can easily be expanded to a full-featured one. 2. A minimal usable DHCP client, and the related service for dmd. 3. A full-featured DHCP client. 1. Documentary work 1. Read, understand and take (lots of) notes of RFCs. 2. Think about these specification: identify the tricky parts, imagine how some parts could be implemented, etc… 3. Write a TODO list for RFC-compliance 2. A minimal working client 1. Design 1. Define low level interfaces: for instance, provide functions to send individual DHCP messages, handle the associated response… 2. Define the high level interface: how the command will be called. Care for good integration with dmd. 3. Simplify/reduce the size of the two interfaces as much as possible. 2. Implementation 1. The low-level interface. 2. The high-level interface. 3. Work on the documentation: see if it needs a re-organization, expand, shrink or rewrite parts… 3. A minimal usable client 1. List, classify and prioritize each extension needed by the minimal usable client. 2. Implement each of these extensions. 5. A full-featured client Well, same process. ** Incremental implementation cycle That's how I must force myself to write my code for this project. For each function to be written: 1. Implement it. 2. Write a battery of tests to check if it does what I want it to do. 3. Write another battery of tests to check how it complies with the specifications. 4. Update the documentation accordingly. * Communication Please indicate the ways in which you will contact your mentor (and a schedule for doing it) to ensure that they’re always aware of your progress. * Qualification Why did this project appeal to you? How will you benefit from it? Why are you particularly suited to work on this? What will you do once the project is "finished"? Have you worked on any Free Software before? Of the skills that you will need to complete the project, which do you already have? What will you need to learn? *Appeal*: Low-level & network programming in Scheme, contribution to the GNU Project. *Benefits*: Improving my knowledge of networks and their programming, introducing myself to systems programming with a functional language, be an actor of the free software world. *Why me*: Lisper and functional programmer. *Worked on Free Software before?*: nope, except a [[https://github.com/hanshuebner/yason/pull/22][very bad patch]] to a Common Lisp library, and a [[http://www.delafond.org/traducmanfr/man/man6/slashem.6.html][man page translation]] back in 2006. *What when the project is finished?*: I hope I’ll (help to) maintain it, and maybe involve myself further in Quix or dmd. *Skills needed*: basics of how ARP, BOOTP & DHCP work, basics of network programming, good knowledge of Lisp and functional programming. *What I’ll need to learn*: how ARP, BOOTP & DHCP work exactly, low-level network programming, Guile’s Scheme.