From 63712037039b0f0cef34c144a089261dc9a59af1 Mon Sep 17 00:00:00 2001 From: Andrew Bettison Date: Mon, 7 Apr 2014 16:11:01 +0930 Subject: [PATCH] Finish removing SLIP code and test case More simplification of "serval.h" --- overlay_interface.c | 4 ++++ serval.h | 32 -------------------------------- tests/routing | 8 -------- 3 files changed, 4 insertions(+), 40 deletions(-) diff --git a/overlay_interface.c b/overlay_interface.c index eb9543f2..06d7364a 100644 --- a/overlay_interface.c +++ b/overlay_interface.c @@ -42,6 +42,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include #endif +// The size of the receive buffer. This effectively sets the MRU for packet radio interfaces where +// we have to buffer packets on the receive side. +#define OVERLAY_INTERFACE_RX_BUFFER_SIZE 2048 + int overlay_ready=0; overlay_interface overlay_interfaces[OVERLAY_MAX_INTERFACES]; int overlay_last_interface_number=-1; diff --git a/serval.h b/serval.h index 54a5ef60..653c354b 100644 --- a/serval.h +++ b/serval.h @@ -222,37 +222,6 @@ struct broadcast; extern int overlayMode; -// Specify the size of the receive buffer. -// This effectively sets the MRU for packet radio interfaces -// where we have to buffer packets on the receive side -#define OVERLAY_INTERFACE_RX_BUFFER_SIZE 2048 -// TX buffer must handle FEC encoded and encapsulated data, so needs to be -// larger. -#define OVERLAY_INTERFACE_TX_BUFFER_SIZE (2+2048*2) -// buffer size for reading RFD900 RSSI reports -// (minimum length is ~87 bytes, and includes 13 numeric fields -// each of which may presumably end up being ~10 bytes, so 256 bytes -// should be a safe size). -#define RSSI_TEXT_SIZE 256 - -struct slip_decode_state{ -#define SLIP_FORMAT_SLIP 0 -#define SLIP_FORMAT_UPPER7 1 -#define SLIP_FORMAT_MAVLINK 2 - int encapsulator; - int state; - unsigned char *src; - unsigned src_size; - char rssi_text[RSSI_TEXT_SIZE]; - unsigned rssi_len; - unsigned packet_length; - unsigned char dst[OVERLAY_INTERFACE_RX_BUFFER_SIZE]; - uint32_t crc; - unsigned src_offset; - unsigned dst_offset; -}; - - int server_pid(); const char *_server_pidfile_path(struct __sourceloc); #define server_pidfile_path() (_server_pidfile_path(__WHENCE__)) @@ -347,7 +316,6 @@ int directory_registration(); int directory_service_init(); int app_nonce_test(const struct cli_parsed *parsed, struct cli_context *context); -int app_slip_test(const struct cli_parsed *parsed, struct cli_context *context); int app_rhizome_direct_sync(const struct cli_parsed *parsed, struct cli_context *context); int app_monitor_cli(const struct cli_parsed *parsed, struct cli_context *context); int app_vomp_console(const struct cli_parsed *parsed, struct cli_context *context); diff --git a/tests/routing b/tests/routing index adf312df..e7e149f2 100755 --- a/tests/routing +++ b/tests/routing @@ -253,14 +253,6 @@ test_single_p2p() { tfw_cat --stdout --stderr } -doc_slip_encoding="Test slip encoding and decoding" -setup_slip_encoding() { - setup_servald - assert_no_servald_processes -} -test_slip_encoding() { - executeOk_servald test slip --seed=1 --iterations=2000 -} start_fakeradio() { $servald_build_root/fakeradio 4 1 > "$SERVALD_VAR/radioout" 2> "$SERVALD_VAR/radioerr" & FAKERADIO_PID=$!