Archive for the 'Networking' Category

How do I configure HTTP proxy settings in Firefox Browser

December 5, 2008

Find the step by step procedure with diagrams/screenshots in my article at http://TechPulp.com/.
Read Full Article: How configure Proxy settings in Firefox Browser

Find peer IP address and port number using getpeername

July 12, 2008

The getpeername function can be used to retrieve the peer IP address and port number on a given socket. For this to work, the socket should have a valid TCP connection established. Typically this is used by server to find the IP address and port number of client. Read more in “Find peer IP address [...]

Find local IP address and local port number using getsockname

July 12, 2008

The getsockname function can be used to find the local port used by a given socket. It is valid to use this function only if the socket is already using a local port number. i.e A server socket which invoked bind system call with zero as port number. A client socket which has established connection [...]

Resolve “Address already in use” error with socket bind

July 12, 2008

To get rid of Address already in use” error with bind system call, SO_REUSEADDR socket option should be set before invoking bind. This makes operating system to allow the socket to bind if there is no active socket bound to the requested address and port. See code example in Resolve “Address already in use” error [...]

Identify processes that have open sockets

July 10, 2008

The lsof can be used to find the list of processes that have active sockets open.
Then netstat command can be used to verify it.
Find more details here.
http://www.techpulp.com/articles/linux/tip-identify-process-with-open-socket.php