[asterisk-dev] [asterisk-commits] rizzo: trunk r89379 - /trunk/include/asterisk/network.h

Luigi Rizzo rizzo at icir.org
Sat Nov 17 08:34:38 CST 2007


On Sat, Nov 17, 2007 at 09:14:15AM -0500, Simon Perreault wrote:
> On Saturday 17 November 2007 09:00:24 SVN commits to the Asterisk project 
> wrote:
> > Author: rizzo
> > Date: Sat Nov 17 08:00:24 2007
> > New Revision: 89379
> >
> > +/*! \brief Compares the source address and port of two sockaddr_in */
> > +static force_inline int inaddrcmp(const struct sockaddr_in *sin1, const
> > struct sockaddr_in *sin2) +{
> > +        return ((sin1->sin_addr.s_addr != sin2->sin_addr.s_addr)
> > +                || (sin1->sin_port != sin2->sin_port));
> > +}
> 
> I don't understand why you copied this here. Is your network.h a compatibility 
> header, or does it replace netsock.h?

in my view network.h is just to hide system differences
(and provide trivial functions such as the one above),
while netwock provides additional services
for sockets (container, tls, etc.)

> Overall I really don't like this new header, I think it looks too much like 
> everything.h.

you keep saying that, and i don't understand why.

My aggregate headers only contain < 10 individual headers, the same
that were repeated in every single file involved with network (or
every single file, for compat.h). The reason for aggregating is
avoid repreating the #ifdef THIS #ifdef THAT all over the place.

In terms of compile times, i already posted them and as you see
there is no measurable difference between the two versions.

If/when you can come up with real data supporting the alleged
increase in build time, i am open to fix the problems.

cheers
luigi



More information about the asterisk-dev mailing list