On Tue, 24 Oct 2000, Gleb Natapov wrote:
> The problem is that you not always know how much is "adequate space" and if
> you didn't guess
> correct you must allocate new buffer and copy all data from old one.
This is a common problem in a lot protocols which insert headers
in between at the lower layers. It becomes even more sexy when this
inserted layer is variable (eg an MPLS label-stack).
The brute force way is to ofcourse always allocate a size equal to the
How about using some of the route flags to indicate that a particular
path has a requirement like this? so then you know apriori what the extra
gap is and can allocate for it. Add to this a generic call:
skb_add_to_header(skb,offset,length,value) and you are almost set.