Re: [PATCH libnetfilter_queue] src: Simplify struct pkt_buff: remove tail

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jan 18, 2020 at 01:09:55AM +1100, Duncan Roe wrote:
[...]
> diff --git a/src/internal.h b/src/internal.h
> index 0cfa425..dafb33a 100644
> --- a/src/internal.h
> +++ b/src/internal.h
> @@ -9,6 +9,7 @@
>  #else
>  #	define EXPORT_SYMBOL
>  #endif
> +#define PKTB_TAIL (pktb->data + pktb->len)

Instead of a macro, I'd suggest you add (something like):

static inline uint8_t *pktb_tail(struct pktbuff *pktb)
{
        return pktb->data + pktb->len;
}

Thanks.



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux