tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Socket options KPI
Iain Hibbert wrote:
On Sun, 27 Jan 2008, Elad Efrat wrote:
Iain Hibbert wrote:
Something I'm not keen on is the SOPT_SET/SOPT_GET thing. Would it be too
much work to split pr_ctloutput() into pr_setopt() and pr_getopt()?
Let's do this in smaller steps so we don't break too much stuff. :)
For the first step, I'd like to reduce the mbuf abuse.
In that case, I think better to keep the PRCO_ and not encode the
direction into the sockopt structure, and using:
int pr_ctloutput(int req, struct socket *so, struct sockopt *opt);
(just because I don't like the fit)
What you're suggesting implies we will be changing the KPI that way,
which, at the moment, is not necessarily true. I would very much like
for the first sweep to be close to what is done in FreeBSD.
While separating usrreq to individual routines (bind, connect, etc.) is
done in FreeBSD, breaking ctloutput to "set" and "get" isn't.
Can we agree on revising this at a later date please?
also,
int
sockopt_setint(struct sockopt *sopt, int val)
{
return sockopt_set(sopt, &val, sizeof(val));
}
would avoid duplicating (minimal, I admit :) code..
Righto, I'll add this one too. :)
-e.
Home |
Main Index |
Thread Index |
Old Index