Version française
Home     About     Download     Resources     Contact us    
Browse thread
Raw Sockets
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Nicolas Cannasse <warplayer@f...>
Subject: Re: [Caml-list] Raw Sockets
> Does anybody have any information on using SOCK_RAW in OCaml?  At this
> level, things like byte ordering matter, so I would like to know if
> OCaml handles this automatically or not, as well as any other gotchas
> involved with using raw sockets in OCaml.  Also, are there any
> structures for handling Ethernet/IP/TCP headers already written?  Maybe
> in another library?  Or am I going to have to write these myself?
>
> Thanks,
> --Jonathan

One possibility to deal with byte ordering would be to wrap your socket
accesses with an ExtLib IO since it has all the APIs for reading and writing
multibyte integers (see http://ocaml-lib.sourceforge.net/doc/IO.html )

Nicolas