[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GSoC 2017: Porting LwIP to the Hurd

From: Joan Lledó
Subject: GSoC 2017: Porting LwIP to the Hurd
Date: Fri, 17 Mar 2017 08:31:37 +0100


My name is Joan Lledó, I'm in the last year of my degree in CS at the
Open University of Catalonia[1]. I'm interested in OS programming and,
for now, I have only read theory and have made university exercises in
ths field. That's why I see GSoC as a good chance to work in a real
project and make contributions to it.

I read your project ideas page and decided to take up the project
"Hurdish TCP/IP stack"[2]. I chose LwIP because I found its
documentation and Wiki easy to follow. Besides, it's an active
project, so if I manage to make it work on the Hurd we could update
the supported version in the future and have new features working on
the Hurd as LwIP developers implement them.

I started making some tests to learn more about the Hurd and LwIP and,
so far, I got a translator that uses LwIP to implement the socket
interface operations and some io operations like read and write. It is
working with TCP over IPv4, with several problem, though:

- The translator crashes after opening and closing a few sockets.
- Some socket operations return errno codes that I'm not sure they are
the correct ones.
- UDP is supported, but some calls like Glibc's gethostbyname()
doesn't work b/c the io_select operations are not implemented.

Besides, there's a lot of pending work just to achieve the same
functionality that pfinet offers now:

- Finish implementing io operations and maybe other interfaces' operations.
- Add support for IPv6.
- Add support for more than one network interface.
- Get IPs and ethernet devices from the command line, they are hardcoded now.
- Add Fsysopts support.

Much of the code of my prototype is code from pfinet adapted to work
with LwIP. If you want to try it:

- Download it from [3].
- Copy the lwip folder to the Hurd's source tree.
- Change the IP and the interface from add_netif() in main.c.
- Build it, set it as an active translator and remap /servers/socket/2.

I think it's a feasible GSoC project to implement the same
functionality that pfinet ofers now, but I'd like to know your

Regarding your questions:
- What things will you have to learn to be able to complete the
project? What do you already know?
In my tests I realized that I need to know more about the internals of
Glibc, e.g. what operations from what interface and in what order are
called for each Berkeley sockets function. And what does Glibc expect
to be the behaviour of my implementation. OTOH, I must learn more
about libports, I've got the feeling I still don't understand it

The prototype shows what I already know. I managed to write the io and
socket operations, use the intran functions, the prototype is
protected payload aware and the ethernet driver uses the GNU Mach
device interface.

- Why did you choose this project idea? What do you consider most
appealing about it?
I find networking interesting and think this project will be a great
way to learn more about the TCP/IP stack and the Berkeley sockets

- Please describe your previous programming experience in detail. What
languages do you use? How long have you been programming, and how
much? What kind of programs have you written? What kind of programming
(and related) work are you enjoying most?
I've been working as a Java EE programer for 8 years, with the typical
tools: Spring, Struts, MyBatis, HTML, CSS... those things. But what I
really like best is C and free software. Right now, OS programming is
what motivates me but unfortunately don't have more experience in this
field than a few dummy Linux modules I had to write for University
exercises, and the MIT 6.828 course[4] I made last summer in my free

- Have you been involved in any free software ("Open Source") projects
yet? Which projects, how long, and in what way have you been involved?
Have you been active in the Hurd project/Hurd community before?
Years ago I made some contributions to Gparted[5] and wrote a tool to
clone GNU/Linux systems[6]. But these last years I haven't been able
to make contributions in the little free time I had because of my work
and the degree. I have never been active in the Hurd community before.

- Please briefly describe the Hurd, including the goals, architecture
etc. Also, what makes you interested in the Hurd? Why do you want to
work on it? What is your vision of it's future development?
The Hurd is the kernel of the GNU system. It has a microkernel
architecture where GNU Mach is the microkernel and there are many
user-space servers that implement most of the funcionallity that
usually a kernel offers. Instead of syscalls, user programs send IPC
messages to servers to get the services that a monolithic kernel would
offer. One of this services is a TCP/IP stack :). The goal of the GNU
system is to provide a free replacement for Unix.

I find this project interesting for many reasons. First, b/c I want to
make my contributions to a Free Software project rather than an Open
Source project or any other formula. It may seem only a nuance but is
importat to work in something you believe in. Second, b/c a project
with this architecture is a good way to learn not only about the
project itself but about OS design in general.

- Do you have a permanent internet connection, especially during the
time of the summer session? Are you able and willing to hang out on
the Hurd IRC channel regularly? (As in: Running the IRC client more or
less permanently and checking for activity now and then.) If it turns
out that your mentor lives in a different time zone, could you shift
your day/night rhythm to better match that of your mentor and other
Hurd developers?
Yes to all.

- When does your university term end, when are your exams, and when
does the next term begin?
The current term ends at 06/17, and the next begins at 09/20. My exams
are in June, 10th and 17th.

- How much time do you intend to spend on your GSoC project per
day/week during the summer months?
I quited my job, so, full-time, 30-40h per week.

- What other major activities will you engage in during the summer?
(Moving apartments, longer vacations, other obligations, etc.) If any,
how do you intend to make sure you will be able to dedicate sufficient
time to your project nevertheless?

- How do you intend to make sure that your code will keep on being
maintained and supported properly after the end of the GSoC program?
I'd like to do it myself. Anyway, I'll do my best to polish the code
and comment everything for someone else to work with it if needed.

That's all, if you want to contact me you can write me to this mail
address or find me at #hurd (jlledom)



[1] http://www.uoc.edu/portal/en/index.html
[3] https://github.com/jlledom/lwip-hurd
[4] https://pdos.csail.mit.edu/6.828/2014/schedule.html
[5] https://git.gnome.org/browse/gparted/log/?qt=author&q=Joan+Lled%C3%B3
[6] http://doclone.nongnu.org/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]