Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 56 lines (37 sloc) 0.771 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
/**

File: sdp.h

Project: DCPU-16 Tools
Component: Debugger

Authors: José Manuel Díez

Description: Socket debugging protocol header.

**/

#ifdef FEATURE_SDP

#ifndef __SDP_H
#define __SDP_H

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>

#include <dcpu.h>

#define BUFSIZE 1024
#define PORT 22348

#define SDP_EMULATOR_INFORMATION 0x0
#define SDP_MACHINE_STATE 0x1
#define SDP_MACHINE_SET_STATE 0x2
#define SDP_CLIENT_DISCONNECT 0xFE

#define SDP_REQUEST_CONFIRMATION 0x20

#define SDP_MAX_PAYLOAD 1000
#define SDP_MAX_STRING 500

typedef struct
{
uint8_t identifier;
uint32_t length;
unsigned char* payload;
} sdp_packet;

typedef struct
{
uint16_t length;
char* string;
} p_string;

void* ddbg_sdp_thread(vm_t* vm);

#endif

#endif
Something went wrong with that request. Please try again.