+ /* Count lost packets. */
+ switch((header->type & 0x7f)) {
+ /* in these types the color value overwrites the lctr */
+ case TYPE_COLOR_HDLC_POS:
+ case TYPE_COLOR_ETH:
+ case TYPE_DSM_COLOR_HDLC_POS:
+ case TYPE_DSM_COLOR_ETH:
+ case TYPE_COLOR_MC_HDLC_POS:
+ case TYPE_COLOR_HASH_ETH:
+ case TYPE_COLOR_HASH_POS:
+ break;
+
+ default:
+ if (header->lctr) {
+ if (p->md.stat.ps_drop > (UINT_MAX - ntohs(header->lctr))) {
+ p->md.stat.ps_drop = UINT_MAX;
+ } else {
+ p->md.stat.ps_drop += ntohs(header->lctr);
+ }
+ }
+ }
+
+ if ((header->type & 0x7f) == TYPE_PAD) {
+ continue;
+ }
+