Lines Matching defs:pkt_id

281  * @param pkt_id Packet identifier of request
287 mqtt_create_request(struct mqtt_request_t *r_objs, size_t r_objs_len, u16_t pkt_id, mqtt_request_cb_t cb, void *arg)
299 r->pkt_id = pkt_id;
352 * @param pkt_id Packet identifier of request to take
356 mqtt_take_request(struct mqtt_request_t **tail, u16_t pkt_id)
360 /* Search all request for pkt_id */
362 if (iter->pkt_id == pkt_id) {
630 * @param pkt_id Packet identifier
635 pub_ack_rec_rel_response(mqtt_client_t *client, u8_t msg, u16_t pkt_id, u8_t qos)
640 mqtt_output_append_u16(&client->output, pkt_id);
643 LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("pub_ack_rec_rel_response: OOM creating response: %s with pkt_id: %d\n",
644 mqtt_msg_type_to_str(msg), pkt_id));
681 u16_t pkt_id = 0;
739 LWIP_DEBUGF(MQTT_DEBUG_WARN, ("mqtt_message_received: Receive buffer can not fit topic + pkt_id\n"));
782 LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_incomming_publish: Sending publish response: %s with pkt_id: %d\n",
789 pkt_id = (u16_t)var_hdr_payload[0] << 8;
790 pkt_id |= (u16_t)var_hdr_payload[1];
791 if (pkt_id == 0) {
796 LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_message_received: PUBREC, sending PUBREL with pkt_id: %d\n", pkt_id));
797 pub_ack_rec_rel_response(client, MQTT_MSG_TYPE_PUBREL, pkt_id, 1);
800 LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_message_received: PUBREL, sending PUBCOMP response with pkt_id: %d\n", pkt_id));
801 pub_ack_rec_rel_response(client, MQTT_MSG_TYPE_PUBCOMP, pkt_id, 0);
805 struct mqtt_request_t *r = mqtt_take_request(&client->pend_req_queue, pkt_id);
807 LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_message_received: %s response with id %d\n", mqtt_msg_type_to_str(pkt_type), pkt_id));
820 LWIP_DEBUGF(MQTT_DEBUG_WARN, ( "mqtt_message_received: Received %s reply, with wrong pkt_id: %d\n", mqtt_msg_type_to_str(pkt_type), pkt_id));
1100 u16_t pkt_id;
1118 /* Generate pkt_id id for QoS1 and 2 */
1119 pkt_id = msg_generate_packet_id(client);
1121 /* Use reserved value pkt_id 0 for QoS 0 in request handle */
1122 pkt_id = 0;
1129 r = mqtt_create_request(client->req_list, LWIP_ARRAYSIZE(client->req_list), pkt_id, cb, arg);
1146 mqtt_output_append_u16(&client->output, pkt_id);
1178 u16_t pkt_id;
1188 /* Topic string, pkt_id, qos for subscribe */
1199 pkt_id = msg_generate_packet_id(client);
1200 r = mqtt_create_request(client->req_list, LWIP_ARRAYSIZE(client->req_list), pkt_id, cb, arg);
1210 LWIP_DEBUGF(MQTT_DEBUG_TRACE, ("mqtt_sub_unsub: Client (un)subscribe to topic \"%s\", id: %d\n", topic, pkt_id));
1214 mqtt_output_append_u16(&client->output, pkt_id);