Lines Matching refs:tftp_buf

72 		sys_put_be16(DATA_OPCODE, client->tftp_buf);  in send_data()
73 sys_put_be16(block_no, client->tftp_buf + 2); in send_data()
74 memcpy(client->tftp_buf + TFTP_HEADER_SIZE, data_buffer, data_size); in send_data()
76 ret = zsock_send(sock, client->tftp_buf, data_size + TFTP_HEADER_SIZE, 0); in send_data()
96 ret = zsock_recv(sock, client->tftp_buf, TFTPC_MAX_BUF_SIZE, 0); in send_data()
106 uint16_t opcode = sys_get_be16(client->tftp_buf); in send_data()
107 uint16_t blockno = sys_get_be16(client->tftp_buf + 2); in send_data()
124 evt.param.error.msg = client->tftp_buf + TFTP_HEADER_SIZE; in send_data()
152 sys_put_be16(ERROR_OPCODE, client->tftp_buf); in send_err()
153 sys_put_be16(err_code, client->tftp_buf + 2); in send_err()
160 if (copy_len > sizeof(client->tftp_buf) - req_size) { in send_err()
161 copy_len = sizeof(client->tftp_buf) - req_size; in send_err()
164 memcpy(client->tftp_buf + req_size, err_msg, copy_len); in send_err()
169 return zsock_send(sock, client->tftp_buf, req_size, 0); in send_err()
190 req_size = make_request(client->tftp_buf, request, remote_file, mode); in send_request()
199 ret = zsock_sendto(sock, client->tftp_buf, req_size, 0, &client->server, in send_request()
222 ret = zsock_recvfrom(sock, client->tftp_buf, TFTPC_MAX_BUF_SIZE, 0, in send_request()
225 req_size = make_request(client->tftp_buf, request, in send_request()
273 uint16_t opcode = sys_get_be16(client->tftp_buf); in tftp_get()
274 uint16_t block_no = sys_get_be16(client->tftp_buf + 2); in tftp_get()
285 evt.param.error.msg = client->tftp_buf + TFTP_HEADER_SIZE; in tftp_get()
319 evt.param.data.data_ptr = client->tftp_buf + TFTP_HEADER_SIZE; in tftp_get()
359 ret = zsock_recv(sock, client->tftp_buf, TFTPC_MAX_BUF_SIZE, 0); in tftp_get()
397 uint16_t opcode = sys_get_be16(client->tftp_buf); in tftp_put()
398 uint16_t block_no = sys_get_be16(client->tftp_buf + 2); in tftp_put()
408 evt.param.error.msg = client->tftp_buf + TFTP_HEADER_SIZE; in tftp_put()