From 70206f9b122f28aa378a1504e21c7ba8f1f5587e Mon Sep 17 00:00:00 2001 From: BB Date: Mon, 1 May 2023 15:48:52 -0600 Subject: [PATCH] netgenie-server: Added skeleton for network genie server --- NetGuard | 2 +- server/NetGenieSrv.py | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 server/NetGenieSrv.py diff --git a/NetGuard b/NetGuard index efe1afd..0350e46 160000 --- a/NetGuard +++ b/NetGuard @@ -1 +1 @@ -Subproject commit efe1afd64c5507dd7ce17d2aee27714fa3d9f417 +Subproject commit 0350e46d6dbe398dc395675e348121fe3ae6624a diff --git a/server/NetGenieSrv.py b/server/NetGenieSrv.py new file mode 100644 index 0000000..6f8c86f --- /dev/null +++ b/server/NetGenieSrv.py @@ -0,0 +1,39 @@ +#!/bin/env python3 + +def check_bridge_socket():: + evt = None + return evt + +def handle_bridge_evt(evt): + """ + TODO: Whatever bridge events to handle + """ + + +def check_debug_socket(): + dbg_evt = None + return dbg_evt + +def handle_debug_evt(dbg_evt): + """ TODO: Do something with the events here.""" + +def run_loop(): + """ """ + while True: + # 1. Check the BridgeSocket + evt = check_bridge_socket() + if evt != None: + handle_bridge_evt(evt) + dbg_evt = check_debug_socket() + if dbg_evt != None: + handle_debug_evt(dbg_evt) +def main(): + """ + 1. TODO: Open Server port that the device connects to. + 2. TODO: Open Server port that an admin connects to, i.e., to test sending packets to + 3. TODO: + """ + + +if __name__ == '__main__': + main()