/Zephyr-latest/subsys/net/lib/lwm2m/ |
D | lwm2m_rw_oma_tlv.c | 88 static uint8_t get_len_type(const struct oma_tlv *tlv) in get_len_type() argument 90 if (tlv->length < 8) { in get_len_type() 92 } else if (tlv->length < 0x100) { in get_len_type() 94 } else if (tlv->length < 0x10000) { in get_len_type() 113 static void tlv_setup(struct oma_tlv *tlv, uint8_t type, uint16_t id, in tlv_setup() argument 116 if (tlv) { in tlv_setup() 117 tlv->type = type; in tlv_setup() 118 tlv->id = id; in tlv_setup() 119 tlv->length = buflen; in tlv_setup() 152 static int oma_tlv_put(const struct oma_tlv *tlv, in oma_tlv_put() argument [all …]
|
/Zephyr-latest/subsys/net/lib/ptp/ |
D | tlv.c | 73 container = CONTAINER_OF((void *)mgmt_tlv, struct ptp_tlv_container, tlv); in tlv_mgmt_post_recv() 185 container = CONTAINER_OF((void *)mgmt_tlv, struct ptp_tlv_container, tlv); in tlv_mgmt_post_recv() 273 container = CONTAINER_OF((void *)mgmt_tlv, struct ptp_tlv_container, tlv); in tlv_mgmt_pre_send() 355 enum ptp_tlv_type ptp_tlv_type(struct ptp_tlv *tlv) in ptp_tlv_type() argument 357 return (enum ptp_tlv_type)tlv->type; in ptp_tlv_type() 360 int ptp_tlv_post_recv(struct ptp_tlv *tlv) in ptp_tlv_post_recv() argument 366 switch (ptp_tlv_type(tlv)) { in ptp_tlv_post_recv() 368 if (tlv->length < (sizeof(struct ptp_tlv_mgmt) - sizeof(struct ptp_tlv))) { in ptp_tlv_post_recv() 371 mgmt = (struct ptp_tlv_mgmt *)tlv; in ptp_tlv_post_recv() 377 if (tlv->length > sizeof(mgmt->id)) { in ptp_tlv_post_recv() [all …]
|
D | msg.c | 158 tlv_container->tlv = (struct ptp_tlv *)suffix; in msg_tlv_post_recv() 159 tlv_container->tlv->type = ntohs(tlv_container->tlv->type); in msg_tlv_post_recv() 160 tlv_container->tlv->length = ntohs(tlv_container->tlv->length); in msg_tlv_post_recv() 162 if (tlv_container->tlv->length % 2) { in msg_tlv_post_recv() 173 if (tlv_container->tlv->length > length) { in msg_tlv_post_recv() 179 length -= tlv_container->tlv->length; in msg_tlv_post_recv() 180 suffix += tlv_container->tlv->length; in msg_tlv_post_recv() 181 suffix_len += tlv_container->tlv->length; in msg_tlv_post_recv() 183 ret = ptp_tlv_post_recv(tlv_container->tlv); in msg_tlv_post_recv() 212 ptp_tlv_pre_send(tlv_container->tlv); in msg_tlv_pre_send() [all …]
|
D | tlv.h | 223 struct ptp_tlv *tlv; member 364 enum ptp_tlv_type ptp_tlv_type(struct ptp_tlv *tlv); 373 int ptp_tlv_post_recv(struct ptp_tlv *tlv); 380 void ptp_tlv_pre_send(struct ptp_tlv *tlv);
|
D | port.h | 201 struct ptp_tlv_mgmt *tlv); 223 int ptp_port_management_resp(struct ptp_port *port, struct ptp_msg *req, struct ptp_tlv_mgmt *tlv);
|
D | CMakeLists.txt | 12 tlv.c
|
D | port.c | 748 container->tlv = (struct ptp_tlv *)resp->management.suffix; in port_management_resp_tlv_fill() 749 mgmt = (struct ptp_tlv_mgmt *)container->tlv; in port_management_resp_tlv_fill() 843 container->tlv->length = sizeof(mgmt->id) + length; in port_management_resp_tlv_fill() 844 resp->header.msg_length += sizeof(*container->tlv) + container->tlv->length; in port_management_resp_tlv_fill() 852 struct ptp_tlv_mgmt *tlv) in port_management_set() argument 856 switch (tlv->id) { in port_management_set() 858 port->port_ds.log_announce_interval = *tlv->data; in port_management_set() 862 port->port_ds.log_sync_interval = *tlv->data; in port_management_set() 872 return send_resp ? ptp_port_management_resp(port, req, tlv) : 0; in port_management_set() 1450 struct ptp_tlv_mgmt *tlv) in ptp_port_management_msg_process() argument [all …]
|
D | clock.c | 165 struct ptp_tlv_mgmt *tlv) in clock_management_set() argument 169 switch (tlv->id) { in clock_management_set() 171 ptp_clk.default_ds.priority1 = *tlv->data; in clock_management_set() 175 ptp_clk.default_ds.priority2 = *tlv->data; in clock_management_set() 182 return send_resp ? ptp_port_management_resp(port, req, tlv) : 0; in clock_management_set()
|
/Zephyr-latest/samples/net/lldp/src/ |
D | main.c | 21 } __packed tlv = { variable 29 tlv.type_length = htons((LLDP_TLV_SYSTEM_NAME << 9) | in set_optional_tlv() 30 ((sizeof(tlv) - sizeof(uint16_t)) & 0x01ff)); in set_optional_tlv() 32 net_lldp_config_optional(iface, (uint8_t *)&tlv, sizeof(tlv)); in set_optional_tlv()
|
/Zephyr-latest/subsys/net/l2/ethernet/gptp/ |
D | gptp_md.c | 95 fup->tlv.org_id[0] = GPTP_FUP_TLV_ORG_ID_BYTE_0; in gptp_md_follow_up_prepare() 96 fup->tlv.org_id[1] = GPTP_FUP_TLV_ORG_ID_BYTE_1; in gptp_md_follow_up_prepare() 97 fup->tlv.org_id[2] = GPTP_FUP_TLV_ORG_ID_BYTE_2; in gptp_md_follow_up_prepare() 98 fup->tlv.org_sub_type[0] = 0U; in gptp_md_follow_up_prepare() 99 fup->tlv.org_sub_type[1] = 0U; in gptp_md_follow_up_prepare() 100 fup->tlv.org_sub_type[2] = GPTP_FUP_TLV_ORG_SUB_TYPE; in gptp_md_follow_up_prepare() 102 fup->tlv.cumulative_scaled_rate_offset = in gptp_md_follow_up_prepare() 104 fup->tlv.cumulative_scaled_rate_offset = in gptp_md_follow_up_prepare() 105 ntohl(fup->tlv.cumulative_scaled_rate_offset); in gptp_md_follow_up_prepare() 106 fup->tlv.gm_time_base_indicator = in gptp_md_follow_up_prepare() [all …]
|
D | gptp_messages.h | 70 + ntohs(GPTP_ANNOUNCE(pkt)->tlv.len) \ 183 struct gptp_path_trace_tlv tlv; member 231 struct gptp_follow_up_tlv tlv; member 309 struct gptp_message_itv_req_tlv tlv; member
|
D | gptp_messages.c | 543 ann->tlv.type = GPTP_ANNOUNCE_MSG_PATH_SEQ_TYPE; in gptp_prepare_announce() 553 ann->tlv.len = global_ds->path_trace.len; in gptp_prepare_announce() 793 gptp_update_pdelay_req_interval(port, sig->tlv.link_delay_itv); in gptp_handle_signaling() 796 gptp_update_sync_interval(port, sig->tlv.time_sync_itv); in gptp_handle_signaling() 799 gptp_update_announce_interval(port, sig->tlv.announce_itv); in gptp_handle_signaling() 802 sig->tlv.compute_neighbor_rate_ratio; in gptp_handle_signaling() 804 sig->tlv.compute_neighbor_prop_delay; in gptp_handle_signaling()
|
D | gptp_mi.c | 1211 int len = ntohs(announce->tlv.len); in copy_path_trace() 1224 memcpy(sys_path_trace->path_sequence, announce->tlv.path_sequence, in copy_path_trace() 1253 if (memcmp(announce->tlv.path_sequence[i], in gptp_mi_qualify_announce()
|
/Zephyr-latest/subsys/mgmt/mcumgr/grp/img_mgmt/src/ |
D | img_mgmt.c | 252 struct image_tlv tlv; in img_mgmt_read_info() local 309 while (data_off + sizeof(tlv) <= data_end) { in img_mgmt_read_info() 310 rc = img_mgmt_read(image_slot, data_off, &tlv, sizeof(tlv)); in img_mgmt_read_info() 314 if (tlv.it_type == 0xff && tlv.it_len == 0xffff) { in img_mgmt_read_info() 317 if (tlv.it_type != IMAGE_TLV_SHA256 || tlv.it_len != IMAGE_HASH_LEN) { in img_mgmt_read_info() 319 data_off += sizeof(tlv) + tlv.it_len; in img_mgmt_read_info() 329 data_off += sizeof(tlv); in img_mgmt_read_info()
|
/Zephyr-latest/include/zephyr/net/ |
D | lldp.h | 194 int net_lldp_config_optional(struct net_if *iface, const uint8_t *tlv,
|
/Zephyr-latest/subsys/net/l2/ethernet/lldp/ |
D | lldp.c | 347 int net_lldp_config_optional(struct net_if *iface, const uint8_t *tlv, size_t len) in net_lldp_config_optional() argument 357 ctx->lldp[i].optional_du = tlv; in net_lldp_config_optional()
|
/Zephyr-latest/subsys/usb/device/class/netusb/ |
D | function_rndis.c | 125 struct tlv { struct 788 struct tlv *msg = (void *)data; in handle_encapsulated_cmd()
|