#define KDP_RRQ 1
#define KDP_WRQ 2
#define KDP_DATA 3
#define KDP_ACK 4
#define KDP_ERROR 5
#define KDP_SEEK 6
#define KDP_EOF 7
struct corehdr {
short th_opcode;
union {
unsigned int tu_block;
unsigned int tu_code;
char tu_rpl[1];
} th_u;
char th_data[1];
}__attribute__((packed));
#define th_block th_u.tu_block
#define th_code th_u.tu_code
#define th_stuff th_u.tu_rpl
#define th_msg th_data
#define EUNDEF 0
#define ENOTFOUND 1
#define EACCESS 2
#define ENOSPACE 3
#define EBADOP 4
#define EBADID 5
#define EEXISTS 6
#define ENOUSER 7
#define CORE_REMOTE_PORT 1069
void kdp_panic_dump (void);
void abort_panic_transfer (void);
struct corehdr *create_panic_header(unsigned int request, const char *corename, unsigned length, unsigned block);
int kdp_send_panic_pkt (unsigned int request, char *corename, unsigned int length, void *panic_data);