tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: ioctl(2) numbers
Date: Wed, 01 Aug 2018 15:43:06 +0100
From: Robert Swindells <rjs%fdy2.co.uk@localhost>
Message-ID: <x7h8ke2lmt.fsf%ren.fdy2.co.uk@localhost>
| I understand how ioctl works.
OK, apologies...
| I asked because it looked as if there was a convention within that file
| that numbers be unique, even if they were in different groups.
That looks to date back to original BSD definitions ... just some desire
to be "nice" I would expect, and I doubt it makes any difference (that is,
I cannot see anyone complaining - sockio.h is something of a mess...)
I did do a little checking though, after the last message, and I see ...
./dev/isa/satlinkio.h:#define SATIOSBUFSIZE _IOW('s', 2, int) /* set buffer size */
./sys/sockio.h:#define SIOCSLOWAT _IOW('s', 2, int) /* set low watermark */
which is not wonderful, though I doubt that there is much chance of
the wrong one of those ever being used in the unintended situation.
Slightly more problematic ...
./external/bsd/ipf/netinet/ip_fil.h:# define SIOCADAFR _IOW('r', 60, struct ipfobj)
./external/bsd/ipf/netinet/ip_nat.h:#define SIOCADNAT _IOW('r', 60, struct ipfobj)
('r', 60) turns out to be a popular choice... (there are 5, only those two
conflict however).
We should probably make a system wide global registry of such things.
kre
Home |
Main Index |
Thread Index |
Old Index