Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protocol Factorization (DNS) #26

Open
dsheets opened this issue Jan 9, 2014 · 11 comments
Open

Protocol Factorization (DNS) #26

dsheets opened this issue Jan 9, 2014 · 11 comments

Comments

@dsheets
Copy link

dsheets commented Jan 9, 2014

I noticed that DNS packet processing was added in #6. Is there any plan for separating protocol parsers/marshalers into libraries of their own? We also have mirage/ocaml-dns which contains a number of missing features like packet decompression support.

Do you foresee ocaml-packet's protocols being factored into libraries of their own? Would you consider using some or all of ocaml-dns? If you're not satisfied with ocaml-dns (I'm not either...), what could change to make it more usable to you? Is there some common core of functionality that both projects could use? ocaml-dnsproto?

@reitblatt
Copy link
Collaborator

Cool! Actually, @adferguson is the only one using DNS AFAIK, so he has a better understanding of the use case. I'd love to reuse your DNS (and other app level) library, but since we currently don't have any code using it, it's really hard to answer your question/not high on the current priority list.

@adferguson
Copy link
Contributor

hi David,

given that DNS is such a difficult protocol to implement "correctly" (if there even is such a thing), indeed, it is almost certainly worth re-using ocaml-dns if it has been battle-tested already.

for my use cases (*), I only need the protocol, and not the client library and server implementations which ocaml-dns provides. also, my initial use case was actually mDNS, which is almost exclusively UDP-based and bans many of the exotic features of the DNS protocol; hence, it was much easier to just write the little bit I needed.

anyway, if there were an "ocaml-dnsproto" which simply exposed an interface to serialize & parse to/from Cstruct so it can interact nicely with the existing code here, then that would definitely be the best way forward since I'm unlikely to expand upon the little bit of DNS support here except as needed. in the near term, I expect to ensure I can answer basic A records with this code (to redirect "guest" network clients to a login page, as at an airport or hotel), but that's really all.

thanks,
Andrew

(*) and quite likely also for others using this library, since it is directed at authors of OpenFlow controllers.

@arjunguha
Copy link
Member

Yeah, it would be best to reuse their code. I'd actually like to see ocaml-openflow break its dependency on packet. It is only used to parse the body of a packet_in message, which we simply shouldn't do in ocaml-openflow. Let Frenetic and FlowLog parse the packet_in body using whatever combination of libraries suits them.

@jnfoster
Copy link
Member

We should also talk about unifying the two ocaml-openflows?

-N

On Fri, Jan 10, 2014 at 9:58 AM, Arjun Guha notifications@github.comwrote:

Yeah, it would be best to reuse their code. I'd actually like to see
ocaml-openflow break its dependency on packet. It is only used to parse the
body of a packet_in message, which we simply shouldn't do in
ocaml-openflow. Let Frenetic and FlowLog parse the packet_in body using
whatever combination of libraries suits them.


Reply to this email directly or view it on GitHubhttps://github.com//issues/26#issuecomment-32033593
.

@arjunguha
Copy link
Member

there is only one ocaml-openflow

what

On Fri, Jan 10, 2014 at 10:00 AM, Nate Foster notifications@github.comwrote:

We should also talk about unifying the two ocaml-openflows?

-N

On Fri, Jan 10, 2014 at 9:58 AM, Arjun Guha notifications@github.comwrote:

Yeah, it would be best to reuse their code. I'd actually like to see
ocaml-openflow break its dependency on packet. It is only used to parse
the
body of a packet_in message, which we simply shouldn't do in
ocaml-openflow. Let Frenetic and FlowLog parse the packet_in body using
whatever combination of libraries suits them.


Reply to this email directly or view it on GitHub<
https://github.com/frenetic-lang/ocaml-packet/issues/26#issuecomment-32033593>

.


Reply to this email directly or view it on GitHubhttps://github.com//issues/26#issuecomment-32033771
.

@adferguson
Copy link
Contributor

@adferguson
Copy link
Contributor

note that the original repo has newer commits: https://github.com/crotsos/ocaml-openflow

@arjunguha
Copy link
Member

oh i thought he was referring to the lwt/async distinction

On Fri, Jan 10, 2014 at 10:08 AM, Andrew Ferguson
notifications@github.comwrote:

https://github.com/mirage/ocaml-openflow


Reply to this email directly or view it on GitHubhttps://github.com//issues/26#issuecomment-32034524
.

@jnfoster
Copy link
Member

Look, I like Highlander as much as the next guy but...

https://github.com/crotsos/ocaml-openflow

On Fri, Jan 10, 2014 at 10:06 AM, Arjun Guha notifications@github.comwrote:

there is only one ocaml-openflow

what

On Fri, Jan 10, 2014 at 10:00 AM, Nate Foster notifications@github.comwrote:

We should also talk about unifying the two ocaml-openflows?

-N

On Fri, Jan 10, 2014 at 9:58 AM, Arjun Guha notifications@github.comwrote:

Yeah, it would be best to reuse their code. I'd actually like to see
ocaml-openflow break its dependency on packet. It is only used to
parse
the
body of a packet_in message, which we simply shouldn't do in
ocaml-openflow. Let Frenetic and FlowLog parse the packet_in body
using
whatever combination of libraries suits them.


Reply to this email directly or view it on GitHub<

https://github.com/frenetic-lang/ocaml-packet/issues/26#issuecomment-32033593>

.


Reply to this email directly or view it on GitHub<
https://github.com/frenetic-lang/ocaml-packet/issues/26#issuecomment-32033771>

.


Reply to this email directly or view it on GitHubhttps://github.com//issues/26#issuecomment-32034381
.

@arjunguha
Copy link
Member

that's the one with music by Queen, right?

On Fri, Jan 10, 2014 at 10:13 AM, Nate Foster notifications@github.comwrote:

Look, I like Highlander as much as the next guy but...

https://github.com/crotsos/ocaml-openflow

On Fri, Jan 10, 2014 at 10:06 AM, Arjun Guha notifications@github.comwrote:

there is only one ocaml-openflow

what

On Fri, Jan 10, 2014 at 10:00 AM, Nate Foster notifications@github.comwrote:

We should also talk about unifying the two ocaml-openflows?

-N

On Fri, Jan 10, 2014 at 9:58 AM, Arjun Guha notifications@github.comwrote:

Yeah, it would be best to reuse their code. I'd actually like to see
ocaml-openflow break its dependency on packet. It is only used to
parse
the
body of a packet_in message, which we simply shouldn't do in
ocaml-openflow. Let Frenetic and FlowLog parse the packet_in body
using
whatever combination of libraries suits them.


Reply to this email directly or view it on GitHub<

https://github.com/frenetic-lang/ocaml-packet/issues/26#issuecomment-32033593>

.


Reply to this email directly or view it on GitHub<

https://github.com/frenetic-lang/ocaml-packet/issues/26#issuecomment-32033771>

.


Reply to this email directly or view it on GitHub<
https://github.com/frenetic-lang/ocaml-packet/issues/26#issuecomment-32034381>

.


Reply to this email directly or view it on GitHubhttps://github.com//issues/26#issuecomment-32034944
.

@jnfoster
Copy link
Member

http://www.youtube.com/watch?v=VEJ8lpCQbyw

On Fri, Jan 10, 2014 at 10:14 AM, Arjun Guha notifications@github.comwrote:

that's the one with music by Queen, right?

On Fri, Jan 10, 2014 at 10:13 AM, Nate Foster notifications@github.comwrote:

Look, I like Highlander as much as the next guy but...

https://github.com/crotsos/ocaml-openflow

On Fri, Jan 10, 2014 at 10:06 AM, Arjun Guha notifications@github.comwrote:

there is only one ocaml-openflow

what

On Fri, Jan 10, 2014 at 10:00 AM, Nate Foster <
notifications@github.com>wrote:

We should also talk about unifying the two ocaml-openflows?

-N

On Fri, Jan 10, 2014 at 9:58 AM, Arjun Guha <
notifications@github.com>wrote:

Yeah, it would be best to reuse their code. I'd actually like to
see
ocaml-openflow break its dependency on packet. It is only used to
parse
the
body of a packet_in message, which we simply shouldn't do in
ocaml-openflow. Let Frenetic and FlowLog parse the packet_in body
using
whatever combination of libraries suits them.


Reply to this email directly or view it on GitHub<

https://github.com/frenetic-lang/ocaml-packet/issues/26#issuecomment-32033593>

.


Reply to this email directly or view it on GitHub<

https://github.com/frenetic-lang/ocaml-packet/issues/26#issuecomment-32033771>

.


Reply to this email directly or view it on GitHub<

https://github.com/frenetic-lang/ocaml-packet/issues/26#issuecomment-32034381>

.


Reply to this email directly or view it on GitHub<
https://github.com/frenetic-lang/ocaml-packet/issues/26#issuecomment-32034944>

.


Reply to this email directly or view it on GitHubhttps://github.com//issues/26#issuecomment-32035030
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants