Lines Matching refs:this

37   register STPM_T* this;  in stp_in_stpm_create()  local
40 this = stpapi_stpm_find (vlan_id); in stp_in_stpm_create()
41 if (this) { /* it had just been created :( */ in stp_in_stpm_create()
43 return this; in stp_in_stpm_create()
46 this = STP_stpm_create (vlan_id, name); in stp_in_stpm_create()
47 if (! this) { /* can't create stpm :( */ in stp_in_stpm_create()
53 return this; in stp_in_stpm_create()
60 register STPM_T* this; in _stp_in_stpm_enable() local
65 this = stpapi_stpm_find (vlan_id); in _stp_in_stpm_enable()
80 if (! this) { /* it had not yet been created */ in _stp_in_stpm_enable()
83 this = stp_in_stpm_create (vlan_id, name, &err_code); in _stp_in_stpm_enable()
84 if (! this) { in _stp_in_stpm_enable()
94 if (this->admin_state == admin_state) { /* nothing to do :) */ in _stp_in_stpm_enable()
98 rc = STP_stpm_enable (this, admin_state); in _stp_in_stpm_enable()
104 STP_stpm_delete (this); in _stp_in_stpm_enable()
114 register STPM_T* this; in stpapi_stpm_find() local
116 for (this = STP_stpm_get_the_list (); this; this = this->next) in stpapi_stpm_find()
117 if (vlan_id == this->vlan_id) in stpapi_stpm_find()
118 return this; in stpapi_stpm_find()
124 _stpapi_port_find (STPM_T* this, int port_index) in _stpapi_port_find() argument
128 for (port = this->ports; port; port = port->next) in _stpapi_port_find()
240 register STPM_T* this; in STP_IN_stpm_get_cfg() local
245 this = stpapi_stpm_find (vlan_id); in STP_IN_stpm_get_cfg()
247 if (!this) { /* it had not yet been created :( */ in STP_IN_stpm_get_cfg()
252 if (this->admin_state != STP_DISABLED) { in STP_IN_stpm_get_cfg()
255 uid_cfg->stp_enabled = this->admin_state; in STP_IN_stpm_get_cfg()
257 if (this->ForceVersion != 2) { in STP_IN_stpm_get_cfg()
260 uid_cfg->force_version = this->ForceVersion; in STP_IN_stpm_get_cfg()
262 if (this->BrId.prio != DEF_BR_PRIO) { in STP_IN_stpm_get_cfg()
265 uid_cfg->bridge_priority = this->BrId.prio; in STP_IN_stpm_get_cfg()
267 if (this->BrTimes.MaxAge != DEF_BR_MAXAGE) { in STP_IN_stpm_get_cfg()
270 uid_cfg->max_age = this->BrTimes.MaxAge; in STP_IN_stpm_get_cfg()
272 if (this->BrTimes.HelloTime != DEF_BR_HELLOT) { in STP_IN_stpm_get_cfg()
275 uid_cfg->hello_time = this->BrTimes.HelloTime; in STP_IN_stpm_get_cfg()
277 if (this->BrTimes.ForwardDelay != DEF_BR_FWDELAY) { in STP_IN_stpm_get_cfg()
280 uid_cfg->forward_delay = this->BrTimes.ForwardDelay; in STP_IN_stpm_get_cfg()
291 register STPM_T* this; in STP_IN_port_get_cfg() local
295 this = stpapi_stpm_find (vlan_id); in STP_IN_port_get_cfg()
297 if (!this) { /* it had not yet been created :( */ in STP_IN_port_get_cfg()
302 port = _stpapi_port_find (this, port_index); in STP_IN_port_get_cfg()
340 register STPM_T* this; in STP_IN_port_get_state() local
344 this = stpapi_stpm_find (vlan_id); in STP_IN_port_get_state()
346 if (!this) { /* it had not yet been created :( */ in STP_IN_port_get_state()
351 port = _stpapi_port_find (this, entry->port_no); in STP_IN_port_get_state()
428 register STPM_T* this; in STP_IN_stpm_get_state() local
431 this = stpapi_stpm_find (vlan_id); in STP_IN_stpm_get_state()
433 if (!this) { /* it had not yet been created :( */ in STP_IN_stpm_get_state()
438 (void) strncpy (entry->vlan_name, this->name, NAME_LEN); in STP_IN_stpm_get_state()
439 entry->vlan_id = this->vlan_id; in STP_IN_stpm_get_state()
440 _conv_br_id_2_uid (&this->rootPrio.root_bridge, &entry->designated_root); in STP_IN_stpm_get_state()
441 entry->root_path_cost = this->rootPrio.root_path_cost; in STP_IN_stpm_get_state()
442 entry->root_port = this->rootPortId; in STP_IN_stpm_get_state()
443 entry->max_age = this->rootTimes.MaxAge; in STP_IN_stpm_get_state()
444 entry->forward_delay = this->rootTimes.ForwardDelay; in STP_IN_stpm_get_state()
445 entry->hello_time = this->rootTimes.HelloTime; in STP_IN_stpm_get_state()
447 _conv_br_id_2_uid (&this->BrId, &entry->bridge_id); in STP_IN_stpm_get_state()
449 entry->stp_enabled = this->admin_state; in STP_IN_stpm_get_state()
451 entry->timeSince_Topo_Change = this->timeSince_Topo_Change; in STP_IN_stpm_get_state()
452 entry->Topo_Change_Count = this->Topo_Change_Count; in STP_IN_stpm_get_state()
453 entry->Topo_Change = this->Topo_Change; in STP_IN_stpm_get_state()
604 register STPM_T* this; in STP_IN_rx_bpdu() local
614 this = stpapi_stpm_find (vlan_id); in STP_IN_rx_bpdu()
615 if (! this) { /* the stpm had not yet been created :( */ in STP_IN_rx_bpdu()
620 if (STP_DISABLED == this->admin_state) {/* the stpm had not yet been enabled :( */ in STP_IN_rx_bpdu()
625 port = _stpapi_port_find (this, port_index); in STP_IN_rx_bpdu()
660 _stp_in_enable_port_on_stpm (this, port->port_index, True); in STP_IN_rx_bpdu()
673 (void) STP_stpm_update (this); in STP_IN_rx_bpdu()
705 register STPM_T* this; in STP_IN_stpm_set_cfg() local
757 this = stpapi_stpm_find (vlan_id); in STP_IN_stpm_set_cfg()
760 if (! this) { /* it had not yet been created */ in STP_IN_stpm_set_cfg()
761 this = stp_in_stpm_create (vlan_id, uid_cfg->vlan_name, &err_code); in STP_IN_stpm_set_cfg()
762 if (! this) { in STP_IN_stpm_set_cfg()
768 prev_prio = this->BrId.prio; in STP_IN_stpm_set_cfg()
769 this->BrId.prio = old.bridge_priority; in STP_IN_stpm_set_cfg()
770 if (STP_ENABLED == this->admin_state) { in STP_IN_stpm_set_cfg()
771 if (0 != STP_stpm_check_bridge_priority (this)) { in STP_IN_stpm_set_cfg()
772 this->BrId.prio = prev_prio; in STP_IN_stpm_set_cfg()
779 this->BrTimes.MaxAge = old.max_age; in STP_IN_stpm_set_cfg()
780 this->BrTimes.HelloTime = old.hello_time; in STP_IN_stpm_set_cfg()
781 this->BrTimes.ForwardDelay = old.forward_delay; in STP_IN_stpm_set_cfg()
782 this->ForceVersion = (PROTOCOL_VERSION_T) old.force_version; in STP_IN_stpm_set_cfg()
786 STP_DISABLED == this->admin_state) { in STP_IN_stpm_set_cfg()
791 STP_stpm_delete (this); in STP_IN_stpm_set_cfg()
799 if (! enabled_here && STP_DISABLED != this->admin_state) { in STP_IN_stpm_set_cfg()
800 STP_stpm_update_after_bridge_management (this); in STP_IN_stpm_set_cfg()
810 register STPM_T* this; in STP_IN_port_set_cfg() local
814 this = stpapi_stpm_find (vlan_id); in STP_IN_port_set_cfg()
815 if (! this) { /* it had not yet been created :( */ in STP_IN_port_set_cfg()
821 port = _stpapi_port_find (this, port_index); in STP_IN_port_set_cfg()
827 if (this->ForceVersion >= NORMAL_RSTP) in STP_IN_port_set_cfg()
881 (void) STP_stpm_update (this); in STP_IN_port_set_cfg()
894 register STPM_T* this; in STP_IN_dbg_set_port_trace() local
899 this = stpapi_stpm_find (vlan_id); in STP_IN_dbg_set_port_trace()
900 if (! this) { /* it had not yet been created :( */ in STP_IN_dbg_set_port_trace()
906 port = _stpapi_port_find (this, port_no); in STP_IN_dbg_set_port_trace()
938 STPM_T *this; in STP_IN_port_add() local
943 this = stpapi_stpm_find (vlan_id); in STP_IN_port_add()
945 if (!this) { /* it had not yet been created :( */ in STP_IN_port_add()
950 port = this->ports; in STP_IN_port_add()
952 if (! STP_port_create (this, port_index)) { in STP_IN_port_add()
960 rc = STP_stpm_start (this); in STP_IN_port_add()
970 STPM_T *this; in STP_IN_port_remove() local
974 this = stpapi_stpm_find (vlan_id); in STP_IN_port_remove()
976 if (!this) { /* it had not yet been created :( */ in STP_IN_port_remove()
981 port = _stpapi_port_find (this, port_index); in STP_IN_port_remove()
989 if (!this->ports) in STP_IN_port_remove()
990 STP_stpm_stop (this); in STP_IN_port_remove()
999 STPM_T *this; in STP_IN_get_bridge_id() local
1002 this = stpapi_stpm_find (vlan_id); in STP_IN_get_bridge_id()
1003 *priority = this->BrId.prio; in STP_IN_get_bridge_id()
1004 (void) memcpy(mac, this->BrId.addr, 6); in STP_IN_get_bridge_id()