You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by Milan Obuch <nu...@dino.sk> on 2023/08/12 19:15:38 UTC
Fixing tcpblaster - anybody using it?
Hi,
as I was building NuttX with bl602evb:wifi configuration, it failed
with AF_INET being undefined. I found it is easy to fix with simply
adding one include:
# diff -u tcpblaster_cmdline.c.orig tcpblaster_cmdline.c
--- tcpblaster_cmdline.c.orig 2022-12-11 22:21:46.630131000 +0100
+++ tcpblaster_cmdline.c 2023-08-12 17:57:30.831047000 +0200
@@ -24,6 +24,8 @@
#include "config.h"
+#include <sys/socket.h>
+
#include <stdlib.h>
#include <stdio.h>
#include <arpa/inet.h>
Then NuttX builds and run (somewhat) well. While I have no knowledge on
tcpblaster, I decided to look where it is being used:
# grep -Rl CONFIG_EXAMPLES_TCPBLASTER=y *
boards/arm/cxd56xx/spresense/configs/rndis/defconfig
boards/arm/cxd56xx/spresense/configs/rndis_smp/defconfig
boards/arm/cxd56xx/spresense/configs/wifi/defconfig
boards/arm/cxd56xx/spresense/configs/wifi_smp/defconfig
boards/arm/cxd56xx/spresense/configs/rndis_composite/defconfig
boards/arm/imx6/sabre-6quad/configs/netnsh/defconfig
boards/arm/imx6/sabre-6quad/configs/netnsh_smp/defconfig
boards/arm/imx6/sabre-6quad/configs/netnsh_wb/defconfig
boards/arm/sama5/giant-board/configs/netnsh/defconfig
boards/arm/sama5/giant-board/configs/sdmmc-net-nsh/defconfig
boards/arm/sama5/giant-board/configs/sdmmcnsh/defconfig
boards/arm/sama5/sama5d2-xult/configs/netnsh/defconfig
boards/arm/sama5/sama5d2-xult/configs/sdmmcnsh/defconfig
boards/arm/sama5/sama5d3-xplained/configs/ethernet-over-usb-2-high-speed/defconfig
boards/arm/sama5/jupiter-nano/configs/netnsh/defconfig
boards/arm/sama5/jupiter-nano/configs/sdmmc-nsh-net-resolvconf/defconfig
boards/arm/sama5/jupiter-nano/configs/sdmmcnsh/defconfig
boards/arm/stm32/viewtool-stm32f107/configs/tcpblaster/defconfig
boards/risc-v/bl602/bl602evb/configs/wifi/defconfig
boards/risc-v/mpfs/icicle/configs/network/defconfig
boards/sim/sim/sim/configs/tcpblaster/defconfig
boards/sim/sim/sim/configs/tcploop/defconfig
boards/sim/sim/sim/configs/rtptools/defconfig
This means it is defined for following configurations:
spresense:rndis
spresense:rndis_smp
spresense:wifi
spresense:wifi_smp
spresense:rndis_composite
sabre-6quad:netnsh
sabre-6quad:netnsh_smp
sabre-6quad:netnsh_wb
giant-board:netnsh
giant-board:sdmmc-net-nsh
giant-board:sdmmcnsh
sama5d2-xult:netnsh
sama5d2-xult:sdmmcnsh
sama5d3-xplained:ethernet-over-usb-2-high-speed
jupiter-nano:netnsh
jupiter-nano:sdmmc-nsh-net-resolvconf
jupiter-nano:sdmmcnsh
viewtool-stm32f107:tcpblaster
bl602evb:wifi
icicle:network
sim:tcpblaster
sim:tcploop
sim:rtptools
Is anybody using any configuration in this set? I did not look more
into history to find when it brake, but anyway, the fix looks trivial
to me.
Regards,
Milan
Re: Fixing tcpblaster - anybody using it?
Posted by Nathan Hartman <ha...@gmail.com>.
On Sun, Aug 13, 2023 at 9:09 AM Milan Obuch <nu...@dino.sk> wrote:
> On Sun, 13 Aug 2023 08:32:53 -0400
> Nathan Hartman <ha...@gmail.com> wrote:
>
> > On Sat, Aug 12, 2023 at 3:15 PM Milan Obuch <nu...@dino.sk> wrote:
> >
> > > Hi,
> > >
> > > as I was building NuttX with bl602evb:wifi configuration, it failed
> > > with AF_INET being undefined. I found it is easy to fix with simply
> > > adding one include:
> > >
> > > # diff -u tcpblaster_cmdline.c.orig tcpblaster_cmdline.c
> > > --- tcpblaster_cmdline.c.orig 2022-12-11 22:21:46.630131000 +0100
> > > +++ tcpblaster_cmdline.c 2023-08-12 17:57:30.831047000 +0200
> > > @@ -24,6 +24,8 @@
> > >
> > > #include "config.h"
> > >
> > > +#include <sys/socket.h>
> > > +
> > > #include <stdlib.h>
> > > #include <stdio.h>
> > > #include <arpa/inet.h>
> > >
> > > Then NuttX builds and run (somewhat) well. While I have no
> > > knowledge on tcpblaster, I decided to look where it is being used:
>
> [ snip ]
>
> > > This means it is defined for following configurations:
> > >
> > > spresense:rndis
> > > spresense:rndis_smp
> > > spresense:wifi
> > > spresense:wifi_smp
> > > spresense:rndis_composite
> > > sabre-6quad:netnsh
> > > sabre-6quad:netnsh_smp
> > > sabre-6quad:netnsh_wb
> > > giant-board:netnsh
> > > giant-board:sdmmc-net-nsh
> > > giant-board:sdmmcnsh
> > > sama5d2-xult:netnsh
> > > sama5d2-xult:sdmmcnsh
> > > sama5d3-xplained:ethernet-over-usb-2-high-speed
> > > jupiter-nano:netnsh
> > > jupiter-nano:sdmmc-nsh-net-resolvconf
> > > jupiter-nano:sdmmcnsh
> > > viewtool-stm32f107:tcpblaster
> > > bl602evb:wifi
> > > icicle:network
> > > sim:tcpblaster
> > > sim:tcploop
> > > sim:rtptools
> > >
> > > Is anybody using any configuration in this set? I did not look more
> > > into history to find when it brake, but anyway, the fix looks
> > > trivial to me.
> > >
> > > Regards,
> > > Milan
> >
> > I recall things getting moved around in the networking headers some
> > time back (maybe a year?) so it's possible this source file wasn't
> > updated at that time. If it solves the problem, please open a pull
> > request!
> >
> > Cheers,
> > Nathan
>
> For me the problem is fixed. How should the patch above be translated
> into pull request? I gained some skill with git, but still only in
> direction 'to me', not the other one :(
>
> Regards,
> Milan
>
Lup has written a very good article about how to prepare pull requests for
NuttX:
https://lupyuen.github.io/articles/pr
Cheers
Nathan
Re: Fixing tcpblaster - anybody using it?
Posted by Milan Obuch <nu...@dino.sk>.
On Sun, 13 Aug 2023 08:32:53 -0400
Nathan Hartman <ha...@gmail.com> wrote:
> On Sat, Aug 12, 2023 at 3:15 PM Milan Obuch <nu...@dino.sk> wrote:
>
> > Hi,
> >
> > as I was building NuttX with bl602evb:wifi configuration, it failed
> > with AF_INET being undefined. I found it is easy to fix with simply
> > adding one include:
> >
> > # diff -u tcpblaster_cmdline.c.orig tcpblaster_cmdline.c
> > --- tcpblaster_cmdline.c.orig 2022-12-11 22:21:46.630131000 +0100
> > +++ tcpblaster_cmdline.c 2023-08-12 17:57:30.831047000 +0200
> > @@ -24,6 +24,8 @@
> >
> > #include "config.h"
> >
> > +#include <sys/socket.h>
> > +
> > #include <stdlib.h>
> > #include <stdio.h>
> > #include <arpa/inet.h>
> >
> > Then NuttX builds and run (somewhat) well. While I have no
> > knowledge on tcpblaster, I decided to look where it is being used:
[ snip ]
> > This means it is defined for following configurations:
> >
> > spresense:rndis
> > spresense:rndis_smp
> > spresense:wifi
> > spresense:wifi_smp
> > spresense:rndis_composite
> > sabre-6quad:netnsh
> > sabre-6quad:netnsh_smp
> > sabre-6quad:netnsh_wb
> > giant-board:netnsh
> > giant-board:sdmmc-net-nsh
> > giant-board:sdmmcnsh
> > sama5d2-xult:netnsh
> > sama5d2-xult:sdmmcnsh
> > sama5d3-xplained:ethernet-over-usb-2-high-speed
> > jupiter-nano:netnsh
> > jupiter-nano:sdmmc-nsh-net-resolvconf
> > jupiter-nano:sdmmcnsh
> > viewtool-stm32f107:tcpblaster
> > bl602evb:wifi
> > icicle:network
> > sim:tcpblaster
> > sim:tcploop
> > sim:rtptools
> >
> > Is anybody using any configuration in this set? I did not look more
> > into history to find when it brake, but anyway, the fix looks
> > trivial to me.
> >
> > Regards,
> > Milan
>
> I recall things getting moved around in the networking headers some
> time back (maybe a year?) so it's possible this source file wasn't
> updated at that time. If it solves the problem, please open a pull
> request!
>
> Cheers,
> Nathan
For me the problem is fixed. How should the patch above be translated
into pull request? I gained some skill with git, but still only in
direction 'to me', not the other one :(
Regards,
Milan
Re: Fixing tcpblaster - anybody using it?
Posted by Nathan Hartman <ha...@gmail.com>.
On Sat, Aug 12, 2023 at 3:15 PM Milan Obuch <nu...@dino.sk> wrote:
> Hi,
>
> as I was building NuttX with bl602evb:wifi configuration, it failed
> with AF_INET being undefined. I found it is easy to fix with simply
> adding one include:
>
> # diff -u tcpblaster_cmdline.c.orig tcpblaster_cmdline.c
> --- tcpblaster_cmdline.c.orig 2022-12-11 22:21:46.630131000 +0100
> +++ tcpblaster_cmdline.c 2023-08-12 17:57:30.831047000 +0200
> @@ -24,6 +24,8 @@
>
> #include "config.h"
>
> +#include <sys/socket.h>
> +
> #include <stdlib.h>
> #include <stdio.h>
> #include <arpa/inet.h>
>
> Then NuttX builds and run (somewhat) well. While I have no knowledge on
> tcpblaster, I decided to look where it is being used:
>
> # grep -Rl CONFIG_EXAMPLES_TCPBLASTER=y *
> boards/arm/cxd56xx/spresense/configs/rndis/defconfig
> boards/arm/cxd56xx/spresense/configs/rndis_smp/defconfig
> boards/arm/cxd56xx/spresense/configs/wifi/defconfig
> boards/arm/cxd56xx/spresense/configs/wifi_smp/defconfig
> boards/arm/cxd56xx/spresense/configs/rndis_composite/defconfig
> boards/arm/imx6/sabre-6quad/configs/netnsh/defconfig
> boards/arm/imx6/sabre-6quad/configs/netnsh_smp/defconfig
> boards/arm/imx6/sabre-6quad/configs/netnsh_wb/defconfig
> boards/arm/sama5/giant-board/configs/netnsh/defconfig
> boards/arm/sama5/giant-board/configs/sdmmc-net-nsh/defconfig
> boards/arm/sama5/giant-board/configs/sdmmcnsh/defconfig
> boards/arm/sama5/sama5d2-xult/configs/netnsh/defconfig
> boards/arm/sama5/sama5d2-xult/configs/sdmmcnsh/defconfig
>
> boards/arm/sama5/sama5d3-xplained/configs/ethernet-over-usb-2-high-speed/defconfig
> boards/arm/sama5/jupiter-nano/configs/netnsh/defconfig
> boards/arm/sama5/jupiter-nano/configs/sdmmc-nsh-net-resolvconf/defconfig
> boards/arm/sama5/jupiter-nano/configs/sdmmcnsh/defconfig
> boards/arm/stm32/viewtool-stm32f107/configs/tcpblaster/defconfig
> boards/risc-v/bl602/bl602evb/configs/wifi/defconfig
> boards/risc-v/mpfs/icicle/configs/network/defconfig
> boards/sim/sim/sim/configs/tcpblaster/defconfig
> boards/sim/sim/sim/configs/tcploop/defconfig
> boards/sim/sim/sim/configs/rtptools/defconfig
>
> This means it is defined for following configurations:
>
> spresense:rndis
> spresense:rndis_smp
> spresense:wifi
> spresense:wifi_smp
> spresense:rndis_composite
> sabre-6quad:netnsh
> sabre-6quad:netnsh_smp
> sabre-6quad:netnsh_wb
> giant-board:netnsh
> giant-board:sdmmc-net-nsh
> giant-board:sdmmcnsh
> sama5d2-xult:netnsh
> sama5d2-xult:sdmmcnsh
> sama5d3-xplained:ethernet-over-usb-2-high-speed
> jupiter-nano:netnsh
> jupiter-nano:sdmmc-nsh-net-resolvconf
> jupiter-nano:sdmmcnsh
> viewtool-stm32f107:tcpblaster
> bl602evb:wifi
> icicle:network
> sim:tcpblaster
> sim:tcploop
> sim:rtptools
>
> Is anybody using any configuration in this set? I did not look more
> into history to find when it brake, but anyway, the fix looks trivial
> to me.
>
> Regards,
> Milan
I recall things getting moved around in the networking headers some time
back (maybe a year?) so it's possible this source file wasn't updated at
that time. If it solves the problem, please open a pull request!
Cheers,
Nathan