how get ip address

hi,
if someboy open my files from the network,I know how to get the sid,and then I can get the user.but how can I get the his ip address.
thanks
zhou