[fpc-pascal] raw socket example

Dmitry Boyarintsev skalogryz.lists at gmail.com
Wed Nov 18 18:58:15 CET 2015


On Wed, Nov 18, 2015 at 12:45 PM, Daniel Gaspary <dgaspary at gmail.com> wrote:

> Need to change the fpsocket function call.
>
>
> From fpSocket(AF_INET,SOCK_STREAM,0)
> to fpSocket(AF_INET,SOCK_RAW,0);
>
> Is possible that the "0" needs to be changed too.
>

Just keep in mind that reading such socket is tricky.
There's no more IP address (as shown in the example).
The whole protocol stack needs to be handled manually.

I don't think there's any publish FPC raw-socket example.
The easiest way is to find C raw-socket example and port it to pascal.

thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20151118/4011bc53/attachment.html>


More information about the fpc-pascal mailing list