version 1.1, 2012/02/21 17:26:11
|
version 1.1.1.3, 2013/07/21 23:54:38
|
Line 36
|
Line 36
|
#include "isisd/include-netbsd/iso.h" |
#include "isisd/include-netbsd/iso.h" |
#include "isisd/isis_constants.h" |
#include "isisd/isis_constants.h" |
#include "isisd/isis_common.h" |
#include "isisd/isis_common.h" |
|
#include "isisd/isis_flags.h" |
#include "isisd/isis_circuit.h" |
#include "isisd/isis_circuit.h" |
#include "isisd/isis_tlv.h" |
#include "isisd/isis_tlv.h" |
#include "isisd/isis_lsp.h" |
#include "isisd/isis_lsp.h" |
Line 45
|
Line 46
|
#include "isisd/isis_constants.h" |
#include "isisd/isis_constants.h" |
#include "isisd/isis_adjacency.h" |
#include "isisd/isis_adjacency.h" |
#include "isisd/isis_dr.h" |
#include "isisd/isis_dr.h" |
#include "isisd/isis_flags.h" |
|
#include "isisd/isisd.h" |
#include "isisd/isisd.h" |
#include "isisd/isis_csm.h" |
#include "isisd/isis_csm.h" |
#include "isisd/isis_events.h" |
#include "isisd/isis_events.h" |
Line 85 isis_csm_state_change (int event, struct isis_circuit
|
Line 85 isis_csm_state_change (int event, struct isis_circuit
|
case C_STATE_NA: |
case C_STATE_NA: |
if (circuit) |
if (circuit) |
zlog_warn ("Non-null circuit while state C_STATE_NA"); |
zlog_warn ("Non-null circuit while state C_STATE_NA"); |
|
assert (circuit == NULL); |
switch (event) |
switch (event) |
{ |
{ |
case ISIS_ENABLE: |
case ISIS_ENABLE: |
Line 100 isis_csm_state_change (int event, struct isis_circuit
|
Line 101 isis_csm_state_change (int event, struct isis_circuit
|
break; |
break; |
case ISIS_DISABLE: |
case ISIS_DISABLE: |
zlog_warn ("circuit already disabled"); |
zlog_warn ("circuit already disabled"); |
|
break; |
case IF_DOWN_FROM_Z: |
case IF_DOWN_FROM_Z: |
zlog_warn ("circuit already disconnected"); |
zlog_warn ("circuit already disconnected"); |
break; |
break; |
} |
} |
break; |
break; |
case C_STATE_INIT: |
case C_STATE_INIT: |
|
assert (circuit); |
switch (event) |
switch (event) |
{ |
{ |
case ISIS_ENABLE: |
case ISIS_ENABLE: |
isis_circuit_configure (circuit, (struct isis_area *) arg); |
isis_circuit_configure (circuit, (struct isis_area *) arg); |
isis_circuit_up (circuit); | if (isis_circuit_up (circuit) != ISIS_OK) |
| { |
| isis_circuit_deconfigure (circuit, (struct isis_area *) arg); |
| break; |
| } |
circuit->state = C_STATE_UP; |
circuit->state = C_STATE_UP; |
isis_event_circuit_state_change (circuit, 1); | isis_event_circuit_state_change (circuit, circuit->area, 1); |
listnode_delete (isis->init_circ_list, circuit); |
listnode_delete (isis->init_circ_list, circuit); |
break; |
break; |
case IF_UP_FROM_Z: |
case IF_UP_FROM_Z: |
|
assert (circuit); |
zlog_warn ("circuit already connected"); |
zlog_warn ("circuit already connected"); |
break; |
break; |
case ISIS_DISABLE: |
case ISIS_DISABLE: |
zlog_warn ("circuit already disabled"); |
zlog_warn ("circuit already disabled"); |
break; |
break; |
case IF_DOWN_FROM_Z: |
case IF_DOWN_FROM_Z: |
isis_circuit_if_del (circuit); | isis_circuit_if_del (circuit, (struct interface *) arg); |
listnode_delete (isis->init_circ_list, circuit); |
listnode_delete (isis->init_circ_list, circuit); |
isis_circuit_del (circuit); |
isis_circuit_del (circuit); |
circuit = NULL; |
circuit = NULL; |
Line 130 isis_csm_state_change (int event, struct isis_circuit
|
Line 138 isis_csm_state_change (int event, struct isis_circuit
|
} |
} |
break; |
break; |
case C_STATE_CONF: |
case C_STATE_CONF: |
|
assert (circuit); |
switch (event) |
switch (event) |
{ |
{ |
case ISIS_ENABLE: |
case ISIS_ENABLE: |
Line 137 isis_csm_state_change (int event, struct isis_circuit
|
Line 146 isis_csm_state_change (int event, struct isis_circuit
|
break; |
break; |
case IF_UP_FROM_Z: |
case IF_UP_FROM_Z: |
isis_circuit_if_add (circuit, (struct interface *) arg); |
isis_circuit_if_add (circuit, (struct interface *) arg); |
isis_circuit_up (circuit); | if (isis_circuit_up (circuit) != ISIS_OK) |
| { |
| isis_circuit_if_del (circuit, (struct interface *) arg); |
| break; |
| } |
circuit->state = C_STATE_UP; |
circuit->state = C_STATE_UP; |
isis_event_circuit_state_change (circuit, 1); | isis_event_circuit_state_change (circuit, circuit->area, 1); |
break; |
break; |
case ISIS_DISABLE: |
case ISIS_DISABLE: |
isis_circuit_deconfigure (circuit, (struct isis_area *) arg); |
isis_circuit_deconfigure (circuit, (struct isis_area *) arg); |
Line 152 isis_csm_state_change (int event, struct isis_circuit
|
Line 165 isis_csm_state_change (int event, struct isis_circuit
|
} |
} |
break; |
break; |
case C_STATE_UP: |
case C_STATE_UP: |
|
assert (circuit); |
switch (event) |
switch (event) |
{ |
{ |
case ISIS_ENABLE: |
case ISIS_ENABLE: |
Line 161 isis_csm_state_change (int event, struct isis_circuit
|
Line 175 isis_csm_state_change (int event, struct isis_circuit
|
zlog_warn ("circuit already connected"); |
zlog_warn ("circuit already connected"); |
break; |
break; |
case ISIS_DISABLE: |
case ISIS_DISABLE: |
|
isis_circuit_down (circuit); |
isis_circuit_deconfigure (circuit, (struct isis_area *) arg); |
isis_circuit_deconfigure (circuit, (struct isis_area *) arg); |
listnode_add (isis->init_circ_list, circuit); |
|
circuit->state = C_STATE_INIT; |
circuit->state = C_STATE_INIT; |
isis_event_circuit_state_change (circuit, 0); | isis_event_circuit_state_change (circuit, |
| (struct isis_area *)arg, 0); |
| listnode_add (isis->init_circ_list, circuit); |
break; |
break; |
case IF_DOWN_FROM_Z: |
case IF_DOWN_FROM_Z: |
isis_circuit_if_del (circuit); | isis_circuit_down (circuit); |
| isis_circuit_if_del (circuit, (struct interface *) arg); |
circuit->state = C_STATE_CONF; |
circuit->state = C_STATE_CONF; |
isis_event_circuit_state_change (circuit, 0); | isis_event_circuit_state_change (circuit, circuit->area, 0); |
break; |
break; |
} |
} |
break; |
break; |