summaryrefslogtreecommitdiff
path: root/ospfd/ospf_interface.h
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd/ospf_interface.h')
-rw-r--r--ospfd/ospf_interface.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/ospfd/ospf_interface.h b/ospfd/ospf_interface.h
index 08a2b11273..45d0b7943a 100644
--- a/ospfd/ospf_interface.h
+++ b/ospfd/ospf_interface.h
@@ -57,6 +57,7 @@ struct ospf_if_params {
DECLARE_IF_PARAM(struct in_addr, if_area);
uint32_t if_area_id_fmt;
+ bool type_cfg;
DECLARE_IF_PARAM(uint8_t, type); /* type of interface */
#define OSPF_IF_ACTIVE 0
#define OSPF_IF_PASSIVE 1
@@ -119,8 +120,14 @@ struct ospf_if_params {
/* point-to-multipoint delayed reflooding configuration */
bool p2mp_delay_reflood;
+ /* point-to-multipoint doesn't support broadcast */
+ bool p2mp_non_broadcast;
+
/* Opaque LSA capability at interface level (see RFC5250) */
DECLARE_IF_PARAM(bool, opaque_capable);
+
+ /* Name of prefix-list name for packet source address filtering. */
+ DECLARE_IF_PARAM(char *, nbr_filter_name);
};
enum { MEMBER_ALLROUTERS = 0,
@@ -185,6 +192,10 @@ struct ospf_interface {
/* OSPF Network Type. */
uint8_t type;
+#define OSPF_IF_NON_BROADCAST(O) \
+ (((O)->type == OSPF_IFTYPE_NBMA) || \
+ ((((O)->type == OSPF_IFTYPE_POINTOMULTIPOINT) && \
+ (O)->p2mp_non_broadcast)))
/* point-to-point DMVPN configuration */
uint8_t ptp_dmvpn;
@@ -192,6 +203,9 @@ struct ospf_interface {
/* point-to-multipoint delayed reflooding */
bool p2mp_delay_reflood;
+ /* point-to-multipoint doesn't support broadcast */
+ bool p2mp_non_broadcast;
+
/* State of Interface State Machine. */
uint8_t state;
@@ -232,6 +246,9 @@ struct ospf_interface {
/* List of configured NBMA neighbor. */
struct list *nbr_nbma;
+ /* Configured prefix-list for filtering neighbors. */
+ struct prefix_list *nbr_filter;
+
/* Graceful-Restart data. */
struct {
struct {
@@ -326,7 +343,6 @@ extern void ospf_if_update_params(struct interface *ifp, struct in_addr addr);
extern int ospf_if_new_hook(struct interface *ifp);
extern void ospf_if_init(void);
extern void ospf_if_stream_unset(struct ospf_interface *oi);
-extern void ospf_if_reset_variables(struct ospf_interface *oi);
extern int ospf_if_is_enable(struct ospf_interface *oi);
extern int ospf_if_get_output_cost(struct ospf_interface *oi);
extern void ospf_if_recalculate_output_cost(struct interface *ifp);
@@ -358,6 +374,7 @@ extern void ospf_crypt_key_add(struct list *list, struct crypt_key *key);
extern int ospf_crypt_key_delete(struct list *list, uint8_t key_id);
extern uint8_t ospf_default_iftype(struct interface *ifp);
extern int ospf_interface_neighbor_count(struct ospf_interface *oi);
+extern void ospf_intf_neighbor_filter_apply(struct ospf_interface *oi);
/* Set all multicast memberships appropriately based on the type and
state of the interface. */