From b92c13d08e50c85a1e522b6ff5aa0b7227a06f0b Mon Sep 17 00:00:00 2001 From: phil <me@filou.se> Date: Mon, 26 Apr 2021 14:38:37 +0200 Subject: [PATCH] better documentation --- README.md | 26 +++++++++++++++++++------- src/utils/sapd/sapd.c | 12 +++++++++--- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index a26efc0..56b053a 100644 --- a/README.md +++ b/README.md @@ -256,13 +256,14 @@ Usage: ./sapd [-h|-?] | [-d] [-p <port>] [--l <mcast-scope>] [--s <mcast-scope>] Starts an (SDP-only) SAP server that maintains incoming SDPs, informs about updates and keeps announcing specified SDPs on network. Communicates through local port (/var/run/sapd.sock) -Logs to syslog (identity sapd) +Logs to syslog (identity sapd.d) Options: -h,-? Prints this info. -d,--daemonize Daemonize -v Also print syslog to STDERR - -p,--port <port> Listen on this port (default 9875) + -p,--port <port> + Listen/send on this port (default 9875) --l<mcast-scope>, --s<mcast-scope> Listens, sends respectively on these IPv4/6 multicast scopes (multiple possible). Scopes: 4g IPv4 SAP global (224.2.127.254) @@ -271,9 +272,10 @@ Options: 6ip4 IPv6 SAP ip4 scope local (FF03::2:7FFE) 6al IPv6 SAP admin local (FF04::2:7FFE) 6sl IPv6 SAP site local (FF05::2:7FFE) - Default listen: 4g + 4a + 6ll + Default listen: 4a Default send: 4a --ipv6-if IPv6 interface to listen on (default interface can fail) + --sdp-dir <path> Load all .sdp files from given directory on startup (equal to dynamically adding them) --rav Enable Ravenna session lookups --rav-no-autopub Disable automatic publishing of discovered ravenna sessions @@ -284,16 +286,26 @@ Options: Wait for this many seconds checking for SDP change of already published ravenna device (0 .. 360, default 0) --rav-no-handover - Discovered ravenna session that are also found through SAP will give NOT - up local management (assuming another source, possibly the originating device) - will actually handle this). + Discovered ravenna session that are also found through SAP will NOT give + up local management (ie will NOT continue to announce sessions). --rav-disable-server + Generally disables Ravenna service announcements and RTSP server (default enabled). + --rav-server-port <port> + Port on which to start RTSP server to server SDP files (default 9191). + --rav-no-autoannounce + Local services will not be automatically announced as ravenna services and + made available through the built in RTSP server (default enabled). + Compile time options: AES67_SAP_MIN_INTERVAL_SEC 30 // +- announce time, depends on SAP traffic AES67_SAP_MIN_TIMEOUT_SEC 600 AES67_SAPD_WITH_RAV 1 // Ravenna sessions supported? Examples: -sudo ./sapd -v --ipv6-if en7 & socat - UNIX-CONNECT:/var/run/sapd.sock,keepalive +sudo ./sapd -v --ipv6-if en7 +sudo ./sapd -v --sdp-dir /usr/local/my-sdp-files +sudo ./sapd -v --sdp-dir /usr/local/my-sdp-files --rav +sudo ./sapd -v --rav --rav-no-autopub --rav-no-autoannounce # rav sessions managed through local sock +socat - UNIX-CONNECT:/var/run/sapd.sock,keepalive # to connect to local sock ``` A SAP daemon with a local client interface that supports local registration of sessions aswell as lookup and injection of ravenna based sessions - somewhat like [RAV2SAP](https://www.ravenna-network.com/aes67/rav2sap/). diff --git a/src/utils/sapd/sapd.c b/src/utils/sapd/sapd.c index 55ac104..2758c24 100644 --- a/src/utils/sapd/sapd.c +++ b/src/utils/sapd/sapd.c @@ -359,13 +359,19 @@ static void help(FILE * fd) "\t --rav-no-autoannounce\n" "\t\t\t Local services will not be automatically announced as ravenna services and\n" "\t\t\t made available through the built in RTSP server (default enabled).\n" - #endif + #endif //AES67_SAPD_WITH_RAV == 1 "\nCompile time options:\n" "\t AES67_SAP_MIN_INTERVAL_SEC \t %d \t // +- announce time, depends on SAP traffic\n" "\t AES67_SAP_MIN_TIMEOUT_SEC \t %d \n" "\t AES67_SAPD_WITH_RAV \t\t %d \t // Ravenna sessions supported?\n" "\nExamples:\n" - "sudo %s -v --ipv6-if en7 & socat - UNIX-CONNECT:" AES67_SAPD_LOCAL_SOCK ",keepalive\n" + "sudo %s -v --ipv6-if en7\n" + "sudo %s -v --sdp-dir /usr/local/my-sdp-files\n" + #if AES67_SAPD_WITH_RAV == 1 + "sudo %s -v --sdp-dir /usr/local/my-sdp-files --rav\n" + "sudo %s -v --rav --rav-no-autopub --rav-no-autoannounce # rav sessions managed through local sock\n" + #endif //AES67_SAPD_WITH_RAV == 1 + "socat - UNIX-CONNECT:" AES67_SAPD_LOCAL_SOCK ",keepalive # to connect to local sock\n" , argv0, (u16_t)AES67_SAP_PORT, RAV_PUBLISH_DELAY_MAX, RAV_PUBLISH_DELAY_DEFAULT, @@ -373,7 +379,7 @@ static void help(FILE * fd) AES67_SAP_MIN_INTERVAL_SEC, AES67_SAP_MIN_TIMEOUT_SEC, AES67_SAPD_WITH_RAV, - argv0); + argv0,argv0,argv0,argv0); } static void sig_int(int sig) -- GitLab