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: Taras <taras.judge@s...>
Subject: Re: [Caml-list] Raw Sockets
Hi,
I don't think you can use SOCK_RAW in pure ocaml. I spent a few minutes 
on it, but never had time to get very far.
http://glek.net/subversion/packetml/
That contains a simple ocaml program(with a c function to setup the 
socket) that sends a packet out.

That has basic ocaml code needed to send a packet and contains functions 
for making packets too. Code comes from the basic network stack in dst, 
I just never factored out packet parsing functions properly.

Taras

Jonathan Bryant wrote:

>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
>
>_______________________________________________
>Caml-list mailing list. Subscription management:
>http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
>Archives: http://caml.inria.fr
>Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
>Bug reports: http://caml.inria.fr/bin/caml-bugs
>  
>