version 1.1.1.2, 2013/07/21 23:54:40
|
version 1.1.1.3, 2016/11/02 10:09:12
|
Line 49
|
Line 49
|
#include "ospfd/ospf_snmp.h" |
#include "ospfd/ospf_snmp.h" |
#endif /* HAVE_SNMP */ |
#endif /* HAVE_SNMP */ |
|
|
| |
int |
int |
ospf_if_get_output_cost (struct ospf_interface *oi) |
ospf_if_get_output_cost (struct ospf_interface *oi) |
{ |
{ |
Line 241 ospf_if_new (struct ospf *ospf, struct interface *ifp,
|
Line 241 ospf_if_new (struct ospf *ospf, struct interface *ifp,
|
|
|
oi->crypt_seqnum = time (NULL); |
oi->crypt_seqnum = time (NULL); |
|
|
#ifdef HAVE_OPAQUE_LSA |
|
ospf_opaque_type9_lsa_init (oi); |
ospf_opaque_type9_lsa_init (oi); |
#endif /* HAVE_OPAQUE_LSA */ |
|
|
|
oi->ospf = ospf; |
oi->ospf = ospf; |
|
|
Line 295 ospf_if_cleanup (struct ospf_interface *oi)
|
Line 293 ospf_if_cleanup (struct ospf_interface *oi)
|
ospf_ls_upd_queue_empty (oi); |
ospf_ls_upd_queue_empty (oi); |
|
|
/* Reset pseudo neighbor. */ |
/* Reset pseudo neighbor. */ |
ospf_nbr_delete (oi->nbr_self); | ospf_nbr_self_reset (oi); |
oi->nbr_self = ospf_nbr_new (oi); | |
ospf_nbr_add_self (oi); | |
} |
} |
|
|
void |
void |
Line 307 ospf_if_free (struct ospf_interface *oi)
|
Line 303 ospf_if_free (struct ospf_interface *oi)
|
|
|
assert (oi->state == ISM_Down); |
assert (oi->state == ISM_Down); |
|
|
#ifdef HAVE_OPAQUE_LSA |
|
ospf_opaque_type9_lsa_term (oi); |
ospf_opaque_type9_lsa_term (oi); |
#endif /* HAVE_OPAQUE_LSA */ |
|
|
|
/* Free Pseudo Neighbour */ |
/* Free Pseudo Neighbour */ |
ospf_nbr_delete (oi->nbr_self); |
ospf_nbr_delete (oi->nbr_self); |
Line 334 ospf_if_free (struct ospf_interface *oi)
|
Line 328 ospf_if_free (struct ospf_interface *oi)
|
XFREE (MTYPE_OSPF_IF, oi); |
XFREE (MTYPE_OSPF_IF, oi); |
} |
} |
|
|
| |
/* |
/* |
* check if interface with given address is configured and |
* check if interface with given address is configured and |
* return it if yes. special treatment for PtP networks. |
* return it if yes. special treatment for PtP networks. |
Line 489 ospf_if_lookup_recv_if (struct ospf *ospf, struct in_a
|
Line 483 ospf_if_lookup_recv_if (struct ospf *ospf, struct in_a
|
|
|
return match; |
return match; |
} |
} |
| |
void |
void |
ospf_if_stream_set (struct ospf_interface *oi) |
ospf_if_stream_set (struct ospf_interface *oi) |
{ |
{ |
Line 518 ospf_if_stream_unset (struct ospf_interface *oi)
|
Line 512 ospf_if_stream_unset (struct ospf_interface *oi)
|
} |
} |
} |
} |
|
|
| |
static struct ospf_if_params * |
static struct ospf_if_params * |
ospf_new_if_params (void) |
ospf_new_if_params (void) |
{ |
{ |
Line 688 ospf_if_new_hook (struct interface *ifp)
|
Line 682 ospf_if_new_hook (struct interface *ifp)
|
SET_IF_PARAM (IF_DEF_PARAMS (ifp), auth_type); |
SET_IF_PARAM (IF_DEF_PARAMS (ifp), auth_type); |
IF_DEF_PARAMS (ifp)->auth_type = OSPF_AUTH_NOTSET; |
IF_DEF_PARAMS (ifp)->auth_type = OSPF_AUTH_NOTSET; |
|
|
#ifdef HAVE_OPAQUE_LSA |
|
rc = ospf_opaque_new_if (ifp); |
rc = ospf_opaque_new_if (ifp); |
#endif /* HAVE_OPAQUE_LSA */ |
|
return rc; |
return rc; |
} |
} |
|
|
Line 699 ospf_if_delete_hook (struct interface *ifp)
|
Line 691 ospf_if_delete_hook (struct interface *ifp)
|
{ |
{ |
int rc = 0; |
int rc = 0; |
struct route_node *rn; |
struct route_node *rn; |
#ifdef HAVE_OPAQUE_LSA |
|
rc = ospf_opaque_del_if (ifp); |
rc = ospf_opaque_del_if (ifp); |
#endif /* HAVE_OPAQUE_LSA */ |
|
|
|
route_table_finish (IF_OIFS (ifp)); |
route_table_finish (IF_OIFS (ifp)); |
|
|
Line 825 ospf_if_down (struct ospf_interface *oi)
|
Line 815 ospf_if_down (struct ospf_interface *oi)
|
return 1; |
return 1; |
} |
} |
|
|
| |
/* Virtual Link related functions. */ |
/* Virtual Link related functions. */ |
|
|
struct ospf_vl_data * |
struct ospf_vl_data * |
Line 1013 ospf_vl_set_params (struct ospf_vl_data *vl_data, stru
|
Line 1003 ospf_vl_set_params (struct ospf_vl_data *vl_data, stru
|
struct ospf_interface *voi; |
struct ospf_interface *voi; |
struct listnode *node; |
struct listnode *node; |
struct vertex_parent *vp = NULL; |
struct vertex_parent *vp = NULL; |
int i; | unsigned int i; |
struct router_lsa *rl; |
struct router_lsa *rl; |
|
|
voi = vl_data->vl_oi; |
voi = vl_data->vl_oi; |
Line 1194 ospf_vls_in_area (struct ospf_area *area)
|
Line 1184 ospf_vls_in_area (struct ospf_area *area)
|
return c; |
return c; |
} |
} |
|
|
| |
struct crypt_key * |
struct crypt_key * |
ospf_crypt_key_new () |
ospf_crypt_key_new () |
{ |
{ |
Line 1254 void
|
Line 1244 void
|
ospf_if_init () |
ospf_if_init () |
{ |
{ |
/* Initialize Zebra interface data structure. */ |
/* Initialize Zebra interface data structure. */ |
if_init (); |
|
om->iflist = iflist; |
om->iflist = iflist; |
if_add_hook (IF_NEW_HOOK, ospf_if_new_hook); |
if_add_hook (IF_NEW_HOOK, ospf_if_new_hook); |
if_add_hook (IF_DELETE_HOOK, ospf_if_delete_hook); |
if_add_hook (IF_DELETE_HOOK, ospf_if_delete_hook); |