Lines Matching refs:response
216 static bool append_to_coap_pkt(struct coap_packet *response, in append_to_coap_pkt() argument
244 res = append(response, str + pos, len); in append_to_coap_pkt()
253 struct coap_packet *response, in format_uri() argument
265 res = append_to_coap_pkt(response, &prefix[0], sizeof(prefix) - 1, in format_uri()
279 res = append_to_coap_pkt(response, *p, path_len, remaining, in format_uri()
295 res = append_to_coap_pkt(response, "/", 1, remaining, offset, in format_uri()
308 res = append_to_coap_pkt(response, ">", 1, remaining, offset, current); in format_uri()
324 struct coap_packet *response, in format_attributes() argument
339 res = append_to_coap_pkt(response, ";", 1, in format_attributes()
352 res = append_to_coap_pkt(response, *attr, attr_len, in format_attributes()
369 struct coap_packet *response, in format_resource() argument
377 r = format_uri(resource->path, response, remaining, in format_resource()
392 return format_attributes(attributes, response, remaining, offset, in format_resource()
438 struct coap_packet *response, in coap_well_known_core_get_len() argument
452 if (!resources || !request || !response || !data || !len) { in coap_well_known_core_get_len()
484 r = coap_packet_init(response, data, len, COAP_VERSION_1, COAP_TYPE_ACK, in coap_well_known_core_get_len()
490 r = coap_append_option_int(response, COAP_OPTION_CONTENT_FORMAT, in coap_well_known_core_get_len()
496 r = coap_append_block2_option(response, &ctx); in coap_well_known_core_get_len()
501 r = coap_packet_append_payload_marker(response); in coap_well_known_core_get_len()
522 r = append_to_coap_pkt(response, ",", 1, &remaining, in coap_well_known_core_get_len()
529 r = format_resource(&resources[i], response, &remaining, &offset, in coap_well_known_core_get_len()
541 r = clear_more_flag(response); in coap_well_known_core_get_len()
555 static int format_uri(const char * const *path, struct coap_packet *response) in format_uri() argument
565 res = append(response, (uint8_t *) prefix, strlen(prefix)); in format_uri()
571 res = append(response, (uint8_t *) *p, strlen(*p)); in format_uri()
578 res = append_u8(response, (uint8_t) '/'); in format_uri()
585 res = append_u8(response, (uint8_t) '>'); in format_uri()
594 struct coap_packet *response) in format_attributes() argument
604 res = append_u8(response, (uint8_t) ';'); in format_attributes()
609 res = append(response, (uint8_t *) *attr, strlen(*attr)); in format_attributes()
619 struct coap_packet *response) in format_resource() argument
625 r = format_uri(resource->path, response); in format_resource()
634 return format_attributes(attributes, response); in format_resource()
640 struct coap_packet *response, in coap_well_known_core_get_len() argument
651 if (!resources || !request || !response || !data || !data_len) { in coap_well_known_core_get_len()
668 r = coap_packet_init(response, data, data_len, COAP_VERSION_1, COAP_TYPE_ACK, in coap_well_known_core_get_len()
674 r = coap_append_option_int(response, COAP_OPTION_CONTENT_FORMAT, in coap_well_known_core_get_len()
680 r = coap_packet_append_payload_marker(response); in coap_well_known_core_get_len()
693 r = append_u8(response, (uint8_t) ','); in coap_well_known_core_get_len()
699 r = format_resource(&resources[i], response); in coap_well_known_core_get_len()
711 struct coap_packet *response, in coap_well_known_core_get() argument
725 return coap_well_known_core_get_len(resources, resources_len, request, response, data, in coap_well_known_core_get()