2014-02-21 14:19:50 +00:00
|
|
|
/*! \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
|
2014-02-21 14:19:50 +00:00
|
|
|
/*!
|
|
|
|
* \brief sends a packet sends a packet to the established connection
|
2017-06-11 00:12:44 +00:00
|
|
|
* \param g the "instance" of the current libgdbr session
|
2014-02-21 14:19:50 +00:00
|
|
|
* \returns a failure code (currently -1) or 0 if call successfully
|
|
|
|
*/
|
2017-06-11 00:12:44 +00:00
|
|
|
int send_packet(libgdbr_t *g);
|
2014-02-21 14:19:50 +00:00
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Function reads data from the established connection
|
2017-06-11 00:12:44 +00:00
|
|
|
* \param g the "instance" of the current libgdbr session
|
2014-02-21 14:19:50 +00:00
|
|
|
* \returns a failure code (currently -1) or 0 if call successfully
|
|
|
|
*/
|
2017-06-11 00:12:44 +00:00
|
|
|
int read_packet(libgdbr_t *g);
|
|
|
|
|
|
|
|
int pack(libgdbr_t *g, const char *msg);
|
2014-02-21 14:19:50 +00:00
|
|
|
|
|
|
|
#endif
|