[U-Boot] [PATCH v3 1/2] net: introduce packet capture support

Joe Hershberger joe.hershberger at ni.com
Mon Jul 15 18:09:14 UTC 2019


On Mon, Jul 15, 2019 at 2:08 AM Ramon Fried <rfried.dev at gmail.com> wrote:
>
> On Fri, Jul 12, 2019 at 12:18 AM Joe Hershberger <joe.hershberger at ni.com> wrote:
> > On Sat, Jun 22, 2019 at 1:50 PM Ramon Fried <rfried.dev at gmail.com> wrote:
> >> Add support for capturing ethernet packets and storing
> >> them in memory in PCAP(2.4) format, later to be analyzed by
> >> any PCAP viewer software (IE. Wireshark)
> >>
> >> This feature greatly assist debugging network issues such
> >> as detecting dropped packets, packet corruption etc.
> >>
> >> Signed-off-by: Ramon Fried <rfried.dev at gmail.com>
> >> Reviewed-by: Alex Marginean <alexm.osslist at gmail.com>
> >> Tested-by: Alex Marginean <alexm.osslist at gmail.com>

[ ... ]

> > It seems like an error should be printed the first time the limit is
> > hit, not just wait until a status is requested.
> Printing error on the first time was my initial implementation.
> problem is that it's printed along with other ####### that tftp uses.
> This doesn't look nice. what do you think ?

I think this should be an uncommon enough of an issue that it's OK to
break up the #####.

> >> +       }
> >> +
> >> +       header.ts_sec = cur_time / 1000000;
> >> +       header.ts_usec = cur_time % 1000000;
> >> +       header.incl_len = len;
> >> +       header.orig_len = len;
> >> +
> >> +       memcpy(buf + pos, &header, sizeof(header));
> >> +       pos += sizeof(header);
> >> +       memcpy(buf + pos, packet, len);
> >> +       pos += len;
 [ ... ]


More information about the U-Boot mailing list