Skip to content

Commit 9ab1989

Browse files
committed
Remove UDP support
1 parent 6dc2a4d commit 9ab1989

File tree

4 files changed

+1
-11
lines changed

4 files changed

+1
-11
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ Other distributions provide equivalent packages, which at minimum allow compilin
7373
- [ ] Support other CPU architectures (x32, ARM32, MIPS, PowerPC, POWER, RISC-V)
7474
- [ ] Use of `_stext` in x64 to bypass missing `CONFIG_KALLSYMS_ALL`
7575
- [ ] Bruteforce scanning (?) for page containing same data of `_stext` page in ARM64 to bypass missing `CONFIG_KALLSYMS_ALL`
76-
- [ ] Implement network dump (UDP)
7776
7877
## Notes
7978

lemon.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ static const struct argp_option options[] = {
2424
{"disk", 'd', "PATH", 0, "Dump on disk", 0},
2525
{"network", 'n', "ADDRESS", 0, "Dump through the network", 1},
2626
{"port", 'p', "PORT", 0, "Specify port number", 1},
27-
{"udp", 'u', 0, 0, "Use UDP instead of TCP", 1},
2827
{"realtime", 'r', 0, 0, "Use realtime priority", 2},
2928
{"fatal", 'f', 0, 0, "Interrupt the dump in case of memory read error", 2},
3029
{"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) {
7170
case 'f':
7271
opts->fatal = true;
7372
break;
74-
case 'u':
75-
opts->udp = true;
76-
fprintf(stderr, "To be implemented...\n");
77-
exit(EXIT_FAILURE);
7873
case 'w':
7974
opts->raw = true;
8075
break;

lemon.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
#define HUGE_PAGE_SIZE 2 * 1024 * 1024 /* Same for huge pages */
1111
#define DEFAULT_PORT 2304 /* Default port used for networt dump */
12-
#define UDP_MAX_PAYLOAD 1024 /* Maximum payload for UDP socket */
1312

1413
#define WARN(msg, ...) fprintf(stderr, "WARNING: " msg "\n", ##__VA_ARGS__)
1514

@@ -24,7 +23,6 @@ struct options {
2423
/* Network options */
2524
unsigned long address;
2625
unsigned short port;
27-
bool udp;
2826

2927
/* Options */
3028
bool realtime;

net.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ extern int dump(const struct options *restrict opts, const struct ram_regions *r
88

99
/* Arguments passed to write_on_socket() */
1010
struct net_args {
11-
bool udp;
1211
int sockfd;
1312
};
1413

@@ -54,7 +53,7 @@ int dump_on_net(const struct options *restrict opts, const struct ram_regions *r
5453
int ret;
5554

5655
/* Create socket */
57-
sockfd = socket(AF_INET, opts->udp ? SOCK_DGRAM : SOCK_STREAM, 0);
56+
sockfd = socket(AF_INET, SOCK_STREAM, 0);
5857
if (sockfd < 0) {
5958
perror("Fail to open network socket");
6059
return errno;
@@ -73,7 +72,6 @@ int dump_on_net(const struct options *restrict opts, const struct ram_regions *r
7372

7473
/* Setup arguments for write_on_socket */
7574
net_args.sockfd = sockfd;
76-
net_args.udp = opts->udp;
7775

7876
/* Dump! */
7977
ret = dump(opts, ram_regions, write_on_socket, (void *)&net_args);

0 commit comments

Comments
 (0)