picotcp tftp support [was Adding IPv4 multicast support]

Antony Pavlov antonynpavlov at gmail.com
Sun Sep 28 07:22:00 PDT 2014


On Fri, 26 Sep 2014 11:27:16 +0200
PicoTCP <picotcp at tass.be> wrote:

> Michele just pushed a TFTP which provides support for multiple
> sessions. API is slightly changed, to keep track of the sessions
> themselves. Please refer to the example in test/examples/tftp.c, or to
> the updated user manual.
> 
> Let us know if we can provide any support to help you progress with
> the integration.

I have just pushed my latest picotcp-enabled barebox
branch to github: https://github.com/frantony/barebox/tree/picotcp.20140928
(this branch contain latest barebox and latest picotcp).

There are two questions.

1. Do we really need this '#ifdef PICO_SUPPORT_UDP' BEFORE (!)
guard macro in pico_dhcp_client.h?

https://github.com/frantony/barebox/commit/01de589b30ebca32d44efbfbdee8026a0ae09fe5

2. New pico_tftp_start_{r,t}x programming interface can be used for
realization legacy standalone 'tftp' command.
But I have no idea how to use this interface for filesystem-over-tftp
(it's the modern barebox' tftp realization)!

Barebox filesystem interface needs something like this programming
interface:

  struct pico_tftp_session *s;

  s = pico_tftp_new_session_rx(addr, port, family, filename);
  ...
  filesize = pico_tftp_get_file_size(s);
  ...
  pico_tftp_receive(s, buf, len);
  ...
  pico_tftp_receive(s, buf, len);
  ... ... ...
  pico_tftp_receive(s, buf, len);
  ...
  pico_tftp_close(s);


I mean that receiving process has to be controlled by barebox,
not by picotcp. Because a new portion of data is received
by filesystem user initiative, not by network stack initiative.

Sascha! Please comment this problem.

-- 
Best regards,
  Antony Pavlov



More information about the barebox mailing list