A technique for identifying packets flowing on a network. The type of communication is analyzed by examining control information of packet. A feature of this technique is that the data part, in addition to the header part, is inspected. It is used to detect use of file-sharing software and to monitor communications traffic.