:The argument for versioning is not simply because the size of ip_number
:might change (it should be a sockaddr) but because other fields might be
:added or removed. To avoid allocating a new syscall whenever this happens,
:the structure should be versioned.
:
:Putting sizeof(whatever) at the beginning of the structure works
:surprisingly well as a versioning system.
:
:--
:Doug Rabson                            Mail:  [EMAIL PROTECTED]
:Nonlinear Systems Ltd.                 Phone: +44 181 442 9037

    I think we basically have two choices:

    * Pass the sizeof(struct) as part of the system call.  Please, not as 
      part of the structure!  That would make this syscall the odd-man-out
      compared to all the other syscalls that take size arguments.

    * Make the first field of the structure a real version id, one that is
      taken from the same include file that the structure was defined in,
      and require that the field be filled in.

      e.g.

      #include <sys/jail.h>

      struct jail fubar = { JAIL_VERSION };

    I kinda like the second choice the best but the first choice is what most
    other system calls use.

                                        -Matt
                                        Matthew Dillon 
                                        <[EMAIL PROTECTED]>


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to