You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/01/18 00:45:20 UTC

[GitHub] [incubator-nuttx-apps] a-lunev opened a new pull request #969: netutils/netcat: sendfile related code refactoring + small fixes

a-lunev opened a new pull request #969:
URL: https://github.com/apache/incubator-nuttx-apps/pull/969


   ## Summary
   
   sendfile related code refactoring + small fixes.
   
   ## Impact
   
   netutils/netcat
   
   ## Testing
   
   Build NuttX:
   ```
   $ ./tools/configure.sh -l sim:tcpblaster
   $ make menuconfig
   (enable / disable CONFIG_NETUTILS_NETCAT_SENDFILE,
   enable CONFIG_SCHED_ATEXIT,
   enable CRYPTO_LIBTOMCRYPT,
   enable LIBTOMCRYPT_DEMOS,
   enable CONFIG_LIBTOMCRYPT_HASHSUM,
   enable CONFIG_DEV_URANDOM)
   $ make
   ```
   Enable TUN/TAP on Linux host:
   ```
   $ sudo setcap cap_net_admin+ep ./nuttx
   $ sudo ./tools/simhostroute.sh wlan0 on
   ```
   Run netcat server on Linux host:
   `$ netcat -l -p 31337 | md5sum`
   
   Run NuttX on Linux host:
   ```
   $ ./nuttx
   NuttShell (NSH) NuttX-10.2.0
   nsh> ifconfig eth0 10.0.1.2
   nsh> ifup eth0
   ifup eth0...OK
   nsh> dd if=/dev/urandom of=/tmp/test.bin count=1000
   nsh> hashsum -a md5 /tmp/test.bin
   761821531e22d6d9e910a0d023b82708 */tmp/test.bin
   nsh> netcat LINUX_HOST_IP_ADDRESS 31337 /tmp/test.bin
   nsh> poweroff
   ```
   
   Check the result on Linux host:
   ```
   $ netcat -l -p 31337 | md5sum
   761821531e22d6d9e910a0d023b82708  -
   ```
   
   Disable TUN/TAP on Linux host:
   `$ sudo ./tools/simhostroute.sh wlan0 off`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx-apps] xiaoxiang781216 merged pull request #969: netutils/netcat: sendfile related code refactoring + small fixes

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #969:
URL: https://github.com/apache/incubator-nuttx-apps/pull/969


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org