From a3713b224b3e26c1e1435a3816cb8699eccbc139 Mon Sep 17 00:00:00 2001 From: Kim Huebel Date: Mon, 29 Mar 2021 09:50:39 +0100 Subject: [PATCH 1/7] Added API documentation --- API.md | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 API.md diff --git a/API.md b/API.md new file mode 100644 index 0000000..9254b80 --- /dev/null +++ b/API.md @@ -0,0 +1,75 @@ +# API-Call Documentation +## Introduction +As many of us know YSFReflectors use the YSF protocol to communicate with endpoints. These original commands are well +documented at http://ycs-wiki.xreflector.net/doku.php?id=start:protocols:ysf thanks to the YCS-team for hosting them. +pYSFReflector has also an extended set of commands you can use for fetching infos on the state of different things +when running the reflector. + +This document will show the commands and the replys expected from the reflector. + +## How To Issue A Call +First of all, it is very easy to have a command sent to a reflector. Simply use a command similar to this: + +`echo -n "YSFS" | nc -u 127.0.0.1 42000 -w 2 && echo` + +or in a more general form: + +`echo -n "" | nc -u -w 2 && echo` + +This line will send the chosen command to the reflector and prints out it's reply. + +## List Of Extended API-Commands +Here we will not describe the standard-commands in the YSF protocol but the extended commandset by the pYSFReflector. + +The format of the answer will be the corresponding answer-code and some values separated by `:` for each object in scope. +Several objects are separated by `;`. + +### QSRU - Query Reflector Uptime +#### Reply +`ASRU;57234;` + +#### Description +Uptime of reflector in seconds + +### QSRI - Query Reflector Info +#### Reply +`ASRI;62829:DE Germany:YSF262 BM263:pYSFReflector:20210326:1;` + +#### Description +ID:Name:Description:Software-Name:Version:Connections-Count + +### QGWL - Query Gateway List +#### Reply +`AGWL;DL-LNK:161.97.73.43:57313;2622-DL:178.238.234.72:42000;DG9VH:84.58.124.6:42140;` + +#### Description +Callsign:IP-Address:Port + +### QLHL - Query Last Heard List +#### Reply +`ALHL;DG9VH:DG9VH:ALL:724:29-03-2021 07-32-13:0;2622-DL:DN3VH:ALL:723:29-03-2021 07-31-52:0;` + +#### Description +Callsign:Gateway:Target:Position in List:Timestamp + +### QREJ - +#### Reply + +#### Description + +### QLHD - +#### Reply + +#### Description + +### QRED - +#### Reply + +#### Description + +### QACL - Query Access Control List-Statistics +#### Reply +`AACL;CS/0|AL/0|GW/0|IP/0;` + +#### Description +CS/Number of muted Callsigns|AL/Number of whitelisted Callsigns|GW/Number of muted Gateways|IP/Number of muted IP-Adresses \ No newline at end of file From 05a76168f0e33a7439eb8218acc025425e774cea Mon Sep 17 00:00:00 2001 From: Kim Huebel Date: Mon, 29 Mar 2021 11:19:49 +0100 Subject: [PATCH 2/7] moved to documentation --- API.md => documentation/API.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) rename API.md => documentation/API.md (89%) diff --git a/API.md b/documentation/API.md similarity index 89% rename from API.md rename to documentation/API.md index 9254b80..f72d826 100644 --- a/API.md +++ b/documentation/API.md @@ -54,22 +54,25 @@ Callsign:Gateway:Target:Position in List:Timestamp ### QREJ - #### Reply +`AREJ;` #### Description ### QLHD - #### Reply +`ALHD;` #### Description ### QRED - #### Reply +`ARED;` #### Description ### QACL - Query Access Control List-Statistics #### Reply -`AACL;CS/0|AL/0|GW/0|IP/0;` +`AACL;CS/2|AL/1|GW/1|IP/0;CS:DN3VH;CS:DG9VH;AL:N0CALL;GW:DN3VH;` #### Description -CS/Number of muted Callsigns|AL/Number of whitelisted Callsigns|GW/Number of muted Gateways|IP/Number of muted IP-Adresses \ No newline at end of file +CS/Number of muted Callsigns|AL/Number of whitelisted Callsigns|GW/Number of muted Gateways|IP/Number of muted IP-Adresses;List of Entries from deny.db From c73453167277c233ebbab4679f6576ba3e8af4b0 Mon Sep 17 00:00:00 2001 From: Kim Huebel Date: Mon, 29 Mar 2021 14:10:36 +0100 Subject: [PATCH 3/7] Updates --- documentation/API.md | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/documentation/API.md b/documentation/API.md index f72d826..67546ff 100644 --- a/documentation/API.md +++ b/documentation/API.md @@ -2,13 +2,13 @@ ## Introduction As many of us know YSFReflectors use the YSF protocol to communicate with endpoints. These original commands are well documented at http://ycs-wiki.xreflector.net/doku.php?id=start:protocols:ysf thanks to the YCS-team for hosting them. -pYSFReflector has also an extended set of commands you can use for fetching infos on the state of different things +pYSFReflector has also an extended set of commands you can use for fetching information on the state of different things when running the reflector. -This document will show the commands and the replys expected from the reflector. +This document will show the commands, and the replies expected from the reflector. ## How To Issue A Call -First of all, it is very easy to have a command sent to a reflector. Simply use a command similar to this: +First it is very easy to have a command sent to a reflector. Simply use a command similar to this: `echo -n "YSFS" | nc -u 127.0.0.1 42000 -w 2 && echo` @@ -16,12 +16,12 @@ or in a more general form: `echo -n "" | nc -u -w 2 && echo` -This line will send the chosen command to the reflector and prints out it's reply. +This line will send the chosen command to the reflector and prints out its reply. ## List Of Extended API-Commands -Here we will not describe the standard-commands in the YSF protocol but the extended commandset by the pYSFReflector. +Here we will not describe the standard-commands in the YSF protocol, but the extended command set by the pYSFReflector. -The format of the answer will be the corresponding answer-code and some values separated by `:` for each object in scope. +The format of the answer will be the corresponding answer-code, and some values separated by `:` for each object in scope. Several objects are separated by `;`. ### QSRU - Query Reflector Uptime @@ -36,7 +36,7 @@ Uptime of reflector in seconds `ASRI;62829:DE Germany:YSF262 BM263:pYSFReflector:20210326:1;` #### Description -ID:Name:Description:Software-Name:Version:Connections-Count +ID:Name:Description:Software-Name:Version:Status of Regular Expression Check (can be -1/0/1) ### QGWL - Query Gateway List #### Reply @@ -50,21 +50,23 @@ Callsign:IP-Address:Port `ALHL;DG9VH:DG9VH:ALL:724:29-03-2021 07-32-13:0;2622-DL:DN3VH:ALL:723:29-03-2021 07-31-52:0;` #### Description -Callsign:Gateway:Target:Position in List:Timestamp +Gateway:Callsign:Target:Timestamp:Position in List -### QREJ - +### QREJ - Query Rejected Callsigns/Gateways/IP-Addresses #### Reply -`AREJ;` +`AREJ;DG9VH/CS:DG9VH400:ALL:-1:29-03-2021 12-17-08:-1;` #### Description -### QLHD - + +### QLHD - Query Last Heard List (with distinct callsigns) #### Reply -`ALHD;` +`ALHD;2622-DL:DO7VN:ALL:2:29-03-2021 12-13-27:6;2622-DL:DH1VY:ALL:1:29-03-2021 11-45-30:0;` #### Description +Gateway:Callsign:Target:Timestamp:Position in List -### QRED - +### QRED - Query Rejected Callsigns/Gateways/IP-Addresses (with distinct data) #### Reply `ARED;` @@ -75,4 +77,4 @@ Callsign:Gateway:Target:Position in List:Timestamp `AACL;CS/2|AL/1|GW/1|IP/0;CS:DN3VH;CS:DG9VH;AL:N0CALL;GW:DN3VH;` #### Description -CS/Number of muted Callsigns|AL/Number of whitelisted Callsigns|GW/Number of muted Gateways|IP/Number of muted IP-Adresses;List of Entries from deny.db +CS/Number of muted Callsigns|AL/Number of whitelisted Callsigns|GW/Number of muted Gateways|IP/Number of muted IP-Addresses;List of Entries from deny.db From 34c4dec4d0a5a1c35736a4b2011e217fea4ec704 Mon Sep 17 00:00:00 2001 From: Kim Huebel Date: Mon, 29 Mar 2021 16:32:51 +0100 Subject: [PATCH 4/7] Updated --- documentation/API.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/API.md b/documentation/API.md index 67546ff..ed4d797 100644 --- a/documentation/API.md +++ b/documentation/API.md @@ -68,7 +68,7 @@ Gateway:Callsign:Target:Timestamp:Position in List ### QRED - Query Rejected Callsigns/Gateways/IP-Addresses (with distinct data) #### Reply -`ARED;` +`ARED;DG9VH/CS:DG9VH1A:ALL:-1:29-03-2021 15-18-54:-1;` #### Description From 0efb9eb7a008ee34030133dffc012ed9938ff959 Mon Sep 17 00:00:00 2001 From: Kim Huebel Date: Mon, 29 Mar 2021 16:33:57 +0100 Subject: [PATCH 5/7] Updated --- documentation/API.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/documentation/API.md b/documentation/API.md index ed4d797..f3f422f 100644 --- a/documentation/API.md +++ b/documentation/API.md @@ -57,7 +57,7 @@ Gateway:Callsign:Target:Timestamp:Position in List `AREJ;DG9VH/CS:DG9VH400:ALL:-1:29-03-2021 12-17-08:-1;` #### Description - +XXX TODO ### QLHD - Query Last Heard List (with distinct callsigns) #### Reply @@ -71,6 +71,7 @@ Gateway:Callsign:Target:Timestamp:Position in List `ARED;DG9VH/CS:DG9VH1A:ALL:-1:29-03-2021 15-18-54:-1;` #### Description +XXX TODO ### QACL - Query Access Control List-Statistics #### Reply From 643604e3de19c51c4a026255d00c6a514f17de56 Mon Sep 17 00:00:00 2001 From: Kim Huebel Date: Mon, 29 Mar 2021 17:13:51 +0100 Subject: [PATCH 6/7] Updated --- documentation/API.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/API.md b/documentation/API.md index f3f422f..f43c3ba 100644 --- a/documentation/API.md +++ b/documentation/API.md @@ -57,7 +57,7 @@ Gateway:Callsign:Target:Timestamp:Position in List `AREJ;DG9VH/CS:DG9VH400:ALL:-1:29-03-2021 12-17-08:-1;` #### Description -XXX TODO +Gateway/Rule that matched:Callsign:Target:Placeholder (Ignore):Timestamp:Placeholder (Ignore); ### QLHD - Query Last Heard List (with distinct callsigns) #### Reply @@ -71,7 +71,7 @@ Gateway:Callsign:Target:Timestamp:Position in List `ARED;DG9VH/CS:DG9VH1A:ALL:-1:29-03-2021 15-18-54:-1;` #### Description -XXX TODO +Gateway/Rule that matched:Callsign:Target:Placeholder (Ignore):Timestamp:Placeholder (Ignore); ### QACL - Query Access Control List-Statistics #### Reply From 9d43e6445ebf292311e1b443ad8f1a4f4671f6e8 Mon Sep 17 00:00:00 2001 From: Kim Huebel Date: Mon, 29 Mar 2021 18:05:35 +0100 Subject: [PATCH 7/7] Updated --- documentation/API.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/API.md b/documentation/API.md index f43c3ba..b62569f 100644 --- a/documentation/API.md +++ b/documentation/API.md @@ -50,7 +50,7 @@ Callsign:IP-Address:Port `ALHL;DG9VH:DG9VH:ALL:724:29-03-2021 07-32-13:0;2622-DL:DN3VH:ALL:723:29-03-2021 07-31-52:0;` #### Description -Gateway:Callsign:Target:Timestamp:Position in List +Gateway:Callsign:Target:id_stream:StartTime:Duration ### QREJ - Query Rejected Callsigns/Gateways/IP-Addresses #### Reply @@ -64,7 +64,7 @@ Gateway/Rule that matched:Callsign:Target:Placeholder (Ignore):Timestamp:Placeho `ALHD;2622-DL:DO7VN:ALL:2:29-03-2021 12-13-27:6;2622-DL:DH1VY:ALL:1:29-03-2021 11-45-30:0;` #### Description -Gateway:Callsign:Target:Timestamp:Position in List +Gateway:Callsign:Target:id_stream:StartTime:Duration ### QRED - Query Rejected Callsigns/Gateways/IP-Addresses (with distinct data) #### Reply