diff options
author | Joe Hershberger <joe.hershberger@ni.com> | 2018-09-26 16:49:00 -0500 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2018-10-10 12:29:00 -0500 |
commit | 45988dae4cf05f783e40e027c83594a9dc6551cd (patch) | |
tree | def10679c4392ebc7282d80efb200d6cbba534e4 /arch/sandbox/include | |
parent | 9cbe5972c3c00e974482181cd4062d9229a9b7d5 (diff) |
test: eth: Add a test for ARP requests
This tests that ARP requests made to this target's IP address are
responded-to by the target when it is doing other networking operations.
This currently corrupts the ongoing operation of the device if it
happens to be awaiting an ARP reply of its own to whatever serverip it
is attempting to communicate with. In the test, add an expectation that
the user operation (ping, in this case) will fail. A later patch will
address this problem.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/sandbox/include')
-rw-r--r-- | arch/sandbox/include/asm/eth.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/sandbox/include/asm/eth.h b/arch/sandbox/include/asm/eth.h index a6adec4e83..d068486f0b 100644 --- a/arch/sandbox/include/asm/eth.h +++ b/arch/sandbox/include/asm/eth.h @@ -39,6 +39,16 @@ int sandbox_eth_arp_req_to_reply(struct udevice *dev, void *packet, int sandbox_eth_ping_req_to_reply(struct udevice *dev, void *packet, unsigned int len); +/* + * sandbox_eth_recv_arp_req() + * + * Inject an ARP request for this target + * + * @dev: device that received the packet + * @return 0 if injected, -EOVERFLOW if not + */ +int sandbox_eth_recv_arp_req(struct udevice *dev); + /** * A packet handler * |