aboutsummaryrefslogtreecommitdiffstats
path: root/memdump/ymsend.h
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-09-21 16:52:35 -0700
committerH. Peter Anvin <hpa@zytor.com>2007-09-21 16:52:35 -0700
commit5a16eeb519c87fa4c437e838af81731b8d355052 (patch)
treef59258a720429d5ad8beaf2070f73cab6a187077 /memdump/ymsend.h
parent31daeb2ddb972dc70b929da1c93288e821c87ed7 (diff)
downloadsyslinux-elf-5a16eeb519c87fa4c437e838af81731b8d355052.tar.gz
syslinux-elf-5a16eeb519c87fa4c437e838af81731b8d355052.tar.xz
syslinux-elf-5a16eeb519c87fa4c437e838af81731b8d355052.zip
memdump: a debugging utility to dump memory over a serial port
A memory-dumping utility which runs in real mode. Thus, it can be used to get memory dumps from a relatively pristine system.
Diffstat (limited to 'memdump/ymsend.h')
-rw-r--r--memdump/ymsend.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/memdump/ymsend.h b/memdump/ymsend.h
new file mode 100644
index 00000000..9bcd5403
--- /dev/null
+++ b/memdump/ymsend.h
@@ -0,0 +1,27 @@
+#ifndef YMSEND_H
+#define YMSEND_H
+
+#include "mystuff.h"
+
+struct serial_if {
+ int port;
+ void *pvt;
+ void (*read)(struct serial_if *, void *, size_t);
+ void (*write)(struct serial_if *, const void *, size_t);
+};
+
+struct file_info {
+ const char *name;
+ size_t size;
+ void *pvt;
+};
+
+void send_ymodem(struct serial_if *, struct file_info *,
+ void (*)(void *, size_t, struct file_info *, size_t));
+void end_ymodem(struct serial_if *);
+
+int serial_init(struct serial_if *sif);
+void serial_read(struct serial_if *sif, void *data, size_t n);
+void serial_write(struct serial_if *sif, const void *data, size_t n);
+
+#endif /* YMSEND_H */