Rizin
unix-like reverse engineering framework and cli tools
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "kd.h"
#include <rz_util/rz_log.h>
Go to the source code of this file.
Macros | |
#define | KD_DBG if (false) |
Functions | |
ut32 | kd_data_checksum (const ut8 *buf, const ut64 buf_len) |
int | kd_send_ctrl_packet (io_desc_t *desc, const ut32 type, const ut32 id) |
int | kd_send_data_packet (io_desc_t *desc, const ut32 type, const ut32 id, const ut8 *req, const int req_len, const ut8 *buf, const ut32 buf_len) |
int | kd_read_packet (io_desc_t *desc, kd_packet_t **p) |
bool | kd_packet_is_valid (const kd_packet_t *p) |
int | kd_packet_is_ack (const kd_packet_t *p) |
Definition at line 154 of file kd.c.
References KD_PACKET_CTRL, KD_PACKET_DATA, KD_PACKET_UNUSED, and p.
Referenced by kd_read_packet().
Definition at line 80 of file kd.c.
References desc, eprintf, free(), iob_read(), kd_data_checksum(), KD_DBG, KD_E_IOERR, KD_E_MALFORMED, KD_E_OK, KD_IO_PIPE, KD_PACKET_DATA, kd_packet_is_valid(), KD_PACKET_TYPE_ACKNOWLEDGE, KD_PACKET_TYPE_RESEND, kd_send_ctrl_packet(), malloc(), memcpy(), NULL, and p.
Referenced by winkd_sync(), and winkd_wait_packet().
Definition at line 25 of file kd.c.
References desc, id, iob_write(), KD_E_IOERR, KD_E_OK, KD_PACKET_CTRL, and type.
Referenced by kd_read_packet(), and winkd_sync().
int kd_send_data_packet | ( | io_desc_t * | desc, |
const ut32 | type, | ||
const ut32 | id, | ||
const ut8 * | req, | ||
const int | req_len, | ||
const ut8 * | buf, | ||
const ut32 | buf_len | ||
) |
Definition at line 41 of file kd.c.
References buf_len, desc, id, iob_write(), kd_data_checksum(), KD_E_IOERR, KD_E_MALFORMED, KD_E_OK, KD_IO_PIPE, KD_MAX_PAYLOAD, KD_PACKET_DATA, PFMT32x, req, RZ_LOG_DEBUG, and type.
Referenced by do_io_reply(), winkd_continue(), and winkd_send_state_manipulate_req().