mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-28 00:16:55 +00:00
d81f369fa1
* Fixes for packet too long * Proper escaping in packets and run-length encoding * Removed old cache code * Removed currently unnecessary code from client initialization * Preparation for customized packet sizes * Better packet-size configuration * Minimum packet size (for AVR) * mem_write too * Corrections to packing code * Was overcompensating for AVR. (pkt_sz = 16 => read_mem_len = 8)
33 lines
771 B
C
33 lines
771 B
C
/*! \file */
|
|
#ifndef PACKET_H
|
|
#define PACKET_H
|
|
|
|
#include <stdint.h>
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
#include "libgdbr.h"
|
|
#include <stdio.h>
|
|
#if __WINDOWS__
|
|
#include <windows.h>
|
|
#if !__CYGWIN__ && !defined(_MSC_VER)
|
|
#include <winsock.h>
|
|
#endif
|
|
#endif
|
|
/*!
|
|
* \brief sends a packet sends a packet to the established connection
|
|
* \param g the "instance" of the current libgdbr session
|
|
* \returns a failure code (currently -1) or 0 if call successfully
|
|
*/
|
|
int send_packet(libgdbr_t *g);
|
|
|
|
/*!
|
|
* \brief Function reads data from the established connection
|
|
* \param g the "instance" of the current libgdbr session
|
|
* \returns a failure code (currently -1) or 0 if call successfully
|
|
*/
|
|
int read_packet(libgdbr_t *g);
|
|
|
|
int pack(libgdbr_t *g, const char *msg);
|
|
|
|
#endif
|