Ethereal-dev: [Ethereal-dev] What that arrays of structs like udphstruct for

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Andy Howell <AndyHowell@xxxxxxxxxxxxx>
Date: Sun, 03 Aug 2003 22:46:46 -0500

One little thing that has been bothering me is why do the dissectors have a construct like:

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

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

Andy