Gaining access to TCP/UDP packets.
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

