Much better communication model

This commit is contained in:
2019-12-15 18:32:34 -05:00
parent 450f4de756
commit 3972ac655e
9 changed files with 233 additions and 74 deletions

View File

@@ -3,11 +3,23 @@
#include "checkm8.h"
int dev_memset(struct pwned_device *dev, long addr, unsigned char c, int len);
int dev_memcpy(struct pwned_device *dev, long dest, long src, int len);
int dev_exec(struct pwned_device *dev, int response_len, int nargs, unsigned long long *args);
#define CMD_USB_READ_LIMIT 0xFF0
int dev_read_memory(struct pwned_device *dev, long addr, long len);
int dev_write_memory();
struct dev_cmd_resp
{
int ret;
unsigned long long magic;
unsigned char *data;
int len;
};
struct dev_cmd_resp *dev_memset(struct pwned_device *dev, long long addr, unsigned char c, int len);
struct dev_cmd_resp *dev_memcpy(struct pwned_device *dev, long long dest, long long src, int len);
struct dev_cmd_resp *dev_exec(struct pwned_device *dev, int response_len, int nargs, unsigned long long *args);
struct dev_cmd_resp *dev_read_memory(struct pwned_device *dev, long long addr, int len);
struct dev_cmd_resp *dev_write_memory(struct pwned_device *dev, long long addr, unsigned char *data, int len);
void free_dev_cmd_resp(struct dev_cmd_resp *resp);
#endif //IPWNDFU_REWRITE_C_COMMAND_H