* [GSoC] Introduction + question about dmd @ 2015-03-04 14:08 Rohan Prinja 2015-03-05 10:51 ` Ludovic Courtès 0 siblings, 1 reply; 6+ messages in thread From: Rohan Prinja @ 2015-03-04 14:08 UTC (permalink / raw) To: guix-devel [-- Attachment #1: Type: text/plain, Size: 1017 bytes --] Hi Guix! This mail is to say hi to everyone and introduce myself. I'm Rohan, a final-year CS undergraduate at IIT Bombay. The project I'm interested in working on for GNU GSoC this year is to implement a DHCP client library in Guile. The end result, as I discussed with Ludovic, would be a package installable via Guix. This would make available a command roughly equivalent to ISC's dhclient. The library should also implement a service that dmd can run. Things I've done so far - read the dmd manual, started learning Guile (I've programmed in Racket before, but not Guile), reading up on the DHCP protocol, and started looking at ISC's implementation of dhclient (I used the one obtained by apt-get source isc-dhcp-client). @Ludovic: continuing our discussion - could you please explain what you mean by the dmd event loop? I searched in the manual as well the dmd-0.2 source but couldn't find any reference to it. Is this something planned to be added to dmd? How will it look like? Thank you, Rohan Prinja [-- Attachment #2: Type: text/html, Size: 1268 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [GSoC] Introduction + question about dmd 2015-03-04 14:08 [GSoC] Introduction + question about dmd Rohan Prinja @ 2015-03-05 10:51 ` Ludovic Courtès 2015-03-05 13:44 ` Jonas Rebmann 2015-03-07 2:01 ` Rohan Prinja 0 siblings, 2 replies; 6+ messages in thread From: Ludovic Courtès @ 2015-03-05 10:51 UTC (permalink / raw) To: Rohan Prinja; +Cc: guix-devel Hello! Rohan Prinja <rohan.prinja@gmail.com> skribis: > The project I'm interested in working on for GNU GSoC this year is to > implement a DHCP client library in Guile. The end result, as I discussed > with Ludovic, would be a package installable via Guix. This would make > available a command roughly equivalent to ISC's dhclient. The library > should also implement a service that dmd can run. Specifically, the library’s functionality should be available in a way that makes it easy to integrate in some event loop. > Things I've done so far - read the dmd manual, started learning Guile (I've > programmed in Racket before, but not Guile), reading up on the DHCP > protocol, and started looking at ISC's implementation of dhclient (I used > the one obtained by apt-get source isc-dhcp-client). (Alternately, you can get it with ‘guix build -S isc-dhclient’. ;-)) This is a good start. You might want to look at <https://www.ietf.org/rfc/rfc2131.txt> more than at the actual implementation. > @Ludovic: continuing our discussion - could you please explain what you > mean by the dmd event loop? I searched in the manual as well the dmd-0.2 > source but couldn't find any reference to it. Is this something planned to > be added to dmd? How will it look like? It’s something planned. Basically dmd has to react to various events; currently, the only events that happen in practice are SIGCHLD, connections made by the client programs (‘deco’, ‘reboot’, etc.), and commands sent on open connections by these clients. Currently, in lieu of an full-blown even loop, there’s just this naive loop in the (dmd) module: (let next-command () (match (accept sock) ((command-source . client-address) (process-connection command-source)) (_ #f)) (next-command)) That doesn’t scale well and isn’t safe though, because a client could wait forever and thus lead dmd to wait forever as well (although that’s slightly beyond the adversary model we would think of.) More importantly, we would like dmd to be able to handle other kinds of events. For instance, I would like it to run a “REPL server” (info "(guile) REPL Servers"); that means it will also have to check for events occurring on the REPL server socket. Other types of events could include network reconfigurations (which could be detected via a PF_NETLINK/NETLINK_ROUTE socket), device additions/removal, events related to the DHCP client process, etc. To be able to handle these events, dmd needs a usual event loop. It doesn’t have it yet, but that’s something I’m planning to add (I say “I” but anyone reading this message is welcome to help ;-)). Does it clarify things a bit? Thanks, Ludo’. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [GSoC] Introduction + question about dmd 2015-03-05 10:51 ` Ludovic Courtès @ 2015-03-05 13:44 ` Jonas Rebmann 2015-03-05 19:01 ` Rohan Prinja 2015-03-07 2:01 ` Rohan Prinja 1 sibling, 1 reply; 6+ messages in thread From: Jonas Rebmann @ 2015-03-05 13:44 UTC (permalink / raw) Cc: guix-devel [-- Attachment #1: Type: text/plain, Size: 3561 bytes --] Hi, I contacted Ludo about the DHCP client just before I noticed this conversation. I'm interested in making it my gsoc project as well. I'm an undergraduate in computer science in Germany, I'm a bit into free software and I'm especially interested in making my gsoc for the gnu project. Would it be possible to team up on this project? Other project ideas for guix/dmd are very welcome. I'll be waiting for Ludovics reply and see what other project ideas might be interesting for me. Kind regards, Jonas 2015-03-05 11:51 GMT+01:00 Ludovic Courtès <ludo@gnu.org>: > Hello! > > Rohan Prinja <rohan.prinja@gmail.com> skribis: > > > The project I'm interested in working on for GNU GSoC this year is to > > implement a DHCP client library in Guile. The end result, as I discussed > > with Ludovic, would be a package installable via Guix. This would make > > available a command roughly equivalent to ISC's dhclient. The library > > should also implement a service that dmd can run. > > Specifically, the library’s functionality should be available in a way > that makes it easy to integrate in some event loop. > > > Things I've done so far - read the dmd manual, started learning Guile > (I've > > programmed in Racket before, but not Guile), reading up on the DHCP > > protocol, and started looking at ISC's implementation of dhclient (I used > > the one obtained by apt-get source isc-dhcp-client). > > (Alternately, you can get it with ‘guix build -S isc-dhclient’. ;-)) > > This is a good start. You might want to look at > <https://www.ietf.org/rfc/rfc2131.txt> more than at the actual > implementation. > > > @Ludovic: continuing our discussion - could you please explain what you > > mean by the dmd event loop? I searched in the manual as well the dmd-0.2 > > source but couldn't find any reference to it. Is this something planned > to > > be added to dmd? How will it look like? > > It’s something planned. Basically dmd has to react to various events; > currently, the only events that happen in practice are SIGCHLD, > connections made by the client programs (‘deco’, ‘reboot’, etc.), and > commands sent on open connections by these clients. > > Currently, in lieu of an full-blown even loop, there’s just this naive > loop in the (dmd) module: > > (let next-command () > (match (accept sock) > ((command-source . client-address) > (process-connection command-source)) > (_ #f)) > (next-command)) > > That doesn’t scale well and isn’t safe though, because a client could > wait forever and thus lead dmd to wait forever as well (although that’s > slightly beyond the adversary model we would think of.) > > More importantly, we would like dmd to be able to handle other kinds of > events. For instance, I would like it to run a “REPL server” (info > "(guile) REPL Servers"); that means it will also have to check for > events occurring on the REPL server socket. > > Other types of events could include network reconfigurations (which > could be detected via a PF_NETLINK/NETLINK_ROUTE socket), device > additions/removal, events related to the DHCP client process, etc. > > To be able to handle these events, dmd needs a usual event loop. It > doesn’t have it yet, but that’s something I’m planning to add (I say “I” > but anyone reading this message is welcome to help ;-)). > > Does it clarify things a bit? > > Thanks, > Ludo’. > > [-- Attachment #2: Type: text/html, Size: 4716 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [GSoC] Introduction + question about dmd 2015-03-05 13:44 ` Jonas Rebmann @ 2015-03-05 19:01 ` Rohan Prinja 0 siblings, 0 replies; 6+ messages in thread From: Rohan Prinja @ 2015-03-05 19:01 UTC (permalink / raw) To: Jonas Rebmann; +Cc: guix-devel [-- Attachment #1: Type: text/plain, Size: 3991 bytes --] Hi Jonas, I have no problems with teaming up. Like you, this project is my foremost focus for GSoC but I'm also looking at other/related projects. Let's wait for Ludo to confirm/deny that we are allowed to team up. Regards, Rohan On 5 March 2015 at 19:14, Jonas Rebmann <jonas.rebmann@googlemail.com> wrote: > Hi, > > I contacted Ludo about the DHCP client just before I noticed this > conversation. I'm interested in making it my gsoc project as well. > I'm an undergraduate in computer science in Germany, I'm a bit into free > software and I'm especially interested in making my gsoc for the gnu > project. > Would it be possible to team up on this project? > Other project ideas for guix/dmd are very welcome. > I'll be waiting for Ludovics reply and see what other project ideas might > be interesting for me. > > Kind regards, > Jonas > > 2015-03-05 11:51 GMT+01:00 Ludovic Courtès <ludo@gnu.org>: > >> Hello! >> >> Rohan Prinja <rohan.prinja@gmail.com> skribis: >> >> > The project I'm interested in working on for GNU GSoC this year is to >> > implement a DHCP client library in Guile. The end result, as I discussed >> > with Ludovic, would be a package installable via Guix. This would make >> > available a command roughly equivalent to ISC's dhclient. The library >> > should also implement a service that dmd can run. >> >> Specifically, the library’s functionality should be available in a way >> that makes it easy to integrate in some event loop. >> >> > Things I've done so far - read the dmd manual, started learning Guile >> (I've >> > programmed in Racket before, but not Guile), reading up on the DHCP >> > protocol, and started looking at ISC's implementation of dhclient (I >> used >> > the one obtained by apt-get source isc-dhcp-client). >> >> (Alternately, you can get it with ‘guix build -S isc-dhclient’. ;-)) >> >> This is a good start. You might want to look at >> <https://www.ietf.org/rfc/rfc2131.txt> more than at the actual >> implementation. >> >> > @Ludovic: continuing our discussion - could you please explain what you >> > mean by the dmd event loop? I searched in the manual as well the dmd-0.2 >> > source but couldn't find any reference to it. Is this something planned >> to >> > be added to dmd? How will it look like? >> >> It’s something planned. Basically dmd has to react to various events; >> currently, the only events that happen in practice are SIGCHLD, >> connections made by the client programs (‘deco’, ‘reboot’, etc.), and >> commands sent on open connections by these clients. >> >> Currently, in lieu of an full-blown even loop, there’s just this naive >> loop in the (dmd) module: >> >> (let next-command () >> (match (accept sock) >> ((command-source . client-address) >> (process-connection command-source)) >> (_ #f)) >> (next-command)) >> >> That doesn’t scale well and isn’t safe though, because a client could >> wait forever and thus lead dmd to wait forever as well (although that’s >> slightly beyond the adversary model we would think of.) >> >> More importantly, we would like dmd to be able to handle other kinds of >> events. For instance, I would like it to run a “REPL server” (info >> "(guile) REPL Servers"); that means it will also have to check for >> events occurring on the REPL server socket. >> >> Other types of events could include network reconfigurations (which >> could be detected via a PF_NETLINK/NETLINK_ROUTE socket), device >> additions/removal, events related to the DHCP client process, etc. >> >> To be able to handle these events, dmd needs a usual event loop. It >> doesn’t have it yet, but that’s something I’m planning to add (I say “I” >> but anyone reading this message is welcome to help ;-)). >> >> Does it clarify things a bit? >> >> Thanks, >> Ludo’. >> >> > [-- Attachment #2: Type: text/html, Size: 5363 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [GSoC] Introduction + question about dmd 2015-03-05 10:51 ` Ludovic Courtès 2015-03-05 13:44 ` Jonas Rebmann @ 2015-03-07 2:01 ` Rohan Prinja 2015-03-10 12:47 ` Ludovic Courtès 1 sibling, 1 reply; 6+ messages in thread From: Rohan Prinja @ 2015-03-07 2:01 UTC (permalink / raw) To: Ludovic Courtès, guix-devel [-- Attachment #1: Type: text/plain, Size: 4062 bytes --] Thank you, this clarified some doubts I had. As suggested, I read through RFC 2131 and took notes. I also looked at lwIP's RFC 2131-compliant implementation of DHCP and I think I have a fair understanding of the DHCP protocol now. BTW, you didn't mention RFC 3315 - does this mean that the proposed DHCP client should support only DHCPv4 for now, with DHCPv6 being added in later? Also, are you considering the implementation of the dmd event loop to be part of this project idea or outside of it? As you said, once the DHCP library is written, we could test its interop with dmd by calling its functions within the appropriate event handlers in the event loop. So the question is, do we incorporate the event loop into this project idea or let it run as a parallel project and then add the tests for the DHCP library once the event loop is done? I'll start working on the first draft of my proposal now, and will make sure to incorporate your feedback as I update it. Thanks and regards, Rohan On 5 March 2015 at 16:21, Ludovic Courtès <ludo@gnu.org> wrote: > Hello! > > Rohan Prinja <rohan.prinja@gmail.com> skribis: > > > The project I'm interested in working on for GNU GSoC this year is to > > implement a DHCP client library in Guile. The end result, as I discussed > > with Ludovic, would be a package installable via Guix. This would make > > available a command roughly equivalent to ISC's dhclient. The library > > should also implement a service that dmd can run. > > Specifically, the library’s functionality should be available in a way > that makes it easy to integrate in some event loop. > > > Things I've done so far - read the dmd manual, started learning Guile > (I've > > programmed in Racket before, but not Guile), reading up on the DHCP > > protocol, and started looking at ISC's implementation of dhclient (I used > > the one obtained by apt-get source isc-dhcp-client). > > (Alternately, you can get it with ‘guix build -S isc-dhclient’. ;-)) > > This is a good start. You might want to look at > <https://www.ietf.org/rfc/rfc2131.txt> more than at the actual > implementation. > > > @Ludovic: continuing our discussion - could you please explain what you > > mean by the dmd event loop? I searched in the manual as well the dmd-0.2 > > source but couldn't find any reference to it. Is this something planned > to > > be added to dmd? How will it look like? > > It’s something planned. Basically dmd has to react to various events; > currently, the only events that happen in practice are SIGCHLD, > connections made by the client programs (‘deco’, ‘reboot’, etc.), and > commands sent on open connections by these clients. > > Currently, in lieu of an full-blown even loop, there’s just this naive > loop in the (dmd) module: > > (let next-command () > (match (accept sock) > ((command-source . client-address) > (process-connection command-source)) > (_ #f)) > (next-command)) > > That doesn’t scale well and isn’t safe though, because a client could > wait forever and thus lead dmd to wait forever as well (although that’s > slightly beyond the adversary model we would think of.) > > More importantly, we would like dmd to be able to handle other kinds of > events. For instance, I would like it to run a “REPL server” (info > "(guile) REPL Servers"); that means it will also have to check for > events occurring on the REPL server socket. > > Other types of events could include network reconfigurations (which > could be detected via a PF_NETLINK/NETLINK_ROUTE socket), device > additions/removal, events related to the DHCP client process, etc. > > To be able to handle these events, dmd needs a usual event loop. It > doesn’t have it yet, but that’s something I’m planning to add (I say “I” > but anyone reading this message is welcome to help ;-)). > > Does it clarify things a bit? > > Thanks, > Ludo’. > [-- Attachment #2: Type: text/html, Size: 4851 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [GSoC] Introduction + question about dmd 2015-03-07 2:01 ` Rohan Prinja @ 2015-03-10 12:47 ` Ludovic Courtès 0 siblings, 0 replies; 6+ messages in thread From: Ludovic Courtès @ 2015-03-10 12:47 UTC (permalink / raw) To: Rohan Prinja; +Cc: guix-devel Rohan Prinja <rohan.prinja@gmail.com> skribis: > As suggested, I read through RFC 2131 and took notes. I also looked at > lwIP's RFC 2131-compliant implementation of DHCP and I think I have a fair > understanding of the DHCP protocol now. BTW, you didn't mention RFC 3315 - > does this mean that the proposed DHCP client should support only DHCPv4 for > now, with DHCPv6 being added in later? I would consider DHCPv6 a bonus for this project, and DHCPv4 a requirement. But I’m open to discussions; what’s your take on this? > Also, are you considering the implementation of the dmd event loop to be > part of this project idea or outside of it? As you said, once the DHCP > library is written, we could test its interop with dmd by calling its > functions within the appropriate event handlers in the event loop. So the > question is, do we incorporate the event loop into this project idea or let > it run as a parallel project and then add the tests for the DHCP library > once the event loop is done? I consider the dmd event loop to be outside of this project. However, there’s a close relation with both things, so you’ll have to pay a lot of attention to it. Depending on how far you go, you may want to adjust dmd to fit your needs. > I'll start working on the first draft of my proposal now, and will make > sure to incorporate your feedback as I update it. Thanks, Ludo’. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-03-10 12:47 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-03-04 14:08 [GSoC] Introduction + question about dmd Rohan Prinja 2015-03-05 10:51 ` Ludovic Courtès 2015-03-05 13:44 ` Jonas Rebmann 2015-03-05 19:01 ` Rohan Prinja 2015-03-07 2:01 ` Rohan Prinja 2015-03-10 12:47 ` 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).