Grab the lock before reading uid/gid related structure, this will
[ipfw.git] / dummynet / include / netinet / ip_dummynet.h
index c6a6575..4f8291f 100644 (file)
@@ -113,6 +113,8 @@ struct dn_heap {
  */
 struct dn_pkt_tag {
     struct ip_fw *rule;                /* matching rule */
+    uint32_t rule_id;          /* matching rule id */
+    uint32_t chain_id;         /* ruleset id */
     int dn_dir;                        /* action when packet comes out. */
 #define DN_TO_IP_OUT   1
 #define DN_TO_IP_IN    2
@@ -339,8 +341,10 @@ struct dn_pipe {           /* a pipe */
 
     /* Same as in dn_flow_queue, numbytes can become large */
     int64_t numbytes;          /* bits I can transmit (more or less). */
+    uint64_t burst;            /* burst size, scaled: bits * hz */
 
     dn_key sched_time ;                /* time pipe was scheduled in ready_heap */
+    dn_key idle_time;          /* start of pipe idle time */
 
     /*
      * When the tx clock come from an interface (if_name[0] != '\0'), its name
@@ -379,7 +383,6 @@ typedef     int ip_dn_io_t(struct mbuf **m, int dir, struct ip_fw_args *fwa);
 extern ip_dn_ctl_t *ip_dn_ctl_ptr;
 extern ip_dn_ruledel_t *ip_dn_ruledel_ptr;
 extern ip_dn_io_t *ip_dn_io_ptr;
-#define        DUMMYNET_LOADED (ip_dn_io_ptr != NULL)
 
 /*
  * Return the IPFW rule associated with the dummynet tag; if any.