tech-net archive

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

Re: patch make struct protosw pr_input non-variadic



> On Jan 7, 2017, at 1:03 AM, Joerg Sonnenberger <joerg%bec.de@localhost> wrote:
> 
> On Sat, Jan 07, 2017 at 03:52:27AM +0000, Taylor R Campbell wrote:
>> So.  OK to commit?
> 
> Yes.

For me it's a no.  I find it ugly.  I'm going to give an alternate
approach while is almost as ugly but a little simpler.

Why not replace void (*pr_input)(struct mbuf *, ...); in protosw
with a union?  The first member of the union can be that and then
include the (mbuf *, int, int) as a secondary member.  

Then the netinet/netinet6 can just call the alternate member and
completely avoid variadic style.  initializers can use the addition
member as well.


Home | Main Index | Thread Index | Old Index