[sclug] C programming question and date on Linux
Alasdair G Kergon
lists-sclug at ox.compsoc.net
Sat Oct 25 09:05:36 UTC 2003
On Thu, Apr 10, 2003 at 04:42:09PM +0100, pieter claassen wrote:
> 1. Why does C on linux have such cool undocumented data types such as
> u_int16_y and where are they documented?
Use them whenever you're relying on a field having an exact number of bits.
The size of 'int' depends on the architecture.
There are corresponding format strings to use in printf too, e.g. PRIu16
http://www.unix-systems.org/whitepapers/64bit.html has a good explanation.
> What is the __attribute__((__packed__)); about and where can I get more
> info on that?
info gcc
> How do I find out where ETH_ALEN comes from?
rgrep ETH_ALEN /usr/include
('grep -r' in some distributions)
Alasdair
--
agk at oxlug.org
More information about the Sclug
mailing list