I need to call a function every time a new TCP socket is created at my Linux server. The schema code is:
do {
new_socket = block_until_new_socket_created();
do_something(new_socket);
} while (true);
The question is, is there any library/tool/function to be notified when a new tcp socket is created at the UNIX/Linux server where the code is being executed?
The programming code is C.