We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6dc2a4d commit 9ab1989Copy full SHA for 9ab1989
README.md
@@ -73,7 +73,6 @@ Other distributions provide equivalent packages, which at minimum allow compilin
73
- [ ] Support other CPU architectures (x32, ARM32, MIPS, PowerPC, POWER, RISC-V)
74
- [ ] Use of `_stext` in x64 to bypass missing `CONFIG_KALLSYMS_ALL`
75
- [ ] Bruteforce scanning (?) for page containing same data of `_stext` page in ARM64 to bypass missing `CONFIG_KALLSYMS_ALL`
76
-- [ ] Implement network dump (UDP)
77
78
## Notes
79
lemon.c
@@ -24,7 +24,6 @@ static const struct argp_option options[] = {
24
{"disk", 'd', "PATH", 0, "Dump on disk", 0},
25
{"network", 'n', "ADDRESS", 0, "Dump through the network", 1},
26
{"port", 'p', "PORT", 0, "Specify port number", 1},
27
- {"udp", 'u', 0, 0, "Use UDP instead of TCP", 1},
28
{"realtime", 'r', 0, 0, "Use realtime priority", 2},
29
{"fatal", 'f', 0, 0, "Interrupt the dump in case of memory read error", 2},
30
{"raw", 'w', 0, 0, "Produce a RAW dump instead of a LiME one", 2},
@@ -71,10 +70,6 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state) {
71
70
case 'f':
72
opts->fatal = true;
break;
- case 'u':
- opts->udp = true;
- fprintf(stderr, "To be implemented...\n");
- exit(EXIT_FAILURE);
case 'w':
opts->raw = true;
80
lemon.h
@@ -9,7 +9,6 @@
9
10
#define HUGE_PAGE_SIZE 2 * 1024 * 1024 /* Same for huge pages */
11
#define DEFAULT_PORT 2304 /* Default port used for networt dump */
12
-#define UDP_MAX_PAYLOAD 1024 /* Maximum payload for UDP socket */
13
14
#define WARN(msg, ...) fprintf(stderr, "WARNING: " msg "\n", ##__VA_ARGS__)
15
@@ -24,7 +23,6 @@ struct options {
23
/* Network options */
unsigned long address;
unsigned short port;
- bool udp;
/* Options */
bool realtime;
net.c
@@ -8,7 +8,6 @@ extern int dump(const struct options *restrict opts, const struct ram_regions *r
8
/* Arguments passed to write_on_socket() */
struct net_args {
int sockfd;
};
@@ -54,7 +53,7 @@ int dump_on_net(const struct options *restrict opts, const struct ram_regions *r
54
53
int ret;
55
56
/* Create socket */
57
- sockfd = socket(AF_INET, opts->udp ? SOCK_DGRAM : SOCK_STREAM, 0);
+ sockfd = socket(AF_INET, SOCK_STREAM, 0);
58
if (sockfd < 0) {
59
perror("Fail to open network socket");
60
return errno;
@@ -73,7 +72,6 @@ int dump_on_net(const struct options *restrict opts, const struct ram_regions *r
/* Setup arguments for write_on_socket */
net_args.sockfd = sockfd;
- net_args.udp = opts->udp;
/* Dump! */
ret = dump(opts, ram_regions, write_on_socket, (void *)&net_args);
0 commit comments