Thread (6 messages) 6 messages, 3 authors, 2006-08-02

Re: [PATCH 7/23] [PATCH] [XFRM] STATE: Add a hook to find where to be inserted header in outbound.

From: James Morris <jmorris@namei.org>
Date: 2006-07-30 23:31:40

On Sat, 29 Jul 2006, Masahide NAKAMURA wrote:
-		hdr_len = ip6_find_1stfragopt(skb, &prevhdr);
+		if (x->type->place_find)
+			hdr_len = x->type->place_find(x, skb, &prevhdr);
+		else
+			hdr_len = ip6_find_1stfragopt(skb, &prevhdr);
What about encapsulating this like:

static inline int hdr_offset(...)
{
	if (x->type->place_find)
		return x->type->place_find(x, skb, &prevhdr);
	else
		return ip6_find_1stfragopt(skb, &prevhdr);
}

Maybe also change the naming of ->place_find to ->hdr_offset



- James
-- 
James Morris
[off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help