Home
last modified time | relevance | path

Searched refs:opt_len (Results 1 – 13 of 13) sorted by relevance

/Zephyr-latest/subsys/net/ip/
Dicmpv4.c84 uint8_t opt_len, in icmpv4_update_record_route() argument
101 if (net_pkt_write_u8(reply, opt_len + 2U)) { in icmpv4_update_record_route()
119 if (ptr >= opt_len) { in icmpv4_update_record_route()
127 if (net_pkt_write(reply, opt_data + offset, opt_len)) { in icmpv4_update_record_route()
131 len += opt_len; in icmpv4_update_record_route()
142 if ((ptr + addr_len) > opt_len) { in icmpv4_update_record_route()
171 if (opt_len > offset) { in icmpv4_update_record_route()
172 if (net_pkt_write(reply, opt_data + offset, opt_len - offset)) { in icmpv4_update_record_route()
177 len += opt_len - offset; in icmpv4_update_record_route()
192 uint8_t opt_len, in icmpv4_update_time_stamp() argument
[all …]
Dipv4.c173 uint8_t opt_len = 0U; in net_ipv4_parse_hdr_options() local
184 if (net_pkt_read_u8(pkt, &opt_len)) { in net_ipv4_parse_hdr_options()
188 if (opt_len < 2U || total_opts_len < 1U) { in net_ipv4_parse_hdr_options()
192 opt_len -= 2U; in net_ipv4_parse_hdr_options()
196 if (opt_len > total_opts_len) { in net_ipv4_parse_hdr_options()
215 if (net_pkt_read(pkt, opt_data, opt_len)) { in net_ipv4_parse_hdr_options()
219 if (cb(opt_type, opt_data, opt_len, user_data)) { in net_ipv4_parse_hdr_options()
225 if (net_pkt_skip(pkt, opt_len)) { in net_ipv4_parse_hdr_options()
232 total_opts_len -= opt_len; in net_ipv4_parse_hdr_options()
Dipv6.c227 uint8_t opt_type, opt_len; in ipv6_handle_ext_hdr_options() local
239 if (net_pkt_read_u8(pkt, &opt_len)) { in ipv6_handle_ext_hdr_options()
251 length += opt_len + 2; in ipv6_handle_ext_hdr_options()
252 net_pkt_skip(pkt, opt_len); in ipv6_handle_ext_hdr_options()
261 if (opt_len > (exthdr_len - (1 + 1 + 1 + 1))) { in ipv6_handle_ext_hdr_options()
270 if (net_pkt_skip(pkt, opt_len)) { in ipv6_handle_ext_hdr_options()
274 length += opt_len + 2; in ipv6_handle_ext_hdr_options()
Dipv4.h228 uint8_t opt_len,
Dtcp.c1096 uint8_t opt, opt_len; in tcp_options_check() local
1103 for ( ; options && len >= 1; options += opt_len, len -= opt_len) { in tcp_options_check()
1109 opt_len = 1; in tcp_options_check()
1118 opt_len = options[1]; in tcp_options_check()
1122 (uint16_t)opt, (uint16_t)opt_len); in tcp_options_check()
1124 if (opt_len < 2 || opt_len > len) { in tcp_options_check()
1131 if (opt_len != 4) { in tcp_options_check()
1142 if (opt_len != 3) { in tcp_options_check()
/Zephyr-latest/subsys/net/lib/coap/
Dcoap.c288 uint8_t opt_len; in encode_option() local
294 len_size = encode_extended_option(len, &opt_len, &len_ext); in encode_option()
297 option_header_set_len(&opt, opt_len); in encode_option()
363 if (cpkt->opt_len) { in coap_packet_append_option()
367 r = encode_option(cpkt, code, value, len, cpkt->hdr_len + cpkt->opt_len); in coap_packet_append_option()
372 cpkt->opt_len += r; in coap_packet_append_option()
534 uint16_t max_len, uint16_t *opt_delta, uint16_t *opt_len, in parse_option() argument
554 *opt_len += 1U; in parse_option()
575 if (u16_add_overflow(*opt_len, hdr_len, opt_len)) { in parse_option()
588 if (u16_add_overflow(*opt_len, hdr_len, opt_len)) { in parse_option()
[all …]
/Zephyr-latest/subsys/net/l2/ppp/
Doptions.c28 uint8_t opt_type, opt_len, opt_val_len; in ppp_parse_options() local
47 ret = net_pkt_read_u8(pkt, &opt_len); in ppp_parse_options()
54 opt_val_len = opt_len - sizeof(opt_type) - sizeof(opt_len); in ppp_parse_options()
60 opt_len); in ppp_parse_options()
70 remaining -= opt_len; in ppp_parse_options()
/Zephyr-latest/tests/net/lib/lwm2m/block_transfer/src/
Dmain.c144 zassert_equal(EXPECTED_HEADERS_LEN, msg->cpkt.hdr_len + msg->cpkt.opt_len + 1, in ZTEST_F()
188 zassert_equal(msg->cpkt.opt_len, expected_options_len, "Options length not as expected"); in ZTEST_F()
245 zassert_equal(msg->cpkt.opt_len, expected_options_len, "Options length not as expected"); in ZTEST_F()
321 zassert_equal(msg->cpkt.opt_len, expected_options_len, "Options length not as expected"); in ZTEST_F()
/Zephyr-latest/tests/net/lib/coap/src/
Dmain.c95 zassert_equal(cpkt.opt_len, 0, "Invalid options length"); in ZTEST()
134 zassert_equal(cpkt.opt_len, 1, "Invalid options length"); in ZTEST()
166 zassert_equal(cpkt.opt_len, 0, "Invalid options length"); in ZTEST()
202 zassert_equal(cpkt.opt_len, 1, "Invalid options length"); in ZTEST()
245 zassert_equal(cpkt.opt_len, 3, "Invalid options length"); in ZTEST()
1066 zassert_mem_equal(&expected_options_0, &cpkt.data[cpkt.hdr_len], cpkt.opt_len); in ZTEST()
1076 zassert_mem_equal(expected_options_1, &cpkt.data[cpkt.hdr_len], cpkt.opt_len); in ZTEST()
1088 zassert_mem_equal(expected_options_2, &cpkt.data[cpkt.hdr_len], cpkt.opt_len); in ZTEST()
1101 zassert_mem_equal(expected_options_3, &cpkt.data[cpkt.hdr_len], cpkt.opt_len); in ZTEST()
1125 zassert_equal(cpkt.opt_len, 14, "Wrong options size"); in ZTEST()
[all …]
/Zephyr-latest/subsys/bluetooth/host/classic/
Dl2cap_br.c1101 uint16_t flags, scid, result, opt_len; in l2cap_br_conf_rsp() local
1112 opt_len = len - sizeof(*rsp); in l2cap_br_conf_rsp()
1114 LOG_DBG("scid 0x%04x flags 0x%02x result 0x%02x len %u", scid, flags, result, opt_len); in l2cap_br_conf_rsp()
1363 uint16_t flags, dcid, opt_len, hint, result = BT_L2CAP_CONF_SUCCESS; in l2cap_br_conf_req() local
1373 opt_len = len - sizeof(*req); in l2cap_br_conf_req()
1375 LOG_DBG("dcid 0x%04x flags 0x%02x len %u", dcid, flags, opt_len); in l2cap_br_conf_req()
1390 if (!opt_len) { in l2cap_br_conf_req()
/Zephyr-latest/include/zephyr/net/
Dcoap.h317 uint16_t opt_len; /**< Total options length (delta + len + value) */ member
/Zephyr-latest/subsys/net/lib/lwm2m/
Dlwm2m_message_handling.c343 msg->body_encode_buffer.opt_len); in build_msg_block_for_send()
347 msg->cpkt.opt_len = msg->body_encode_buffer.opt_len; in build_msg_block_for_send()
417 msg->cpkt.opt_len = msg->body_encode_buffer.opt_len; in prepare_msg_for_send()
/Zephyr-latest/subsys/net/lib/dhcpv6/
Ddhcpv6.c1182 uint16_t *opt_len) in dhcpv6_find_option() argument
1194 *opt_len = length; in dhcpv6_find_option()