Skip to content

Commit 01ec4fe

Browse files
committed
uefi-test-runner: SNP: add more constants
1 parent f9e383a commit 01ec4fe

File tree

1 file changed

+3
-3
lines changed
  • uefi-test-runner/src/proto/network

1 file changed

+3
-3
lines changed

uefi-test-runner/src/proto/network/snp.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use uefi_raw::protocol::network::snp::NetworkState;
1010

1111
/// The MAC address configured for the interface.
1212
const EXPECTED_MAC: [u8; 6] = [0x52, 0x54, 0, 0, 0, 0x1];
13+
const ETHERNET_PROTOCOL_IPV4: u16 = 0x0800;
1314

1415
fn find_network_device() -> Option<ScopedProtocol<SimpleNetwork>> {
1516
let mut maybe_handle = None;
@@ -118,7 +119,6 @@ pub fn test() {
118119
\xa9\xe4\
119120
\x04\x01\x02\x03\x04";
120121

121-
let dest_addr = MacAddress([0xffu8; 32]);
122122
assert!(
123123
!simple_network
124124
.get_interrupt_status()
@@ -132,8 +132,8 @@ pub fn test() {
132132
simple_network.mode().media_header_size as usize,
133133
payload,
134134
None,
135-
Some(dest_addr),
136-
Some(0x0800),
135+
Some(simple_network.mode().broadcast_address),
136+
Some(ETHERNET_PROTOCOL_IPV4),
137137
)
138138
.expect("Failed to transmit frame");
139139

0 commit comments

Comments
 (0)