+/*Returns true if the connection is closed and any packets should go to
+ * a new connection with the same four-tuple*/
+int isClosed(struct hcon *A, struct hcon *B, int pkt_type){
+ if(pkt_type==DCCP_PKT_REQUEST || pkt_type==DCCP_PKT_RESPONSE){
+ if(A->state==CLOSE && B->state==CLOSE){
+ /*We're opening a new connection on hosts/ports we've used before, mark
+ * old connection as dead*/
+ A->state=DEAD;
+ B->state=DEAD;
+ return TRUE;
+ }
+ }else{
+ if(A->state==DEAD || B->state==DEAD){
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+