Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Jul 2004 21:12:00 +0100
From:      Anil Madhavapeddy <anil@recoil.org>
To:        Julian Elischer <julian@elischer.org>
Cc:        freebsd-net@lists.freebsd.org
Subject:   Re: Packing netgraph structs
Message-ID:  <E8F2E4C8-CB9A-11D8-99F8-000A95DA50A6@recoil.org>
In-Reply-To: <Pine.BSF.4.21.0407011242510.91303-100000@InterJet.elischer.org>
References:  <Pine.BSF.4.21.0407011242510.91303-100000@InterJet.elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 1 Jul 2004, at 20:47, Julian Elischer wrote:
>
> I think that nearly all languages these day shave to take into  account
> "what C does" and they need to have packing etc taken explicitly into
> account when they do syscalls etc. so I don't think that you will have
> too many problems and there should be some facility available to you to
> do the right packing if it's needed.
>
> The C packing is done to maximise the efficiency of the structure given
> that particular platform. I don't think that packing it would be useful
> as the messages are never supposed to leave the machine, and if we pack
> netgraph messages, then where do we stop? Should we pack all ioctl
> structures too?
>
> (sorry to make life more difficult for you but...)

No problem, I just wanted to make sure I wasn't missing something - I'm 
just writing a small program to create C structs and ML definitions at 
the moment, shouldn't be too bad.

>
> julian
>
> BTW what IS OCaml? I've seen it mentionned a few times now..

A modern functional language - statically typed, generates pretty tight 
native code on a number of architectures.  Extremely nice for speedy 
networking code without the hassle of memory leaks and overflows, or 
the portability and speed issues of Java.

-anil



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E8F2E4C8-CB9A-11D8-99F8-000A95DA50A6>