On 04/04/16 10:44, Bhupesh Sharma wrote: >> From: David Van Arnem >> The ping command allows you to specify the interface you would like to >> use with the -s flag, e.g. >> >> ping -s eth0 192.168.1.1 >> >> or >> >> ping -s eth1 192.168.1.1 >> >> The options for ping can be displayed in the Shell with "help ping". > > Hi David, > > Many thanks. It looks like ping -s is not a valid syntax. It may be that I am > using a older ShellPkg: > > FS0:\> ping -s eth1 192.168.1.1 > ping: Invalid argument - '-s' > > Looking at the help, I figured out that I need to use -_s option instead: > > FS0:\> help ping > Pings the target host with an IPv4 or IPv6 stack. > > PING [-_ip6] [-_s SourceIp] [-n count] [-l size] TargetIp ... > EXAMPLES: > ... > * To ping the target host by specifying the source adapter as IPv4 address: > fs0:\> ping -_s 202.120.100.12 202.120.100.1 > --- > This is a successful test: > > FS0:\> ping -_s 192.168.1.8 192.168.1.1 > InstallProtocolInterface: 41D94CD2-35B6-455A-8258-D4E51334AADD 836E623BE0 > Ping 192.168.1.1 16 data bytes. > 16 bytes from 192.168.1.1 : icmp_seq=1 ttl=0 time=1ms > 16 bytes from 192.168.1.1 : icmp_seq=2 ttl=0 time=2ms > 16 bytes from 192.168.1.1 : icmp_seq=3 ttl=0 time=2ms > 16 bytes from 192.168.1.1 : icmp_seq=4 ttl=0 time=2ms > 16 bytes from 192.168.1.1 : icmp_seq=5 ttl=0 time=2ms > 16 bytes from 192.168.1.1 : icmp_seq=6 ttl=0 time=2ms > 16 bytes from 192.168.1.1 : icmp_seq=7 ttl=0 time=1ms > > Now, this leaves me wondering why the Shell Specifications 2.1 contain an old > syntax for the PING command? > Ping [-n count] [-l size] TargetIp > > Will someone care to update it to reflect the correct options, in an upcoming > Shell specification version?
The most recent version (that I have) of the Shell Spec is 2.2. That version lists both "ping" and "ping6", and the synopsis for "ping" is: Ping [-n count] [-l size] [-s SourceIp] TargetIp I recommend that you (a) refresh your shell spec, (b) always build the Shell application from source, in your platform DSC. ... In general, I wish new versions of the specifications (UEFI, PI, edk2), and new whitepapers in the "Tour Beyond BIOS" series, were announced on edk2-devel :( Tony, do you think you could grease some gears for such announcements? Thank you, Laszlo _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel