[U-Boot-Users] uboot doubts ?

Maximus john.maximus at gmail.com
Wed Jan 25 07:52:35 CET 2006


Hi,
   I am using u-boot. i want to write my own protocol and add a few
commands to u-boot for my custom board.

 I want to send packets and recieve packets (UDP).


 I followed the example as given in tftp.c and am able to send packets.
 using NetSendUDPPacket.


 I did not understand the following:

1)

   What do the following do ?.

   NetSetTimeout (TIMEOUT * CFG_HZ, TftpTimeout);
   NetSetHandler (TftpHandler);

   All i could make sense it after the timeout, TftpTimeout is called.
   Is it called under all circumstances or only based on specific
circumstances. ( Say if i get a packet. i may not want it to be
called). i could not understand beyound this.

What is the precision of the timeout value. are milliseconds allowed ?

 Am i right ?.

 Why do we require an handler.  what does  NetStartAgain (  ) do ?.
Where does it start again ?. if i want to use it - what should i keep
in mind. any variables need to be taken care of ?.


2)
  What does   NetState variable in net.c do ?


 I could manage to write a send routine. but recieve i am not able to
understand the code.
  I  just want to recieve packets and take some actions (just like a server).

 are there any examples for doing this. suppose i dont get a packet
say within 1 sec. i may want to do some other thing ?. is it possible
in u-boot.




I am a dull idiot. I dont understand easily. Please be elaborate in
your answers.



Thanks for Your time. i would appreciate any responses.


Thanks once again.


With Warm Regards,
John.




More information about the U-Boot mailing list