New Firewall (hpf) for DragonFlyBSD

Simon 'corecode' Schubert corecode at
Fri Jan 9 16:37:00 PST 2004

On 09.01.2004, at 21:25, Sebastien Petit wrote:
Also, using ints to store pointers won't work on all architectures.
This code is i386 oriented but can be changed for storing pointers 
with 8
bytes or more. This is an experimental code, not a definitve one. I 
try to
see how I can update it for working under 64 bits architectures. 
What's the
architecture concerned by the problem of int for storing pointers ?
I'm not sure if I undestood your question.
int isn't guaranteed to be as wide as a pointer. So you should use 
either void * (or whatever) or long ints (which are IIRC guaranteed to 
be at least as wide as a pointer).

But, why don't you use just a char to index the next level? Okay, it 
might be slower than a direct address because of the additional add + 
multiply, yet, on today's processors this might be acceptable (in 
favour of using much less memory)

\ /
 \     ASCII Ribbon Campaign
/ \  Against HTML Mail and News
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00007.pgp
Type: application/octet-stream
Size: 186 bytes
Desc: "Description: This is a digitally signed message part"
URL: <>

More information about the Submit mailing list