Skip to content

Commit f94a698

Browse files
committed
uefi-test-runner: SNP: add more constants
1 parent 9099695 commit f94a698

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;
@@ -119,7 +120,6 @@ pub fn test() {
119120
\xa9\xe4\
120121
\x04\x01\x02\x03\x04";
121122

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

0 commit comments

Comments
 (0)