unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [GSoC] DHCP client
@ 2015-03-16 22:07 Rémi Birot-Delrue
  2015-03-17 16:32 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Rémi Birot-Delrue @ 2015-03-16 22:07 UTC (permalink / raw)
  To: Guix devel.

[-- Attachment #1: Type: text/plain, Size: 866 bytes --]

Hello,

I’m a CS student interested in contributing to Guix for the Summer of
Code. I would be happy to work on the idea of writing a DHCP client for
the GSD, as proposed on the GNU ideas page.

Currently finishing my Licence d’Informatique at Clermont-Ferrand
(France), roughly equivalent to a CS Bachelor Degree, I am primarily a
Math student (I completed my Master de Mathematiques at Lille, France, a
few years ago; here it’s the degree just before doctorate).

My tools of choice are usually Common Lisp (with a mostly functional
style) and C, together with GNU Emacs and SLIME. I would like to learn
how “low-level” programs can be writter in Scheme, but I’m also very
keen to participate to a GNU project.

Attached you will find a first draft for a proposal, that can be
entirely rewritten according to your remarks or advices.

[-- Attachment #2: Proposal draft 1 --]
[-- Type: text/x-org, Size: 5879 bytes --]

# -*- mode: org; encoding: utf-8-unix; -*-
#+TITLE: Draft proposal for the GSoC
#+AUTHOR: Rémi Birot-Delrue
#+EMAIL: asgeir@free.fr

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.

[-- Attachment #3: Type: text/plain, Size: 39 bytes --]


Sincerely,
-- 
Rémi Birot-Delrue

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [GSoC] DHCP client
  2015-03-16 22:07 [GSoC] DHCP client Rémi Birot-Delrue
@ 2015-03-17 16:32 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2015-03-17 16:32 UTC (permalink / raw)
  To: Rémi Birot-Delrue; +Cc: Guix devel.

Hi Rémi,

Thanks for your proposal!

If you haven’t yet, please see my comments to Rohan’s proposal on the
same topic:
<http://lists.gnu.org/archive/html/guix-devel/2015-03/msg00319.html>.

Rémi Birot-Delrue <asgeir@free.fr> skribis:

> The client side of the DHCPv4 protocol will be implemented: more

Let’s design with the eventual DHCPv6 support in mind, and keep it as a
“bonus item” for this GSoC.

> The final software should be usable as a [[http://www.gnu.org/software/dmd/][dmd service]] and be part of
> the Guix Software Distribution.

Note that first, it should also be usable as a standalone command.
Second, it should be usable as a library, typically in a dmd service.

>  2. Write a battery of tests to check if it does what I want it
>     to do.

Although I did not mention it to Rohan, I think tests are definitely a
must (BTW, I think “battery of tests” is a Frenchism ;-)).  Now, do you
have an idea of the testing strategy?  One possibly would be to use a
“reference” DHCP server to talk to.

I encourage you to get started with Guile + Geiser (similar to SLIME),
and to look at the relevant APIs in Guile, notably for binary I/O.

Also make sure to visit #guix and #guile and let us know what you’re
up to!

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-17 16:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-16 22:07 [GSoC] DHCP client Rémi Birot-Delrue
2015-03-17 16:32 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).