how to log data being sent to another computer
My project is about logging authentication/authorization success and failure to a computer(1) from authen/authori process being done to another computer(2). I am going to use a hub so that every data sent to comp2 will be send to my computer (comp1) as well, so I can log it.
The idea is, if comp0 is named Peter and wants to login to comp2, if Peter passes the authentication, comp1 will log:
1. Time Peter was authenticated: (a timestamp)
2. Who was authenticated: Peter.
3. The authentication result: Passed.
My problem is, is there a java code out there which already does this so I can just use it?
I'm a complete newbie on networking so hopefully it's just simple and easy as my deadline is also fast approaching.