summaryrefslogtreecommitdiffstats
path: root/doxygen/examples/ssh_tr.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:54:46 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:54:46 +0000
commitcd7b005519ade8ab6c97fcb21590b71b7d1be6e3 (patch)
treec611a8d0cd5e8f68f41b8c2d16ba580e0f40a38d /doxygen/examples/ssh_tr.c
parentInitial commit. (diff)
downloadlibrtr-cd7b005519ade8ab6c97fcb21590b71b7d1be6e3.tar.xz
librtr-cd7b005519ade8ab6c97fcb21590b71b7d1be6e3.zip
Adding upstream version 0.8.0.upstream/0.8.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'doxygen/examples/ssh_tr.c')
-rw-r--r--doxygen/examples/ssh_tr.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/doxygen/examples/ssh_tr.c b/doxygen/examples/ssh_tr.c
new file mode 100644
index 0000000..28876ca
--- /dev/null
+++ b/doxygen/examples/ssh_tr.c
@@ -0,0 +1,18 @@
+#include "rtrlib/rtrlib.h"
+
+#include <stdlib.h>
+
+int main()
+{
+ struct tr_socket ssh_socket;
+ char ssh_host[] = "123.231.123.221";
+ char ssh_user[] = "rpki_user";
+ char ssh_hostkey[] = "/etc/rpki-rtr/hostkey";
+ char ssh_privkey[] = "/etc/rpki-rtr/client.priv";
+
+ struct tr_ssh_config config = {
+ ssh_host, 22, NULL, ssh_user, ssh_hostkey, ssh_privkey, NULL, NULL, 0, NULL
+ };
+
+ tr_ssh_init(&config, &ssh_socket);
+}