/Zephyr-Core-2.7.6/subsys/stats/ |
D | stats.c | 19 stats_get_name(const struct stats_hdr *hdr, int idx) in stats_get_name() argument 31 off = sizeof(*hdr) + idx * hdr->s_size; in stats_get_name() 32 for (i = 0; i < hdr->s_map_cnt; i++) { in stats_get_name() 33 cur = hdr->s_map + i; in stats_get_name() 44 stats_get_off(const struct stats_hdr *hdr, int idx) in stats_get_off() argument 46 return sizeof(*hdr) + idx * hdr->s_size; in stats_get_off() 96 stats_walk(struct stats_hdr *hdr, stats_walk_fn *walk_func, void *arg) in stats_walk() argument 103 for (i = 0; i < hdr->s_cnt; i++) { in stats_walk() 104 name = stats_get_name(hdr, i); in stats_walk() 111 rc = walk_func(hdr, arg, name, stats_get_off(hdr, i)); in stats_walk() [all …]
|
/Zephyr-Core-2.7.6/subsys/net/l2/ethernet/gptp/ |
D | gptp_messages.c | 29 struct gptp_hdr *hdr = GPTP_HDR(pkt); \ 31 if (hdr->message_type == GPTP_ANNOUNCE_MESSAGE) { \ 42 ntohs(hdr->sequence_id), pkt); \ 53 ntohs(hdr->sequence_id), pkt); \ 85 struct gptp_hdr *hdr; in gptp_sync_timestamp_callback() local 95 hdr = GPTP_HDR(pkt); in gptp_sync_timestamp_callback() 98 if (hdr->message_type == GPTP_SYNC_MESSAGE) { in gptp_sync_timestamp_callback() 113 struct gptp_hdr *hdr; in gptp_pdelay_response_timestamp_callback() local 121 hdr = GPTP_HDR(pkt); in gptp_pdelay_response_timestamp_callback() 124 if (hdr->message_type == GPTP_PATH_DELAY_RESP_MESSAGE) { in gptp_pdelay_response_timestamp_callback() [all …]
|
/Zephyr-Core-2.7.6/drivers/bluetooth/hci/ |
D | h5.c | 75 #define H5_HDR_SEQ(hdr) ((hdr)[0] & 0x07) argument 76 #define H5_HDR_ACK(hdr) (((hdr)[0] >> 3) & 0x07) argument 77 #define H5_HDR_CRC(hdr) (((hdr)[0] >> 6) & 0x01) argument 78 #define H5_HDR_RELIABLE(hdr) (((hdr)[0] >> 7) & 0x01) argument 79 #define H5_HDR_PKT_TYPE(hdr) ((hdr)[1] & 0x0f) argument 80 #define H5_HDR_LEN(hdr) ((((hdr)[1] >> 4) & 0x0f) + ((hdr)[2] << 4)) argument 82 #define H5_SET_SEQ(hdr, seq) ((hdr)[0] |= (seq)) argument 83 #define H5_SET_ACK(hdr, ack) ((hdr)[0] |= (ack) << 3) argument 84 #define H5_SET_RELIABLE(hdr) ((hdr)[0] |= 1 << 7) argument 85 #define H5_SET_TYPE(hdr, type) ((hdr)[1] |= type) argument [all …]
|
D | rpmsg.c | 58 struct bt_hci_evt_hdr hdr; in bt_rpmsg_evt_recv() local 61 if (remaining < sizeof(hdr)) { in bt_rpmsg_evt_recv() 68 memcpy((void *)&hdr, data, sizeof(hdr)); in bt_rpmsg_evt_recv() 69 data += sizeof(hdr); in bt_rpmsg_evt_recv() 70 remaining -= sizeof(hdr); in bt_rpmsg_evt_recv() 72 if (remaining != hdr.len) { in bt_rpmsg_evt_recv() 76 BT_DBG("len %u", hdr.len); in bt_rpmsg_evt_recv() 78 buf = bt_buf_get_evt(hdr.evt, discardable, K_NO_WAIT); in bt_rpmsg_evt_recv() 88 net_buf_add_mem(buf, &hdr, sizeof(hdr)); in bt_rpmsg_evt_recv() 96 struct bt_hci_acl_hdr hdr; in bt_rpmsg_acl_recv() local [all …]
|
D | hci_esp32.c | 58 struct bt_hci_evt_hdr hdr; in bt_esp_evt_recv() local 61 if (remaining < sizeof(hdr)) { in bt_esp_evt_recv() 68 memcpy((void *)&hdr, data, sizeof(hdr)); in bt_esp_evt_recv() 69 data += sizeof(hdr); in bt_esp_evt_recv() 70 remaining -= sizeof(hdr); in bt_esp_evt_recv() 72 if (remaining != hdr.len) { in bt_esp_evt_recv() 76 BT_DBG("len %u", hdr.len); in bt_esp_evt_recv() 78 buf = bt_buf_get_evt(hdr.evt, discardable, K_NO_WAIT); in bt_esp_evt_recv() 88 net_buf_add_mem(buf, &hdr, sizeof(hdr)); in bt_esp_evt_recv() 96 struct bt_hci_acl_hdr hdr; in bt_esp_acl_recv() local [all …]
|
D | h4.c | 58 uint8_t hdr[4]; member 107 struct bt_hci_acl_hdr *hdr = &rx.acl; in get_acl_hdr() local 108 int to_read = sizeof(*hdr) - rx.remaining; in get_acl_hdr() 110 rx.remaining -= uart_fifo_read(h4_dev, (uint8_t *)hdr + to_read, in get_acl_hdr() 113 rx.remaining = sys_le16_to_cpu(hdr->len); in get_acl_hdr() 121 struct bt_hci_iso_hdr *hdr = &rx.iso; in get_iso_hdr() local 122 unsigned int to_read = sizeof(*hdr) - rx.remaining; in get_iso_hdr() 124 rx.remaining -= uart_fifo_read(h4_dev, (uint8_t *)hdr + to_read, in get_iso_hdr() 127 rx.remaining = sys_le16_to_cpu(hdr->len); in get_iso_hdr() 135 struct bt_hci_evt_hdr *hdr = &rx.evt; in get_evt_hdr() local [all …]
|
/Zephyr-Core-2.7.6/subsys/net/ip/ |
D | ipv6.c | 127 struct net_ipv6_hdr *hdr, in ipv6_drop_on_unknown_option() argument 154 if (net_ipv6_is_addr_mcast(&hdr->dst)) { in ipv6_drop_on_unknown_option() 170 struct net_ipv6_hdr *hdr, in ipv6_handle_ext_hdr_options() argument 233 if (ipv6_drop_on_unknown_option(pkt, hdr, in ipv6_handle_ext_hdr_options() 283 struct net_ipv6_hdr *hdr) in ipv6_route_packet() argument 291 found = net_route_get_info(NULL, &hdr->dst, &route, in ipv6_route_packet() 295 &hdr->dst, &route, &nexthop); in ipv6_route_packet() 302 (net_ipv6_is_ll_addr(&hdr->src) || in ipv6_route_packet() 303 net_ipv6_is_ll_addr(&hdr->dst))) { in ipv6_route_packet() 305 ipv6_no_route_info(pkt, &hdr->src, &hdr->dst); in ipv6_route_packet() [all …]
|
D | ipv4.c | 221 struct net_ipv4_hdr *hdr; in net_ipv4_input() local 235 hdr = (struct net_ipv4_hdr *)net_pkt_get_data(pkt, &ipv4_access); in net_ipv4_input() 236 if (!hdr) { in net_ipv4_input() 241 hdr_len = (hdr->vhl & NET_IPV4_IHL_MASK) * 4U; in net_ipv4_input() 254 if (hdr->ttl == 0) { in net_ipv4_input() 260 pkt_len = ntohs(hdr->len); in net_ipv4_input() 270 if (net_ipv4_is_addr_loopback(&hdr->dst) || in net_ipv4_input() 271 net_ipv4_is_addr_loopback(&hdr->src)) { in net_ipv4_input() 276 if (net_ipv4_is_my_addr(&hdr->src)) { in net_ipv4_input() 282 if (net_ipv4_is_addr_mcast(&hdr->src)) { in net_ipv4_input() [all …]
|
/Zephyr-Core-2.7.6/subsys/bluetooth/host/ |
D | avdtp.c | 35 #define AVDTP_GET_TR_ID(hdr) ((hdr & 0xf0) >> AVDTP_TID_POSITION) argument 36 #define AVDTP_GET_MSG_TYPE(hdr) (hdr & 0x03) argument 37 #define AVDTP_GET_PKT_TYPE(hdr) ((hdr & 0x0c) >> AVDTP_PKT_POSITION) argument 62 struct bt_avdtp_single_sig_hdr *hdr; in avdtp_send() local 64 hdr = (struct bt_avdtp_single_sig_hdr *)buf->data; in avdtp_send() 74 req->sig = AVDTP_GET_SIG_ID(hdr->signal_id); in avdtp_send() 75 req->tid = AVDTP_GET_TR_ID(hdr->hdr); in avdtp_send() 90 struct bt_avdtp_single_sig_hdr *hdr; in avdtp_create_pdu() local 96 hdr = net_buf_add(buf, sizeof(*hdr)); in avdtp_create_pdu() 98 hdr->hdr = (msg_type | pkt_type << AVDTP_PKT_POSITION | in avdtp_create_pdu() [all …]
|
D | monitor.c | 90 static void encode_drops(struct bt_monitor_hdr *hdr, uint8_t type, in encode_drops() argument 97 hdr->ext[hdr->hdr_len++] = type; in encode_drops() 98 hdr->ext[hdr->hdr_len++] = MIN(count, 255); in encode_drops() 108 static inline void encode_hdr(struct bt_monitor_hdr *hdr, uint32_t timestamp, in encode_hdr() argument 113 hdr->opcode = sys_cpu_to_le16(opcode); in encode_hdr() 114 hdr->flags = 0U; in encode_hdr() 116 ts = (void *)hdr->ext; in encode_hdr() 119 hdr->hdr_len = sizeof(*ts); in encode_hdr() 121 encode_drops(hdr, BT_MONITOR_COMMAND_DROPS, &drops.cmd); in encode_hdr() 122 encode_drops(hdr, BT_MONITOR_EVENT_DROPS, &drops.evt); in encode_hdr() [all …]
|
D | l2cap_br.c | 269 struct bt_l2cap_sig_hdr *hdr; in l2cap_br_get_info() local 291 hdr = net_buf_add(buf, sizeof(*hdr)); in l2cap_br_get_info() 292 hdr->code = BT_L2CAP_INFO_REQ; in l2cap_br_get_info() 293 hdr->ident = l2cap->info_ident; in l2cap_br_get_info() 294 hdr->len = sys_cpu_to_le16(sizeof(*info)); in l2cap_br_get_info() 526 struct bt_l2cap_sig_hdr *hdr; in l2cap_br_conf() local 532 hdr = net_buf_add(buf, sizeof(*hdr)); in l2cap_br_conf() 533 hdr->code = BT_L2CAP_CONF_REQ; in l2cap_br_conf() 534 hdr->ident = l2cap_br_get_ident(); in l2cap_br_conf() 548 hdr->len = sys_cpu_to_le16(buf->len - sizeof(*hdr)); in l2cap_br_conf() [all …]
|
D | hci_ecc.c | 77 struct bt_hci_evt_hdr *hdr; in send_cmd_status() local 85 hdr = net_buf_add(buf, sizeof(*hdr)); in send_cmd_status() 86 hdr->evt = BT_HCI_EVT_CMD_STATUS; in send_cmd_status() 87 hdr->len = sizeof(*evt); in send_cmd_status() 127 struct bt_hci_evt_hdr *hdr; in emulate_le_p256_public_key_cmd() local 137 hdr = net_buf_add(buf, sizeof(*hdr)); in emulate_le_p256_public_key_cmd() 138 hdr->evt = BT_HCI_EVT_LE_META_EVENT; in emulate_le_p256_public_key_cmd() 139 hdr->len = sizeof(*meta) + sizeof(*evt); in emulate_le_p256_public_key_cmd() 167 struct bt_hci_evt_hdr *hdr; in emulate_le_generate_dhkey() local 186 hdr = net_buf_add(buf, sizeof(*hdr)); in emulate_le_generate_dhkey() [all …]
|
D | hci_common.c | 13 struct bt_hci_evt_hdr *hdr; in bt_hci_evt_create() local 18 hdr = net_buf_add(buf, sizeof(*hdr)); in bt_hci_evt_create() 19 hdr->evt = evt; in bt_hci_evt_create() 20 hdr->len = len; in bt_hci_evt_create()
|
/Zephyr-Core-2.7.6/samples/bluetooth/hci_rpmsg/src/ |
D | main.c | 50 struct bt_hci_cmd_hdr *hdr = (void *)data; in hci_rpmsg_cmd_recv() local 53 if (remaining < sizeof(*hdr)) { in hci_rpmsg_cmd_recv() 58 buf = bt_buf_get_tx(BT_BUF_CMD, K_NO_WAIT, hdr, sizeof(*hdr)); in hci_rpmsg_cmd_recv() 60 data += sizeof(*hdr); in hci_rpmsg_cmd_recv() 61 remaining -= sizeof(*hdr); in hci_rpmsg_cmd_recv() 67 if (remaining != hdr->param_len) { in hci_rpmsg_cmd_recv() 73 LOG_DBG("len %u", hdr->param_len); in hci_rpmsg_cmd_recv() 81 struct bt_hci_acl_hdr *hdr = (void *)data; in hci_rpmsg_acl_recv() local 84 if (remaining < sizeof(*hdr)) { in hci_rpmsg_acl_recv() 89 buf = bt_buf_get_tx(BT_BUF_ACL_OUT, K_NO_WAIT, hdr, sizeof(*hdr)); in hci_rpmsg_acl_recv() [all …]
|
/Zephyr-Core-2.7.6/tests/crypto/tinycrypt/src/ |
D | ccm_mode.c | 73 const uint8_t *hdr, size_t hlen, in do_test() argument 92 hdr, hlen, data, dlen, &c); in do_test() 107 hdr, hlen, ciphertext, in do_test() 135 const uint8_t hdr[HEADER_LEN] = { in test_ccm_vector_1() local 154 result = do_test(key, nonce, sizeof(nonce), hdr, sizeof(hdr), in test_ccm_vector_1() 173 const uint8_t hdr[HEADER_LEN] = { in test_ccm_vector_2() local 192 result = do_test(key, nonce, sizeof(nonce), hdr, sizeof(hdr), in test_ccm_vector_2() 211 const uint8_t hdr[HEADER_LEN] = { in test_ccm_vector_3() local 232 result = do_test(key, nonce, sizeof(nonce), hdr, sizeof(hdr), data, in test_ccm_vector_3() 251 const uint8_t hdr[HEADER_LEN] = { in test_ccm_vector_4() local [all …]
|
/Zephyr-Core-2.7.6/subsys/bluetooth/controller/ll_sw/ |
D | ull_internal.h | 13 static inline uint8_t ull_ref_get(struct ull_hdr *hdr) in ull_ref_get() argument 15 return hdr->ref; in ull_ref_get() 18 static inline uint8_t ull_ref_inc(struct ull_hdr *hdr) in ull_ref_inc() argument 20 return ++hdr->ref; in ull_ref_inc() 23 static inline uint8_t ull_ref_dec(struct ull_hdr *hdr) in ull_ref_dec() argument 25 return hdr->ref--; in ull_ref_dec() 28 static inline void ull_hdr_init(struct ull_hdr *hdr) in ull_hdr_init() argument 30 hdr->ref = 0U; in ull_hdr_init() 31 hdr->disabled_cb = hdr->disabled_param = NULL; in ull_hdr_init()
|
D | lll_common.c | 46 struct lll_hdr *hdr = prepare_param->param; in lll_prepare() local 59 prio = MAX(-127, prio - hdr->score - hdr->latency); in lll_prepare() 85 struct lll_hdr *hdr = param; in lll_done_score() local 87 if (!hdr) { in lll_done_score() 92 hdr->score = 0; in lll_done_score() 93 hdr->latency = 0; in lll_done_score() 95 hdr->score++; in lll_done_score()
|
/Zephyr-Core-2.7.6/drivers/usb/device/ |
D | usb_dc_native_posix_adapt.c | 48 static void usbip_header_dump(struct usbip_header *hdr) in usbip_header_dump() argument 50 LOG_DBG("cmd %x seq %u dir %u ep %x", ntohl(hdr->common.command), in usbip_header_dump() 51 ntohl(hdr->common.seqnum), ntohl(hdr->common.direction), in usbip_header_dump() 52 ntohl(hdr->common.ep)); in usbip_header_dump() 54 switch (ntohl(hdr->common.command)) { in usbip_header_dump() 57 ntohl(hdr->u.submit.transfer_flags), in usbip_header_dump() 58 ntohl(hdr->u.submit.number_of_packets), in usbip_header_dump() 59 ntohl(hdr->u.submit.interval), in usbip_header_dump() 60 ntohl(hdr->u.submit.transfer_buffer_length)); in usbip_header_dump() 63 LOG_DBG("seq %d", ntohl(hdr->u.unlink.seqnum)); in usbip_header_dump() [all …]
|
/Zephyr-Core-2.7.6/samples/net/zperf/src/ |
D | zperf_udp_uploader.c | 31 struct zperf_udp_datagram *hdr; in zperf_upload_decode_stat() local 34 hdr = (struct zperf_udp_datagram *) in zperf_upload_decode_stat() 36 if (!hdr) { in zperf_upload_decode_stat() 84 struct zperf_client_hdr_v1 *hdr; in zperf_upload_fin() local 98 hdr = (struct zperf_client_hdr_v1 *)(sample_packet + in zperf_upload_fin() 106 hdr->flags = 0; in zperf_upload_fin() 107 hdr->num_of_threads = htonl(1); in zperf_upload_fin() 108 hdr->port = 0; in zperf_upload_fin() 109 hdr->buffer_len = sizeof(sample_packet) - in zperf_upload_fin() 110 sizeof(*datagram) - sizeof(*hdr); in zperf_upload_fin() [all …]
|
/Zephyr-Core-2.7.6/tests/bluetooth/tester/src/ |
D | bttester.c | 35 struct btp_hdr hdr; member 188 len = sys_le16_to_cpu(cmd->hdr.len); in cmd_handler() 194 switch (cmd->hdr.service) { in cmd_handler() 196 handle_core(cmd->hdr.opcode, cmd->hdr.index, in cmd_handler() 197 cmd->hdr.data, len); in cmd_handler() 200 tester_handle_gap(cmd->hdr.opcode, cmd->hdr.index, in cmd_handler() 201 cmd->hdr.data, len); in cmd_handler() 204 tester_handle_gatt(cmd->hdr.opcode, cmd->hdr.index, in cmd_handler() 205 cmd->hdr.data, len); in cmd_handler() 209 tester_handle_l2cap(cmd->hdr.opcode, cmd->hdr.index, in cmd_handler() [all …]
|
/Zephyr-Core-2.7.6/include/logging/ |
D | log_msg.h | 141 struct log_msg_hdr hdr; /*!< Message header. */ member 193 return msg->hdr.ids.domain_id; in log_msg_domain_id_get() 204 return msg->hdr.ids.source_id; in log_msg_source_id_get() 215 return msg->hdr.ids.level; in log_msg_level_get() 226 return msg->hdr.timestamp; in log_msg_timestamp_get() 238 return (msg->hdr.params.generic.type == LOG_MSG_TYPE_STD); in log_msg_is_std() 328 msg->hdr.ref_cnt = 1; in z_log_msg_std_alloc() 329 msg->hdr.params.raw = 0U; in z_log_msg_std_alloc() 330 msg->hdr.params.std.type = LOG_MSG_TYPE_STD; in z_log_msg_std_alloc() 334 msg->hdr.ids.level = 0; in z_log_msg_std_alloc() [all …]
|
/Zephyr-Core-2.7.6/tests/net/arp/src/ |
D | main.c | 88 struct net_eth_hdr *hdr; in tester_send() local 95 hdr = (struct net_eth_hdr *)net_pkt_data(pkt); in tester_send() 97 if (ntohs(hdr->type) == NET_ETH_PTYPE_ARP) { in tester_send() 110 if (!req_test && memcmp(&hdr->dst, &hwaddr, in tester_send() 116 (uint8_t *)&hdr->dst, in tester_send() 128 if (memcmp(&hdr->src, &hwaddr, in tester_send() 134 (uint8_t *)&hdr->src, in tester_send() 176 struct net_arp_hdr *hdr; in prepare_arp_reply() local 200 hdr = NET_ARP_HDR(pkt); in prepare_arp_reply() 202 hdr->hwtype = htons(NET_ARP_HTYPE_ETH); in prepare_arp_reply() [all …]
|
/Zephyr-Core-2.7.6/soc/xtensa/intel_adsp/common/ |
D | trace_out.c | 37 struct slot_hdr hdr; member 77 slot(0)->hdr.magic = 0; in intel_adsp_trace_out() 78 slot(0)->hdr.id = 0; in intel_adsp_trace_out() 113 uint16_t new_id = s->hdr.id + 1; in intel_adsp_trace_out() 115 slot(next_slot)->hdr.id = new_id; in intel_adsp_trace_out() 116 slot(next_slot)->hdr.magic = SLOT_MAGIC; in intel_adsp_trace_out() 119 s->hdr.id = new_id; in intel_adsp_trace_out() 120 s->hdr.magic = SLOT_MAGIC; in intel_adsp_trace_out()
|
/Zephyr-Core-2.7.6/samples/net/sockets/net_mgmt/src/ |
D | main.c | 73 struct net_mgmt_msghdr *hdr) in get_ip_addr() argument 77 buf = net_addr_ntop(family, hdr->nm_msg, ipaddr, len); in get_ip_addr() 116 struct net_mgmt_msghdr *hdr; in listener() local 128 hdr = (struct net_mgmt_msghdr *)buf; in listener() 130 if (hdr->nm_msg_version != NET_MGMT_SOCKET_VERSION_1) { in listener() 140 AF_INET6, hdr)); in listener() 146 AF_INET6, hdr)); in listener() 152 AF_INET6, hdr)); in listener()
|
/Zephyr-Core-2.7.6/include/net/ |
D | udp.h | 55 struct net_udp_hdr *hdr); 58 struct net_udp_hdr *hdr) 81 struct net_udp_hdr *hdr); 84 struct net_udp_hdr *hdr) in net_udp_set_hdr() argument
|