rustflexstack/link_layer/packet_consts.rs
1// SPDX-License-Identifier: AGPL-3.0-only
2// Copyright (C) 2024 Fundació Privada Internet i Innovació Digital a Catalunya (i2CAT)
3
4pub const ETH_P_GEONET: u16 = 0x8947;
5
6#[cfg(test)]
7mod tests {
8 use super::*;
9
10 #[test]
11 fn eth_p_geonet_value() {
12 assert_eq!(ETH_P_GEONET, 0x8947);
13 }
14
15 #[test]
16 fn eth_p_geonet_big_endian_bytes() {
17 let bytes = ETH_P_GEONET.to_be_bytes();
18 assert_eq!(bytes, [0x89, 0x47]);
19 }
20}