summaryrefslogtreecommitdiffstats
path: root/ospfd/ospfd.h
diff options
context:
space:
mode:
authorMark Stapp <mjs@labn.net>2023-04-06 19:40:23 +0200
committerMark Stapp <mjs@labn.net>2023-04-06 20:16:43 +0200
commit6e6e1020dd6e974557159740fcbb8ac395a2ef73 (patch)
tree3aecd7521860168551bd33ba1079b7c180af3828 /ospfd/ospfd.h
parentMerge pull request #13194 from Keelan10/sharpd-memory-leak (diff)
downloadfrr-6e6e1020dd6e974557159740fcbb8ac395a2ef73.tar.xz
frr-6e6e1020dd6e974557159740fcbb8ac395a2ef73.zip
ospfd: support configuration of socket buffer sizes
Add configurable socket send and receive buffer sizes, configured at the instance level. Signed-off-by: Mark Stapp <mjs@labn.net>
Diffstat (limited to 'ospfd/ospfd.h')
-rw-r--r--ospfd/ospfd.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/ospfd/ospfd.h b/ospfd/ospfd.h
index af60e6cad..1b66d4d93 100644
--- a/ospfd/ospfd.h
+++ b/ospfd/ospfd.h
@@ -67,6 +67,9 @@
#define OSPF_LS_REFRESH_SHIFT (60 * 15)
#define OSPF_LS_REFRESH_JITTER 60
+/* Default socket buffer size */
+#define OSPF_DEFAULT_SOCK_BUFSIZE (8 * 1024 * 1024)
+
struct ospf_external {
unsigned short instance;
struct route_table *external_info;
@@ -424,6 +427,10 @@ struct ospf {
/* Flood Reduction configuration state */
bool fr_configured;
+ /* Socket buffer sizes */
+ uint32_t recv_sock_bufsize;
+ uint32_t send_sock_bufsize;
+
QOBJ_FIELDS;
};
DECLARE_QOBJ_TYPE(ospf);
@@ -793,6 +800,9 @@ int ospf_area_nssa_no_summary_set(struct ospf *ospf, struct in_addr area_id);
const char *ospf_get_name(const struct ospf *ospf);
extern struct ospf_interface *add_ospf_interface(struct connected *co,
struct ospf_area *area);
+/* Update socket bufsize(s), after config change */
+void ospf_update_bufsize(struct ospf *ospf, uint32_t recvsize,
+ uint32_t sendsize);
extern int p_spaces_compare_func(const struct p_space *a,
const struct p_space *b);