diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2019-05-26 23:28:19 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2019-05-26 23:28:19 +0200 |
commit | cc1fcd363455779275ef7a0bc296f71025ac6af7 (patch) | |
tree | 78ee4813e6943df96f727c7eed341def75a05d7a /src/main.h | |
parent | 8174a4aeaf2da4e452b2a735541420151c820349 (diff) | |
download | bbs-cc1fcd363455779275ef7a0bc296f71025ac6af7.tar.gz |
asdf
Diffstat (limited to 'src/main.h')
-rw-r--r-- | src/main.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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); |