Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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
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.
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.


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?
>Caml-list mailing list. Subscription management:
>Beginner's list:
>Bug reports: