Any program running on a Unix-like system can do this using getpeername() (for stream-oriented protocols) or recvfrom() (for datagram-oriented protocols). But as to how to get your software to issue that system call, it's a question for users of that software (I'm sure there's a users' mailing list for it).
James -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org