aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2019-05-26 23:28:19 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2019-05-26 23:28:19 +0200
commitcc1fcd363455779275ef7a0bc296f71025ac6af7 (patch)
tree78ee4813e6943df96f727c7eed341def75a05d7a /src/main.h
parent8174a4aeaf2da4e452b2a735541420151c820349 (diff)
downloadbbs-cc1fcd363455779275ef7a0bc296f71025ac6af7.tar.gz
asdf
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);