Dear All,

 

 

 

I have a problem while trying to send some response packets in my agent
implementation. First of all, my protocol floods the network topology for
acquiring all the paths (set of nodes involved in transmissions) within a
network topology. The first agent sends a packet in all local network
interfaces, and the remaining agents implement the same (propagating the
incoming packet in all local outgoing interfaces) upon receiving the
incoming packet. When the egress node is signaled, it generates a response
message for each incoming request packet. In my simulation, an egress
receives 4 request packets, and the problem is that the response packets,
initialized every one with allocpkt(), don't even go to the queue of
transmission, being lost in the simulation (not dropped). In the current
simulation I'm working on, only one of the four packets is being sent and
it's not even the first one. I've printed de packet's UIDs for comprehending
the reason the packets got dropped and the only thing I've come to is:

 

code:

printf("Packet uid: %d\n", p->uid_);

send(p, 0);

printf("Packet uid: %d\n", p->uid_);

 

output:

Packet uid: 15

Packet uid: 0

 

Resuming, only the packet which is sent has an assigned UID (15 in this

case) and the un-sent packets are assigned as 0. I tried to assign manually
the UID in the remaining packet, in spite of no errors printed, the UID
still keep 0. This put me thinking that the problem is in send() because it
looks like it's zeroing the packet (even the UID) before it send it and
those packets who this happens are the ones that do not get sent. The
packets are only freed later on after treating the response!

 

Do you have a clue for what's going on?

 

 

 

King regards,

 

 

 

Augusto

 

Reply via email to