On Thu, 1 Jul 2004, Anil Madhavapeddy wrote:
> I'm creating Netgraph bindings for OCaml in order to play around more > easily with various Bluetooth and Ethernet things I'm working on. It's > all pretty straightforward except for the problem that the netgraph > message structs aren't all packed (e.g. struct ng_mesg). This means > that it's very difficult to serialise them in a language other than C. > > Is there any reason why these aren't packed? If not, I can submit a > diff to make them so. This is a very interesting question. are syscall arguments packed? I know that they are defined rather strangely.. what messages are you having troubles with? Usually, in my experience, 'packed' structures are limitted to structures that are defined in hardware, and message structures ae defined unpacked so that they can be efficiently passed around within a single system. Can you give me better examples.. I'm also a little worried about architectures that have certain allignment restrictions on data, which is why packed and unpacked structures are different in the first place. > > thanks, > > -- > Anil Madhavapeddy > http://anil.recoil.org > University of Cambridge > http://www.cl.cam.ac.uk > > _______________________________________________ > [EMAIL PROTECTED] mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"