You need a software that does DPI, or DFI. Some companies has made rules, standar rules for some protocols, were, in a tcp, or udp, or someone sequence, can identify the protocol or application that is running in that time. Thas is what you need. Like i said, there are some products that do what you want, but i guess the are a little expensive, because it is a really GREAT work to write rules of the specific patterns of all applications, eg: Whatsapp, Facebook, ..... This kind of application realize an analisis of the L7 level of a packet, matching the packet content with a huge rule databases. Like @ojs said, you can tried with https://github.com/ntop/nDPI, test it and see the results. Cisco also have it own database, that can be used with the OPNManager, but requires a license