Commit 1d10b9e99d1b4a6a880d424ec791cde45cb04614

Authored by Wolfgang Denk
Exists in master and in 55 other branches 8qm-imx_v2020.04_5.4.70_2.3.0, emb_lf_v2022.04, emb_lf_v2023.04, imx_v2015.04_4.1.15_1.0.0_ga, pitx_8mp_lf_v2020.04, smarc-8m-android-10.0.0_2.6.0, smarc-8m-android-11.0.0_2.0.0, smarc-8mp-android-11.0.0_2.0.0, smarc-emmc-imx_v2014.04_3.10.53_1.1.0_ga, smarc-emmc-imx_v2014.04_3.14.28_1.0.0_ga, smarc-imx-l5.0.0_1.0.0-ga, smarc-imx6_v2018.03_4.14.98_2.0.0_ga, smarc-imx7_v2017.03_4.9.11_1.0.0_ga, smarc-imx7_v2018.03_4.14.98_2.0.0_ga, smarc-imx_v2014.04_3.14.28_1.0.0_ga, smarc-imx_v2015.04_4.1.15_1.0.0_ga, smarc-imx_v2017.03_4.9.11_1.0.0_ga, smarc-imx_v2017.03_4.9.88_2.0.0_ga, smarc-imx_v2017.03_o8.1.0_1.3.0_8m, smarc-imx_v2018.03_4.14.78_1.0.0_ga, smarc-m6.0.1_2.1.0-ga, smarc-n7.1.2_2.0.0-ga, smarc-rel_imx_4.1.15_2.0.0_ga, smarc_8m-imx_v2018.03_4.14.98_2.0.0_ga, smarc_8m-imx_v2019.04_4.19.35_1.1.0, smarc_8m_00d0-imx_v2018.03_4.14.98_2.0.0_ga, smarc_8mm-imx_v2018.03_4.14.98_2.0.0_ga, smarc_8mm-imx_v2019.04_4.19.35_1.1.0, smarc_8mm-imx_v2020.04_5.4.24_2.1.0, smarc_8mp_lf_v2020.04, smarc_8mq-imx_v2020.04_5.4.24_2.1.0, smarc_8mq_lf_v2020.04, ti-u-boot-2015.07, u-boot-2013.01.y, v2013.10, v2013.10-smarct33, v2013.10-smartmen, v2014.01, v2014.04, v2014.04-smarct33, v2014.04-smarct33-emmc, v2014.04-smartmen, v2014.07, v2014.07-smarct33, v2014.07-smartmen, v2015.07-smarct33, v2015.07-smarct33-emmc, v2015.07-smarct4x, v2016.05-dlt, v2016.05-smarct3x, v2016.05-smarct3x-emmc, v2016.05-smarct4x, v2017.01-smarct3x, v2017.01-smarct3x-emmc, v2017.01-smarct4x

Merge with /home/wd/git/u-boot/custodian/u-boot-net

Showing 2 changed files Side-by-side Diff

doc/README.NetConsole
... ... @@ -38,6 +38,11 @@
38 38 target IP address (or host name, assuming DNS is working). The script
39 39 can be interrupted by pressing ^T (CTRL-T).
40 40  
  41 +Be aware that in some distributives (Fedora Core 5 at least)
  42 +usage of nc has been changed and -l and -p options are considered
  43 +as mutually exclusive. If nc complains about options provided,
  44 +you can just remove the -p option from the script.
  45 +
41 46 It turns out that 'netcat' cannot be used to listen to broadcast
42 47 packets. We developed our own tool 'ncb' (see tools directory) that
43 48 listens to broadcast packets on a given port and dumps them to the
... ... @@ -1424,6 +1424,26 @@
1424 1424 /* XXX point to ip packet */
1425 1425 (*packetHandler)((uchar *)ip, 0, 0, 0);
1426 1426 return;
  1427 + case ICMP_ECHO_REQUEST:
  1428 +#ifdef ET_DEBUG
  1429 + printf ("Got ICMP ECHO REQUEST, return %d bytes \n",
  1430 + ETHER_HDR_SIZE + len);
  1431 +#endif
  1432 + memcpy (&et->et_dest[0], &et->et_src[0], 6);
  1433 + memcpy (&et->et_src[ 0], NetOurEther, 6);
  1434 +
  1435 + ip->ip_sum = 0;
  1436 + ip->ip_off = 0;
  1437 + NetCopyIP((void*)&ip->ip_dst, &ip->ip_src);
  1438 + NetCopyIP((void*)&ip->ip_src, &NetOurIP);
  1439 + ip->ip_sum = ~NetCksum((uchar *)ip, IP_HDR_SIZE_NO_UDP >> 1);
  1440 +
  1441 + icmph->type = ICMP_ECHO_REPLY;
  1442 + icmph->checksum = 0;
  1443 + icmph->checksum = ~NetCksum((uchar *)icmph,
  1444 + (len - IP_HDR_SIZE_NO_UDP) >> 1);
  1445 + (void) eth_send((uchar *)et, ETHER_HDR_SIZE + len);
  1446 + return;
1427 1447 #endif
1428 1448 default:
1429 1449 return;