With TCP protocol, is it possible to bind to a port, listen for data. And handle TCP flags
manually?
EDIT
A normal program could do socket(), bind(), then listen()
and accept()
connections. Then you can get data from the socket, not the TCP flags, e.g PSH + ACK
Here's what I want, when a TCP
connection is not established yet, just any packet sent to a port of a server, I want to see the TCP flags it uses, e.g SYN
, SYN + ACK
EDIT
Yes I know about pcap and packet socket, but I didn't meant to capture packets. I mean a server listens on a port and handle the TCP flags ..