radare2/shlr/gdb/include/packet.h

33 lines
771 B
C
Raw Normal View History

/*! \file */
#ifndef PACKET_H
#define PACKET_H
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include "libgdbr.h"
#include <stdio.h>
2014-03-03 17:57:21 +00:00
#if __WINDOWS__
#include <windows.h>
2017-05-09 12:25:57 +00:00
#if !__CYGWIN__ && !defined(_MSC_VER)
2014-03-03 17:57:21 +00:00
#include <winsock.h>
#endif
2014-06-25 10:22:27 +00:00
#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