int s = *(int *)utcp->priv;
outpktno++;
if(outpktno >= dropfrom && outpktno < dropto) {
- if(drand48() < dropout)
+ if(drand48() < dropout) {
+ debug("Dropped outgoing packet\n");
return len;
+ }
if(!reorder_data && drand48() < reorder) {
reorder_data = malloc(len);
if(!reorder_data) {
if(inpktno >= dropto || inpktno < dropfrom || drand48() >= dropin) {
total_in += len;
utcp_recv(u, buf, len);
+ } else {
+ debug("Dropped incoming packet\n");
}
}