Home
last modified time | relevance | path

Searched refs:client (Results 1 – 25 of 98) sorted by relevance

1234

/subsys/net/lib/mqtt/
A Dmqtt.c33 memset(client->tx_buf, 0, client->tx_buf_size); in tx_buf_init()
35 buf->end = client->tx_buf + client->tx_buf_size; in tx_buf_init()
43 client->evt_cb(client, evt); in event_notify()
230 memset(client, 0, sizeof(*client)); in mqtt_client_init()
308 "Data size 0x%08x", client, client->internal.state, in mqtt_publish()
340 client, client->internal.state, err_code); in mqtt_publish()
377 client, client->internal.state, err_code); in mqtt_publish_qos1_ack()
414 client, client->internal.state, err_code); in mqtt_publish_qos2_receive()
451 client, client->internal.state, err_code); in mqtt_publish_qos2_release()
491 client, client->internal.state, err_code); in mqtt_publish_qos2_complete()
[all …]
A Dmqtt_transport.h25 typedef int (*transport_write_handler_t)(struct mqtt_client *client,
73 int mqtt_transport_connect(struct mqtt_client *client);
94 int mqtt_transport_write_msg(struct mqtt_client *client,
116 int mqtt_transport_disconnect(struct mqtt_client *client);
119 int mqtt_client_tcp_connect(struct mqtt_client *client);
122 int mqtt_client_tcp_write_msg(struct mqtt_client *client,
126 int mqtt_client_tcp_disconnect(struct mqtt_client *client);
130 int mqtt_client_tls_connect(struct mqtt_client *client);
133 int mqtt_client_tls_write_msg(struct mqtt_client *client,
137 int mqtt_client_tls_disconnect(struct mqtt_client *client);
[all …]
A Dmqtt_rx.c67 client->internal.remaining_payload = in mqtt_handle_packet()
132 if (client->unacked_ping <= 0) { in mqtt_handle_packet()
134 client->unacked_ping = 0; in mqtt_handle_packet()
136 client->unacked_ping--; in mqtt_handle_packet()
178 event_notify(client, &evt); in mqtt_handle_packet()
201 if ((buf->end + remaining > client->rx_buf + client->rx_buf_size) || in mqtt_read_message_chunk()
204 client); in mqtt_read_message_chunk()
257 if (mqtt_is_version_5_0(client)) { in mqtt_read_publish_var_header()
318 buf->cur = client->rx_buf; in mqtt_read_and_parse_fixed_header()
334 buf.cur = client->rx_buf; in mqtt_handle_rx()
[all …]
A Dmqtt_transport_websocket.c34 ret = mqtt_client_tcp_connect(client); in mqtt_client_websocket_connect()
39 transport_sock = client->transport.tcp.sock; in mqtt_client_websocket_connect()
43 ret = mqtt_client_tls_connect(client); in mqtt_client_websocket_connect()
48 transport_sock = client->transport.tls.sock; in mqtt_client_websocket_connect()
73 &client->transport.websocket.config, in mqtt_client_websocket_connect()
74 client->transport.websocket.timeout, in mqtt_client_websocket_connect()
76 if (client->transport.websocket.sock < 0) { in mqtt_client_websocket_connect()
78 client->transport.websocket.sock); in mqtt_client_websocket_connect()
81 return client->transport.websocket.sock; in mqtt_client_websocket_connect()
181 ret = mqtt_client_tcp_disconnect(client); in mqtt_client_websocket_disconnect()
[all …]
A Dmqtt_transport_socket_tls.c21 int mqtt_client_tls_connect(struct mqtt_client *client) in mqtt_client_tls_connect() argument
23 const struct sockaddr *broker = client->broker; in mqtt_client_tls_connect()
29 if (client->transport.tls.sock < 0) { in mqtt_client_tls_connect()
35 if (client->transport.if_name != NULL) { in mqtt_client_tls_connect()
54 if (client->transport.proxy.addrlen != 0) { in mqtt_client_tls_connect()
55 ret = setsockopt(client->transport.tls.sock, in mqtt_client_tls_connect()
57 &client->transport.proxy.addr, in mqtt_client_tls_connect()
58 client->transport.proxy.addrlen); in mqtt_client_tls_connect()
127 ret = zsock_connect(client->transport.tls.sock, client->broker, in mqtt_client_tls_connect()
137 (void) zsock_close(client->transport.tls.sock); in mqtt_client_tls_connect()
[all …]
A Dmqtt_internal.h183 client->protocol_version == MQTT_VERSION_5_0); in mqtt_is_version_5_0()
199 int mqtt_handle_rx(struct mqtt_client *client);
225 int connect_request_encode(const struct mqtt_client *client,
238 int publish_encode(const struct mqtt_client *client,
252 int publish_ack_encode(const struct mqtt_client *client,
266 int publish_receive_encode(const struct mqtt_client *client,
307 int disconnect_encode(const struct mqtt_client *client,
321 int subscribe_encode(const struct mqtt_client *client,
335 int unsubscribe_encode(const struct mqtt_client *client,
512 client->internal.disconnect_reason = reason; in set_disconnect_reason()
[all …]
A Dmqtt_transport_socket_tcp.c21 int mqtt_client_tcp_connect(struct mqtt_client *client) in mqtt_client_tcp_connect() argument
23 const struct sockaddr *broker = client->broker; in mqtt_client_tcp_connect()
28 if (client->transport.tcp.sock < 0) { in mqtt_client_tcp_connect()
34 if (client->transport.if_name != NULL) { in mqtt_client_tcp_connect()
53 if (client->transport.proxy.addrlen != 0) { in mqtt_client_tcp_connect()
54 ret = setsockopt(client->transport.tcp.sock, in mqtt_client_tcp_connect()
56 &client->transport.proxy.addr, in mqtt_client_tcp_connect()
57 client->transport.proxy.addrlen); in mqtt_client_tcp_connect()
70 ret = zsock_connect(client->transport.tcp.sock, client->broker, in mqtt_client_tcp_connect()
80 (void)zsock_close(client->transport.tcp.sock); in mqtt_client_tcp_connect()
[all …]
A Dmqtt_transport.c61 int mqtt_transport_connect(struct mqtt_client *client) in mqtt_transport_connect() argument
63 return transport_fn[client->transport.type].connect(client); in mqtt_transport_connect()
66 int mqtt_transport_write(struct mqtt_client *client, const uint8_t *data, in mqtt_transport_write() argument
69 return transport_fn[client->transport.type].write(client, data, in mqtt_transport_write()
73 int mqtt_transport_write_msg(struct mqtt_client *client, in mqtt_transport_write_msg() argument
76 return transport_fn[client->transport.type].write_msg(client, message); in mqtt_transport_write_msg()
79 int mqtt_transport_read(struct mqtt_client *client, uint8_t *data, uint32_t buflen, in mqtt_transport_read() argument
82 return transport_fn[client->transport.type].read(client, data, buflen, in mqtt_transport_read()
86 int mqtt_transport_disconnect(struct mqtt_client *client) in mqtt_transport_disconnect() argument
88 return transport_fn[client->transport.type].disconnect(client); in mqtt_transport_disconnect()
A Dmqtt_encoder.c702 ARG_UNUSED(client); in connect_properties_encode()
711 ARG_UNUSED(client); in will_properties_encode()
771 if (mqtt_is_version_5_0(client)) { in connect_request_encode()
778 NET_HEXDUMP_DBG(client->client_id.utf8, client->client_id.size, in connect_request_encode()
786 if (client->will_topic != NULL) { in connect_request_encode()
810 client->will_message->size, in connect_request_encode()
826 if (client->user_name != NULL) { in connect_request_encode()
830 client->user_name->size, in connect_request_encode()
839 if (client->password != NULL) { in connect_request_encode()
843 client->password->size, in connect_request_encode()
[all …]
/subsys/net/lib/http/
A Dhttp_server_http2.c834 client->method); in handle_http2_dynamic_resource()
991 ret = parse_http_frame_header(client, client->cursor, client->data_len); in handle_http_frame_header()
1101 frame, client); in handle_http1_to_http2_upgrade()
1116 frame, client); in handle_http1_to_http2_upgrade()
1147 client->cursor += client->data_len; in handle_http1_to_http2_upgrade()
1171 client->cursor++; in parse_http_frame_padded_field()
1172 client->data_len--; in parse_http_frame_padded_field()
1240 client, false); in handle_http_frame_data()
1446 ret = parse_http_frame_header(client, client->cursor + prev_frame_len, in handle_incomplete_http_header()
1611 frame, client); in handle_http_frame_headers()
[all …]
A Dhttp_server_http1.c522 client->url_buffer); in handle_http1_static_fs_resource()
656 client->method); in handle_http1_dynamic_resource()
911 memset(client->header_buffer, 0, sizeof(client->header_buffer)); in enter_http1_request()
912 memset(client->url_buffer, 0, sizeof(client->url_buffer)); in enter_http1_request()
928 parsed = http_parser_execute(&client->parser, &client->parser_settings, in handle_http1_request()
929 client->cursor, client->data_len); in handle_http1_request()
950 client->method = client->parser.method; in handle_http1_request()
951 client->has_upgrade_header = client->parser.upgrade; in handle_http1_request()
981 detail = get_resource_detail(client->service, client->url_buffer, in handle_http1_request()
1042 client); in handle_http1_request()
[all …]
A Dhttp_server_core.c384 int fd = client->fd; in close_client_connection()
426 client->fd = new_socket; in init_client_ctx()
427 client->service = svc; in init_client_ctx()
428 client->data_len = 0; in init_client_ctx()
434 memset(client->buffer, 0, sizeof(client->buffer)); in init_client_ctx()
435 memset(client->url_buffer, 0, sizeof(client->url_buffer)); in init_client_ctx()
491 client->cursor = client->buffer; in handle_http_request()
546 memmove(client->buffer, client->cursor, client->data_len); in handle_http_request()
673 ret = zsock_recv(client->fd, client->buffer + client->data_len, in http_server_run()
674 sizeof(client->buffer) - client->data_len, 0); in http_server_run()
[all …]
A Dhttp_server_ws.c48 key_len = MIN(sizeof(key_accept) - 1, sizeof(client->ws_sec_key)); in handle_http1_to_websocket_upgrade()
49 strncpy(key_accept, client->ws_sec_key, key_len); in handle_http1_to_websocket_upgrade()
60 NET_DBG("[%p] Too short buffer olen %zd", client, olen); in handle_http1_to_websocket_upgrade()
66 ret = http_server_sendall(client, switching_protocols, in handle_http1_to_websocket_upgrade()
73 client->http1_headers_sent = true; in handle_http1_to_websocket_upgrade()
75 ret = http_server_sendall(client, tmp, strlen(tmp)); in handle_http1_to_websocket_upgrade()
87 ret = http_server_sendall(client, tmp, strlen(tmp)); in handle_http1_to_websocket_upgrade()
96 if (client->parser_state == HTTP1_MESSAGE_COMPLETE_STATE) { in handle_http1_to_websocket_upgrade()
105 ret = ws_sock = websocket_register(client->fd, in handle_http1_to_websocket_upgrade()
114 params = &client->url_buffer[client->current_detail->path_len]; in handle_http1_to_websocket_upgrade()
[all …]
/subsys/net/lib/lwm2m/
A Dlwm2m_rd_client.c138 } client; variable
155 client.rd_message.ctx = client.ctx; in rd_get_message()
168 if (!client.ctx || !client.rd_message.ctx) { in lwm2m_get_ongoing_rd_msg()
247 client.ctx->event_cb(client.ctx, event); in set_sm_state_delayed()
348 client.ctx->event_cb(client.ctx, event); in sm_handle_timeout_state()
378 client.ctx->event_cb(client.ctx, event); in sm_handle_failure_state()
838 client.ep_name, client.ctx->sec_obj_inst); in sm_do_bootstrap_reg()
1122 client.ep_name, client.lifetime, client.ctx->srv_obj_inst); in sm_do_registration()
1344 client.retry_delay = 1 << client.retries; in sm_do_network_error()
1443 client.ctx->event_cb(client.ctx, in sm_do_network_error()
[all …]
/subsys/net/lib/mqtt_sn/
A Dmqtt_sn.c133 err = client->transport->sendto(client, client->tx.data, client->tx.len, NULL, in encode_and_send()
144 err = client->transport->sendto(client, client->tx.data, client->tx.len, gw->addr, in encode_and_send()
390 client->evt_cb(client, &evt); in mqtt_sn_disconnect_internal()
409 client->evt_cb(client, &evt); in mqtt_sn_sleep_internal()
1297 client->evt_cb(client, &evt); in handle_advertise()
1318 client->evt_cb(client, &evt); in handle_searchgw()
1348 client->evt_cb(client, &evt); in handle_gwinfo()
1364 client->evt_cb(client, &evt); in handle_connack()
1466 client->evt_cb(client, &evt); in handle_publish()
1563 client->evt_cb(client, &evt); in handle_pingresp()
[all …]
/subsys/net/lib/coap/
A Dcoap_client.c206 memset(client->send_buf, 0, sizeof(client->send_buf)); in coap_client_init_request()
369 if (client->fd != sock && has_ongoing_request(client)) { in coap_client_req()
384 client->socklen = sizeof(client->address); in coap_client_req()
394 memset(&client->address, 0, sizeof(client->address)); in coap_client_req()
442 &client->address, client->socklen); in coap_client_req()
541 ret = resend_request(client, &client->requests[i]); in coap_client_resend_handler()
656 memset(client->recv_buf, 0, sizeof(client->recv_buf)); in recv_response()
657 total_len = receive(client->fd, client->recv_buf, sizeof(client->recv_buf), flags, in recv_response()
658 &client->address, &client->socklen); in recv_response()
693 ret = send_request(client->fd, ack.data, ack.offset, 0, &client->address, client->socklen); in send_ack()
[all …]
/subsys/bluetooth/audio/
A Dcsip_set_coordinator.c576 client->write_params.data = client->gatt_write_buf; in csip_set_coordinator_write_set_lock()
673 client->read_params.single.handle = client->cur_inst->rank_handle; in csip_set_coordinator_read_rank()
702 (client->cur_inst->idx + 1) < client->inst_count) { in discover_func()
705 client->cur_inst = &client->svc_insts[client->cur_inst->idx + 1]; in discover_func()
810 client->cur_inst = &client->svc_insts[0]; in primary_discover_func()
835 client->cur_inst = &client->svc_insts[client->inst_count]; in primary_discover_func()
836 client->cur_inst->idx = client->inst_count; in primary_discover_func()
840 client->cur_inst->set_info = &client->set_member.insts[client->cur_inst->idx].info; in primary_discover_func()
895 set_info = &client->set_member.insts[client->cur_inst->idx].info; in csip_set_coordinator_discover_insts_read_rank_cb()
927 set_info = &client->set_member.insts[client->cur_inst->idx].info; in csip_set_coordinator_discover_insts_read_set_size_cb()
[all …]
A Dccp_call_control_client.c86 if (client->conn == conn) { in disconnected_cb()
87 bt_conn_unref(client->conn); in disconnected_cb()
88 client->conn = NULL; in disconnected_cb()
103 if (client->bearers[i].discovered) { in populate_bearers()
129 memset(client->bearers, 0, sizeof((client->bearers))); in tbs_client_discover_cb()
152 populate_bearers(client, &bearers); in tbs_client_discover_cb()
186 client = get_client_by_conn(conn); in bt_ccp_call_control_client_discover()
207 client->conn = bt_conn_ref(conn); in bt_ccp_call_control_client_discover()
208 *out_client = client; in bt_ccp_call_control_client_discover()
247 CHECKIF(client == NULL) { in bt_ccp_call_control_client_get_bearers()
[all …]
A Dhas.c301 memset(client, 0, sizeof(*client)); in client_alloc()
331 return client; in client_alloc()
401 if (client) { in disconnected()
762 memset(&client->params.ntf, 0, sizeof(client->params.ntf)); in control_point_send()
768 return bt_gatt_notify_cb(client->conn, &client->params.ntf); in control_point_send()
773 memset(&client->params.ind, 0, sizeof(client->params.ind)); in control_point_send()
781 return bt_gatt_indicate(client->conn, &client->params.ind); in control_point_send()
803 if (client == NULL || client->conn == NULL) { in control_point_send_all()
878 if (client) { in bt_has_cp_generic_update()
961 if (client != NULL && client->context != NULL && in update_last_preset_index_known()
[all …]
A Dcap_common.c105 if (client == NULL) { in bt_cap_common_get_member_conn()
109 return client->conn; in bt_cap_common_get_member_conn()
242 if (client->conn != NULL) { in bt_cap_common_disconnected()
243 bt_conn_unref(client->conn); in bt_cap_common_disconnected()
245 (void)memset(client, 0, sizeof(*client)); in bt_cap_common_disconnected()
276 return client; in bt_cap_common_get_client_by_csis()
290 if (client != NULL && client->discover_cb_func != NULL) { in cap_common_discover_complete()
293 client->discover_cb_func = NULL; in cap_common_discover_complete()
313 client->csis_inst = in csis_client_discover_cb()
429 param = &client->param; in bt_cap_common_discover()
[all …]
A Dmcs.c105 struct client_state *client = &clients[bt_conn_index(conn)]; in read_player_name() local
108 atomic_clear_bit(client->flags, FLAG_PLAYER_NAME_CHANGED); in read_player_name()
150 struct client_state *client = &clients[bt_conn_index(conn)]; in read_icon_url() local
153 atomic_clear_bit(client->flags, FLAG_ICON_URL_CHANGED); in read_icon_url()
177 struct client_state *client = &clients[bt_conn_index(conn)]; in read_track_title() local
180 atomic_clear_bit(client->flags, FLAG_TRACK_TITLE_CHANGED); in read_track_title()
1016 atomic_set_bit(client->flags, FLAG_ICON_URL_CHANGED); in mark_icon_url_changed_cb()
1179 client->cmd_ntf.requested_opcode, client->cmd_ntf.result_code); in notify_cb()
1180 notify(BT_UUID_MCS_MEDIA_CONTROL_POINT, &client->cmd_ntf, sizeof(client->cmd_ntf)); in notify_cb()
1208 atomic_set_bit(client->flags, POINTER_TO_UINT(data)); in defer_value_ntf()
[all …]
/subsys/net/lib/http/headers/
A Dserver_internal.h21 int handle_http_frame_goaway(struct http_client_ctx *client);
22 int handle_http_frame_settings(struct http_client_ctx *client);
23 int handle_http_frame_priority(struct http_client_ctx *client);
26 int handle_http_frame_header(struct http_client_ctx *client);
27 int handle_http_frame_headers(struct http_client_ctx *client);
28 int handle_http_frame_data(struct http_client_ctx *client);
29 int handle_http_frame_padding(struct http_client_ctx *client);
30 int handle_http1_request(struct http_client_ctx *client);
35 int enter_http1_request(struct http_client_ctx *client);
36 int enter_http2_request(struct http_client_ctx *client);
[all …]
/subsys/net/lib/tftp/
A Dtftp_client.c119 if (client->callback) { in send_data()
126 client->callback(&evt); in send_data()
199 ret = zsock_sendto(sock, client->tftp_buf, req_size, 0, &client->server, in send_request()
200 ADDRLEN(client->server)); in send_request()
257 if (client == NULL) { in tftp_get()
280 if (client->callback) { in tftp_get()
287 client->callback(&evt); in tftp_get()
304 if (client->callback == NULL) { in tftp_get()
321 client->callback(&evt); in tftp_get()
403 if (client->callback) { in tftp_put()
[all …]
/subsys/bluetooth/mesh/
A Dproxy_srv.c118 (void)memset(client->filter, 0, sizeof(client->filter)); in filter_set()
122 (void)memset(client->filter, 0, sizeof(client->filter)); in filter_set()
151 client->filter[i] = addr; in filter_add()
230 client = find_client(conn); in proxy_filter_recv()
235 filter_set(client, buf); in proxy_filter_recv()
243 filter_add(client, addr); in proxy_filter_recv()
1003 if (client->cli && (client->filter_type == ACCEPT || in bt_mesh_proxy_gatt_disconnect()
1087 if (!client->cli) { in bt_mesh_proxy_relay()
1130 (void)memset(client->filter, 0, sizeof(client->filter)); in gatt_connected()
1177 if (client->cli) { in gatt_disconnected()
[all …]
/subsys/bluetooth/services/ias/
A Dias_client.c125 struct bt_ias_client *client = client_by_conn(conn); in bt_ias_prim_disc_cb() local
135 client->discover.uuid = alert_lvl_uuid; in bt_ias_prim_disc_cb()
136 client->discover.start_handle = attr->handle + 1; in bt_ias_prim_disc_cb()
137 client->discover.end_handle = data->end_handle; in bt_ias_prim_disc_cb()
139 client->discover.func = bt_ias_alert_lvl_disc_cb; in bt_ias_prim_disc_cb()
141 err = bt_gatt_discover(conn, &client->discover); in bt_ias_prim_disc_cb()
162 client_cleanup(client); in bt_ias_discover()
165 client->discover.uuid = ias_uuid; in bt_ias_discover()
166 client->discover.func = bt_ias_prim_disc_cb; in bt_ias_discover()
169 client->discover.type = BT_GATT_DISCOVER_PRIMARY; in bt_ias_discover()
[all …]

Completed in 59 milliseconds

1234