aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.h b/src/main.h
index 78329c6..25521be 100644
--- a/src/main.h
+++ b/src/main.h
@@ -30,6 +30,11 @@
#define PRINT_ERROR( str ) { printf("%s: %s\n", str, strerror(errno)); }
#endif
+#define ERROR_HELP( ... ) { \
+ printf(__VA_ARGS__); \
+ printf("Help goes here"); \
+ exit(1); }
+
struct prog_params
{
uint8_t telnet;
@@ -43,6 +48,7 @@ struct prog_params
char* serial_port;
uint32_t serial_baudrate;
+ uint8_t fork;
char* pidfile;
};
@@ -51,3 +57,5 @@ struct prog_params parse_args(int argc, char* argv[]);
void handle_connection(int _socket, struct sockaddr_in _addr);
int main(int argc, char* argv[]);
+
+void telnet_server(struct prog_params params);