i made a program using jpcap that allows me to capture 10 sec of the wan/lan traffic and return the packets information like tcp / udp and packet length and alot of information am stuck on a weird part where i want to display all the protocols used and the count of each . this is really weird becase as in jpcap we get the packet information by just getpcaket() and changing it to string then displaying therefor it isnt clear where can i ask for a spcified field like the protcol so i can define them in the code and make flags if appeard turn to 1 and a counter to display their count .
please anybody answer
another question : for accesing the packets from the router i need to use snmp any idea if am adminstrator on my network and have the snmp identified on my router would i be able to fetch the data on the network like the packets from the msn ? or still the encryption will only be decrepeted on the destination ip computer.?