I am writing a program to capture socket network flow to display network activity. For this, I was wondering if there is any way I can determine the socket type from the socket descriptor.
I know that I can find socket family using getsockname but I could not find a way to find socket type.
For instance, I want to find if this socket was open as UDP or TCP. Thanks for any advice in advance.
YEH