C   28
dropcode
Guest on 4th February 2023 01:23:51 PM


  1. {
  2.        struct timeval tod;
  3.        do_gettimeofday(&tod);
  4.        if ((tod.tv_usec & 0xfff) < drop_threshold)   // COP_SEND_DROP_THRESH)
  5.        {
  6.           cop_hdr_t *cph;
  7.           cph = (cop_hdr_t *)skb->h.th;
  8.           printk("DROP: seq = %d ack = %d \n", cph->seq, cph->ack);
  9.           if (cpo)
  10.              cpo->txdrops += 1;
  11.           kfree_skb(skb);
  12.           return(0);
  13.        }
  14.     }

Raw Paste

Login or Register to edit or fork this paste. It's free.