#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;
int default_metric; /* Default metric for redistribute. */
+ /* NSSA default-information-originate */
+ struct {
+ /* # of NSSA areas requesting default information */
+ uint16_t refcnt;
+
+ /*
+ * Whether a default route known through non-OSPF protocol is
+ * present in the RIB.
+ */
+ bool status;
+ } nssa_default_import_check;
+
#define OSPF_LSA_REFRESHER_GRANULARITY 10
#define OSPF_LSA_REFRESHER_SLOTS \
((OSPF_LS_REFRESH_TIME + OSPF_LS_REFRESH_SHIFT) \
/* 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);
#define OSPF_TRANSIT_FALSE 0
#define OSPF_TRANSIT_TRUE 1
struct route_table *ranges; /* Configured Area Ranges. */
+ struct route_table *nssa_ranges; /* Configured NSSA Area Ranges. */
/* RFC3137 stub router state flags for area */
uint8_t stub_router_state;
#define PREFIX_LIST_OUT(A) (A)->plist_out.list
#define PREFIX_NAME_OUT(A) (A)->plist_out.name
+ /* NSSA default-information-originate */
+ struct {
+ bool enabled;
+ int metric_type;
+ int metric_value;
+ } nssa_default_originate;
+
/* Shortest Path Tree. */
struct vertex *spf;
struct list *spf_vertex_list;
extern int ospf_area_no_summary_unset(struct ospf *ospf,
struct in_addr area_id);
extern int ospf_area_nssa_set(struct ospf *ospf, struct in_addr area_id);
-extern int ospf_area_nssa_unset(struct ospf *ospf, struct in_addr area_id,
- int argc);
+extern int ospf_area_nssa_unset(struct ospf *ospf, struct in_addr area_id);
extern int ospf_area_nssa_suppress_fa_set(struct ospf *ospf,
struct in_addr area_id);
extern int ospf_area_nssa_suppress_fa_unset(struct ospf *ospf,
struct in_addr area_id);
extern int ospf_area_nssa_translator_role_set(struct ospf *ospf,
struct in_addr area_id, int role);
+extern void ospf_area_nssa_default_originate_set(struct ospf *ospf,
+ struct in_addr area_id,
+ int metric, int metric_type);
+extern void ospf_area_nssa_default_originate_unset(struct ospf *ospf,
+ struct in_addr area_id);
extern int ospf_area_export_list_set(struct ospf *ospf,
struct ospf_area *area_id,
const char *list_name);
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);