mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: Daniele Lacamera <daniele.lacamera@tass.be>
Cc: barebox <barebox@lists.infradead.org>, PicoTCP <picotcp@tass.be>
Subject: Re: picotcp tftp support [was Adding IPv4 multicast support]
Date: Thu, 4 Sep 2014 21:14:19 +0400	[thread overview]
Message-ID: <20140904211419.ea6eae69a1e96d2cb9d3e20e@gmail.com> (raw)
In-Reply-To: <CAOngqVUUZOeRToJp_6vvxqmB-x2D=VAHo=JntpfegQ03P5axgQ@mail.gmail.com>

On Wed, 16 Jul 2014 08:48:18 +0200
Daniele Lacamera <daniele.lacamera@tass.be> wrote:

> On Wed, Jul 16, 2014 at 8:30 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> > Right now the network users register to a udp port and provide a handler
> > which is called whenever a packet to this port is received. The
> > prototype for this function is:
> >
> > struct net_connection *net_udp_new(IPaddr_t dest, uint16_t dport,
> >                 rx_handler_f *handler, void *ctx);
> >
> > Then network users can send packets on this connection:
> >
> > int net_udp_send(struct net_connection *con, int len);
> >
> > The function returns after the packet has been sent.
> >
> > The network user has to keep the ball rolling by calling
> >
> > void net_poll(void);
> >
> > in a loop. This function will call into the network drivers receive
> > function and dispatch the received packets. ARP packets are handled
> > internally, the UDP packets are passed to the registered handlers.
> >
> > The handlers usually will send answers to received packets (so a tftp
> > client will send an ack here or request the next packet).
> >
> > Usually the loop calling net_poll() also has some functionality to
> > detect progress and will send the last packet again if it was lost.
> >
> > Hope that explains the networking model in barebox.
> >
> 
> Hi Sascha,
> 
> Thanks a lot for this clarification. The mechanism you described is
> the same as the native execution model of PicoTCP, and looking around
> in the code it seems that looping around net_poll() was in fact the
> way to go.
> 
> to Antony: I will improve TFTP first, by allowing multiple sessions at
> the same time. I will keep you posted on the progress.

I see a barebox-related publication with nice pictures on the picotcp website  :)

  http://www.picotcp.com/barebox-on-top-of-picotcp

We are awaiting improved TFTP...

-- 
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2014-09-04 17:01 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-13 10:11 Adding IPv4 multicast support Colin Leitner
2014-07-13 10:55 ` Antony Pavlov
2014-07-13 10:52   ` Colin Leitner
2014-07-13 13:15     ` Colin Leitner
2014-07-13 14:28   ` Daniele Lacamera
2014-07-15  7:01     ` picotcp tftp support [was Adding IPv4 multicast support] Antony Pavlov
2014-07-15  9:31       ` Daniele Lacamera
2014-07-15 10:27         ` Antony Pavlov
2014-07-15 10:57           ` Daniele Lacamera
2014-07-15 12:57             ` Antony Pavlov
2014-07-15 15:55               ` Daniele Lacamera
2014-07-15 19:02                 ` Antony Pavlov
2014-07-16  6:30             ` Sascha Hauer
2014-07-16  6:48               ` Daniele Lacamera
2014-09-04 17:14                 ` Antony Pavlov [this message]
2014-09-05  7:37                   ` Daniele Lacamera
2014-09-26  9:27                   ` PicoTCP
2014-09-28 14:22                     ` Antony Pavlov
2014-09-29  9:45                       ` Daniele Lacamera
2014-09-29 10:10                         ` Michele Di Pede
2014-09-29 10:19                         ` Antony Pavlov
2014-07-15 18:17     ` Adding IPv4 multicast support Colin Leitner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140904211419.ea6eae69a1e96d2cb9d3e20e@gmail.com \
    --to=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=daniele.lacamera@tass.be \
    --cc=picotcp@tass.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox