But John, that's precisely the legal means one would use to identify someone who is infringing. You have no gaurantee of anonymity. You certainly don't have any guarantee of it when violating the law.
As for determining the IP address: your p2p client typically advertises it. That's how these systems work.