On Mon, May 15, 2006 at 11:57:12PM -0700, David S. Miller ([EMAIL PROTECTED]) wrote: > From: Evgeniy Polyakov <[EMAIL PROTECTED]> > Date: Tue, 16 May 2006 10:19:09 +0400 > > > +static int netchannel_convert_skb_ipv4(struct sk_buff *skb, struct > > unetchannel *unc) > > +{ > ... > > + switch (unc->proto) { > > + case IPPROTO_TCP: > ... > > + case IPPROTO_UDP: > ... > > Why do people write code like this? > > Port location is protocol agnostic, there are always 2 > 16-bit ports at beginning of header without exception. > > Without this, ICMP would be useless :-)
And what if we use ESP which would place it's hashed sequence number as port? -- Evgeniy Polyakov - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html