[WLANware] SNMP plugin for OSLR - GSoC 2011

Marek Lindner lindner_marek at yahoo.de
Wed Mar 30 13:14:26 CEST 2011


Hi,

> Whenever we send a packet we are updating
> node->image_state.last_packet_size and node->image_state.bytes_sent,
> if we recieve an ack that doesn't correspond to the last sent block,
> we are reducing the node->image_state.bytes_sent back.Suppose,we
> increase the node->image_state.bytes_sent and set the
> node->image_state.last_packet_size, then go into the
> tftp_packet_send_data().That function returned a '-1' , may be because
> there was an error while writing to the raw socket.Then shouldn't we
> clean up the bytes_sent and last_packet_size because the transmission
> hasn't really been done.

I think you got a point here. We should update bytes_sent & last_packet_size 
after the successful transmission.


> We were talking about the code being generic.So, I just wanted to
> point out that one could not use the socket code for general purpose
> i.e it wasn't generic.What I didn't notice was that raw_sock wasn't
> being used in any other file, so a simple "static" would fix this.

Ok.


> One more thing, suppose for some reason the router went down suddenly
> in the middle of a transmission ,we wouldn't have any way to identify
> this situation and quit with an error, right ? The only way I can see
> is to have a timer that is set between each transmission and
> ack-recieving.What do you say?

Detecting this error is difficult indeed. When we have a redboot bootloader the 
TCP connection should timeout. Without we have to work with separate timers as 
you propose.

Regards,
Marek



More information about the WLANware mailing list