ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: [Wireshark-dev] about udp dissector

From: "Vladimir Zherdenovsky" <Vladimir.Zherdenovsky@xxxxxxxxxxxxxx>
Date: Fri, 2 Feb 2007 09:56:54 +0200

Hello,

 

I just want to understand how the udp dissector works and have misunderstanding of following codes lines:

 

  static e_udphdr udphstruct[4], *udph;
  static int udph_count=0;

  udph_count++;
  if(udph_count>=4){
     udph_count=0;
  }
  udph=&udphstruct[udph_count];

 

Could anybody explain why 4 and how it works?

Thanks,

vladimir