Le 27/10/2015 12:52, Peter Maydell a écrit : > On 27 October 2015 at 11:49, Laurent Vivier <laur...@vivier.eu> wrote: >> >> >> Le 27/10/2015 12:39, Peter Maydell a écrit : >>> On 27 October 2015 at 11:35, Peter Maydell <peter.mayd...@linaro.org> wrote: >>>> Still thinking about the other part of your patch, because >>>> "does this start with 'eth'" is not very pretty... >> >> I agree with you, but I didn't find better. >> >>> ...can we use the TargetFdTrans machinery from your signalfd >>> patch to associate custom sockaddr conversion functions with >>> a file descriptor if it's created via socket(PF_PACKET, SOCK_PACKET, ...)? >> >> It was my first idea, but it didn't fit well: this machinery is to >> translate data (recv/send), not the parameters, but as you say we can >> add some functions in the structure. I'll have a look at this. > > Yes, now we have a generic "special case magic for an fd" we can > start to use it for a wider set of things. > > You might want to separate the "fix the protocol value in socket() > calls" change into a different patch from the "fix the sockaddr > conversion" change (since the former is easy to review now) -- > up to you.
Lets go for two patches... Laurent