summaryrefslogtreecommitdiffstats
path: root/rtrlib/rtr/packets_private.h
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 /rtrlib/rtr/packets_private.h
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 'rtrlib/rtr/packets_private.h')
-rw-r--r--rtrlib/rtr/packets_private.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/rtrlib/rtr/packets_private.h b/rtrlib/rtr/packets_private.h
new file mode 100644
index 0000000..c8d5093
--- /dev/null
+++ b/rtrlib/rtr/packets_private.h
@@ -0,0 +1,32 @@
+/*
+ * This file is part of RTRlib.
+ *
+ * This file is subject to the terms and conditions of the MIT license.
+ * See the file LICENSE in the top level directory for more details.
+ *
+ * Website: http://rtrlib.realmv6.org/
+ */
+
+#ifndef RTR_PACKETS_PRIVATE_H
+#define RTR_PACKETS_PRIVATE_H
+
+#include "rtrlib/rtr/rtr_private.h"
+
+#include <arpa/inet.h>
+
+// error pdu: header(8) + len(4) + ipv6_pdu(32) + len(4) + 400*8 (400 char text)
+static const unsigned int RTR_MAX_PDU_LEN = 3248;
+static const unsigned int RTR_RECV_TIMEOUT = 60;
+static const unsigned int RTR_SEND_TIMEOUT = 60;
+
+void __attribute__((weak))
+rtr_change_socket_state(struct rtr_socket *rtr_socket, const enum rtr_socket_state new_state);
+int rtr_sync(struct rtr_socket *rtr_socket);
+int rtr_wait_for_sync(struct rtr_socket *rtr_socket);
+int rtr_send_serial_query(struct rtr_socket *rtr_socket);
+int rtr_send_reset_query(struct rtr_socket *rtr_socket);
+int rtr_check_interval_range(uint32_t interval, uint32_t minimum, uint32_t maximum);
+void apply_interval_value(struct rtr_socket *rtr_socket, uint32_t interval, enum rtr_interval_type type);
+int rtr_check_interval_option(struct rtr_socket *rtr_socket, int interval_mode, uint32_t interval,
+ enum rtr_interval_type type);
+#endif