[Bro-Dev] [Bro-Commits] [git/bro] topic/v6-addr: Interface draft for new IP address wrapper class. (0868317)

Robin Sommer robin at icir.org
Mon Jan 23 22:08:37 PST 2012


On Mon, Jan 23, 2012 at 21:42 -0800, you wrote:

> > +       enum { IPv4, IPv6 } Family;
> > +       enum { Host, Network } ByteOrder;

Oops, that are typos. That's supposed to look like this instead:

          enum Family { IPv4, IPv6 };
          enum ByteOrder { Host, Network };

Does that make more sense? :)

In other words, we don't need to store these at all.

> These could be members, too. Then you could directory access the in6
> member.

I have this old rule of thumb in my head to define binary operators
outside of classes. What was the use case where that's needed?

Robin

-- 
Robin Sommer * Phone +1 (510) 722-6541 * robin at icir.org
ICSI/LBNL    * Fax   +1 (510) 666-2956 *   www.icir.org


More information about the bro-dev mailing list