Gaining access to TCP/UDP packets.

Hi

I am trying to write a comms logger for my application to read all incoming and out going TCP and UDP transactions.

I am trying to find out if it is possible to access the packet that is recieved at the socket.

I am writing this using Winsock2 header and C++. I have called the recv function which I understand returns the data section of the TCP packet into a buffer. However I have seen aplications such network analysers like Ethereal which can access all the information regarding source port etc.

Is is possible using sockets to gain access to that data in C++ or does it require a much lower form of interception.

Hope this isnt confusing

Regards

Paul Graham
[734 byte] By [elhan] at [2007-11-19 19:41:24]
# 1 Re: Gaining access to TCP/UDP packets.
So you want to program a kind of packet sniffer. You could write a WinSock Layered Service Provide (LSP). Take a look at this site: http://www.microsoft.com/msj/0599/LayeredService/LayeredService.aspx
philkr at 2007-11-9 13:52:23 >