Subject: Re: ipfilter 3.4beta - ipv6 filtering.
To: Jason Thorpe <thorpej@nas.nasa.gov>
From: Andrew Brown <atatat@atatdot.net>
List: tech-net
Date: 02/22/2000 10:48:41
> > sa_len?
>
>chicken/egg ... you have to copy it in to read sa_len.  this is why e.g.
>bind(2) takes the sockaddr and the size of the sockaddr.

actually, i don't know but i'd be a-guessing that bind(2) takes the
sockaddr and the size of parameter simply because sa_len wasn't always
there.

now that it is, bind(2) (and connect(2), getpeername(2), etc) could
probably just pretend the pointer to sockaddr was a pointer to
u_int8_t and "copy" that one byte in.  then they'd know how much more
to copy in.  ioctl(2) uses pointers in the kernel like this all the
time.

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
andrew@crossbar.com       * "information is power -- share the wealth."