How to keep track of socket close()?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi everyone,

I have a question on socket close().

I want to be able to keep track of socket related information as
sockets are created and destroyed. One way I can do is to interpose
bind() and connect() system calls so that I can add them to my table.
Then I keep track of shutdown() to delete the given socket
information.
FYI, I use socket descriptor as an index of my table.
Now one problem is that I do not know if the given file descriptor is
socket descriptor when the user calls close() system call. I suppose
there is a way but I think that it may be too expensive to check out
all the file descriptor when close() is called.
Is there any nice way I can know when the socket is closed? Please
give me some advice. Thank you very much.

Ilho <><
--
YES, JESUS LOVES YOU, TOO.
- Come for Eng. Christian Fellowship on Friday 6pm!
For God so loved the world that he gave his one and only Son, that
whoever believes in him shall not perish but have eternal life(John
3:16).

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux