Searched refs:mhr (Results 1 – 6 of 6) sorted by relevance
/Zephyr-latest/subsys/net/l2/ieee802154/ |
D | ieee802154_frame.c | 237 static inline bool validate_mac_command_cfi_to_mhr(struct ieee802154_mhr *mhr, in validate_mac_command_cfi_to_mhr() argument 242 if (mhr->fs->fc.ar != ack_requested || mhr->fs->fc.pan_id_comp == has_pan_id) { in validate_mac_command_cfi_to_mhr() 246 if (!(BIT(mhr->fs->fc.src_addr_mode) & src_bf) || in validate_mac_command_cfi_to_mhr() 247 !(BIT(mhr->fs->fc.dst_addr_mode) & dst_bf)) { in validate_mac_command_cfi_to_mhr() 252 if (mhr->src_addr->plain.pan_id != IEEE802154_BROADCAST_PAN_ID) { in validate_mac_command_cfi_to_mhr() 259 if (mhr->dst_addr->plain.addr.short_addr != IEEE802154_BROADCAST_ADDRESS) { in validate_mac_command_cfi_to_mhr() 312 if (mpdu->mhr.fs->fc.dst_addr_mode == IEEE802154_ADDR_MODE_NONE) { in validate_mac_command() 337 if (mpdu->mhr.fs->fc.dst_addr_mode == IEEE802154_ADDR_MODE_SHORT) { in validate_mac_command() 360 if (!validate_mac_command_cfi_to_mhr(&mpdu->mhr, ack_requested, has_pan_id, src_bf, in validate_mac_command() 374 uint8_t type = mpdu->mhr.fs->fc.frame_type; in validate_payload_and_mfr() [all …]
|
D | ieee802154.c | 79 if (!mpdu->mhr.fs->fc.ar) { in ieee802154_acknowledge() 89 if (ieee802154_create_ack_frame(iface, pkt, mpdu->mhr.fs->sequence)) { in ieee802154_acknowledge() 289 static bool ieee802154_check_dst_addr(struct net_if *iface, struct ieee802154_mhr *mhr) in ieee802154_check_dst_addr() argument 291 struct ieee802154_address_field_plain *dst_plain = &mhr->dst_addr->plain; in ieee802154_check_dst_addr() 299 if (mhr->fs->fc.dst_addr_mode == IEEE802154_ADDR_MODE_NONE) { in ieee802154_check_dst_addr() 300 if (mhr->fs->fc.frame_version < IEEE802154_VERSION_802154 && in ieee802154_check_dst_addr() 301 mhr->fs->fc.frame_type == IEEE802154_FRAME_TYPE_BEACON) { in ieee802154_check_dst_addr() 322 if (mhr->fs->fc.dst_addr_mode == IEEE802154_ADDR_MODE_SHORT) { in ieee802154_check_dst_addr() 333 } else if (mhr->fs->fc.dst_addr_mode == IEEE802154_ADDR_MODE_EXTENDED) { in ieee802154_check_dst_addr() 377 !ieee802154_check_dst_addr(iface, &mpdu.mhr)) { in ieee802154_recv() [all …]
|
D | ieee802154_mgmt.c | 52 ctx->scan_ctx->pan_id = mpdu->mhr.src_addr->plain.pan_id; in ieee802154_handle_beacon() 55 if (mpdu->mhr.fs->fc.src_addr_mode == IEEE802154_ADDR_MODE_SHORT) { in ieee802154_handle_beacon() 58 sys_le16_to_cpu(mpdu->mhr.src_addr->plain.addr.short_addr); in ieee802154_handle_beacon() 62 mpdu->mhr.src_addr->plain.addr.ext_addr, in ieee802154_handle_beacon() 338 if (mpdu->mhr.fs->fc.src_addr_mode != in ieee802154_handle_mac_command() 340 mpdu->mhr.fs->fc.dst_addr_mode != in ieee802154_handle_mac_command() 342 mpdu->mhr.fs->fc.ar != 1 || in ieee802154_handle_mac_command() 343 mpdu->mhr.fs->fc.pan_id_comp != 1 || in ieee802154_handle_mac_command() 344 mpdu->mhr.dst_addr->plain.pan_id != sys_cpu_to_le16(ctx->pan_id) || in ieee802154_handle_mac_command() 368 memcpy(ctx->coord_ext_addr, mpdu->mhr.src_addr->comp.addr.ext_addr, in ieee802154_handle_mac_command() [all …]
|
D | ieee802154_frame.h | 442 struct ieee802154_mhr mhr; member
|
/Zephyr-latest/tests/net/ieee802154/l2/src/ |
D | ieee802154_shell_test.c | 87 zassert_equal(mpdu->mhr.fs->fc.dst_addr_mode, IEEE802154_ADDR_MODE_SHORT, in test_beacon_request() 89 zassert_equal(mpdu->mhr.dst_addr->plain.addr.short_addr, IEEE802154_BROADCAST_ADDRESS, in test_beacon_request() 91 zassert_equal(mpdu->mhr.dst_addr->plain.pan_id, IEEE802154_BROADCAST_PAN_ID, in test_beacon_request() 100 mpdu->mhr.fs->fc.frame_version, IEEE802154_VERSION_802154_2006, in test_association_request() 102 zassert_equal(mpdu->mhr.fs->fc.frame_type, IEEE802154_FRAME_TYPE_MAC_COMMAND, in test_association_request() 104 zassert_equal(mpdu->mhr.fs->fc.ar, true, "Association Request: must request ACK."); in test_association_request() 119 zassert_equal(mpdu->mhr.fs->fc.frame_version, IEEE802154_VERSION_802154_2006, in test_disassociation_notification() 122 zassert_equal(mpdu->mhr.fs->fc.frame_type, IEEE802154_FRAME_TYPE_MAC_COMMAND, in test_disassociation_notification() 124 zassert_equal(mpdu->mhr.fs->fc.ar, true, "Disassociation Notification: must request ACK."); in test_disassociation_notification()
|
D | ieee802154_test.c | 443 if (mpdu.mhr.fs != t->mhr_check.fc_seq || in test_packet_parsing() 444 mpdu.mhr.dst_addr != t->mhr_check.dst_addr || in test_packet_parsing() 445 mpdu.mhr.src_addr != t->mhr_check.src_addr) { in test_packet_parsing() 447 mpdu.mhr.dst_addr, t->mhr_check.dst_addr, in test_packet_parsing() 448 mpdu.mhr.src_addr, t->mhr_check.src_addr); in test_packet_parsing() 454 if (mpdu.mhr.fs->sequence != t->sequence) { in test_packet_parsing() 556 if (!ieee802154_create_ack_frame(net_iface, one_ack_pkt, mpdu.mhr.fs->sequence)) { in test_wait_for_ack() 1184 if (memcmp(mpdu.mhr.fs, t->mhr_check.fc_seq, in test_recv_and_send_ack_reply() 1190 if (mpdu.mhr.fs->sequence != t->sequence) { in test_recv_and_send_ack_reply()
|