imsg Protocol

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

imsg Protocol

William Ahern-2
I was reading http://www.openbsd.org/papers/opencon06-network/index.html and
noticed a reference to the imsg IPC mechanism employed in bgpd (and ntpd).
I've perused the code, but it's duplicated in each project. I'm wondering if
there's an actual protocol reference, preferably English but in code would
be fine, other than what's in the ntpd and bgpd tree?

I've been mulling over a simple message passing protocol myself, thus my
interest.

Reply | Threaded
Open this post in threaded view
|

Re: imsg Protocol

Claudio Jeker
On Wed, Dec 06, 2006 at 04:04:10PM -0800, William Ahern wrote:
> I was reading http://www.openbsd.org/papers/opencon06-network/index.html and
> noticed a reference to the imsg IPC mechanism employed in bgpd (and ntpd).
> I've perused the code, but it's duplicated in each project. I'm wondering if
> there's an actual protocol reference, preferably English but in code would
> be fine, other than what's in the ntpd and bgpd tree?
>
> I've been mulling over a simple message passing protocol myself, thus my
> interest.
>

We never made one covers-all-needs implementation of the imsg framework
because this is the wrong apporach. Every privsep daemon (bgpd, ospfd,
ntpd, etc.) has different needs and by reducing the framework to a minimum
no code bloat is created (less code, less errors).
bgpd needs other features than ospfd (the two I know best) and so the
functions look similar but in the end are specialised for each daemon.

Btw. the imsg framework is not so simple, it took us some time to find
some errors (hopefully we found all of them by now).

--
:wq Claudio

Reply | Threaded
Open this post in threaded view
|

Re: imsg Protocol

Henning Brauer-5
In reply to this post by William Ahern-2
* William Ahern <[hidden email]> [2006-12-07 01:13]:
> I was reading http://www.openbsd.org/papers/opencon06-network/index.html and
> noticed a reference to the imsg IPC mechanism employed in bgpd (and ntpd).
> I've perused the code, but it's duplicated in each project. I'm wondering if
> there's an actual protocol reference, preferably English but in code would
> be fine, other than what's in the ntpd and bgpd tree?

not really.

> I've been mulling over a simple message passing protocol myself, thus my
> interest.

I'd suggest looking at ntpd, it's the simplest of these daemons.
it's basically all the stuff in imsg.c, buffer.c and a bit in the
header files


--
Henning Brauer, [hidden email], [hidden email]
BS Web Services, http://bsws.de
Full-Service ISP - Secure Hosting, Mail and DNS Services
Dedicated Servers, Rootservers, Application Hosting - Hamburg & Amsterdam