Lines Matching defs:uid_cfg
144 _check_stpm_config (IN UID_STP_CFG_T* uid_cfg)
146 if (uid_cfg->bridge_priority < MIN_BR_PRIO) {
147 stp_trace ("%d bridge_priority small", (int) uid_cfg->bridge_priority);
151 if (uid_cfg->bridge_priority > MAX_BR_PRIO) {
152 stp_trace ("%d bridge_priority large", (int) uid_cfg->bridge_priority);
156 if (uid_cfg->hello_time < MIN_BR_HELLOT) {
157 stp_trace ("%d hello_time small", (int) uid_cfg->hello_time);
161 if (uid_cfg->hello_time > MAX_BR_HELLOT) {
162 stp_trace ("%d hello_time large", (int) uid_cfg->hello_time);
166 if (uid_cfg->max_age < MIN_BR_MAXAGE) {
167 stp_trace ("%d max_age small", (int) uid_cfg->max_age);
171 if (uid_cfg->max_age > MAX_BR_MAXAGE) {
172 stp_trace ("%d max_age large", (int) uid_cfg->max_age);
176 if (uid_cfg->forward_delay < MIN_BR_FWDELAY) {
177 stp_trace ("%d forward_delay small", (int) uid_cfg->forward_delay);
181 if (uid_cfg->forward_delay > MAX_BR_FWDELAY) {
182 stp_trace ("%d forward_delay large", (int) uid_cfg->forward_delay);
186 if (2 * (uid_cfg->forward_delay - 1) < uid_cfg->max_age) {
190 if (uid_cfg->max_age < 2 * (uid_cfg->hello_time + 1)) {
238 STP_IN_stpm_get_cfg (IN int vlan_id, OUT UID_STP_CFG_T* uid_cfg)
242 uid_cfg->field_mask = 0;
253 uid_cfg->field_mask |= BR_CFG_STATE;
255 uid_cfg->stp_enabled = this->admin_state;
258 uid_cfg->field_mask |= BR_CFG_FORCE_VER;
260 uid_cfg->force_version = this->ForceVersion;
263 uid_cfg->field_mask |= BR_CFG_PRIO;
265 uid_cfg->bridge_priority = this->BrId.prio;
268 uid_cfg->field_mask |= BR_CFG_AGE;
270 uid_cfg->max_age = this->BrTimes.MaxAge;
273 uid_cfg->field_mask |= BR_CFG_HELLO;
275 uid_cfg->hello_time = this->BrTimes.HelloTime;
278 uid_cfg->field_mask |= BR_CFG_DELAY;
280 uid_cfg->forward_delay = this->BrTimes.ForwardDelay;
282 uid_cfg->hold_time = TxHoldCount;
289 STP_IN_port_get_cfg (int vlan_id, int port_index, UID_STP_PORT_CFG_T* uid_cfg)
308 uid_cfg->field_mask = 0;
310 uid_cfg->port_priority = port->port_id >> 8;
311 if (uid_cfg->port_priority != DEF_PORT_PRIO)
312 uid_cfg->field_mask |= PT_CFG_PRIO;
314 uid_cfg->admin_port_path_cost = port->adminPCost;
315 if (uid_cfg->admin_port_path_cost != ADMIN_PORT_PATH_COST_AUTO)
316 uid_cfg->field_mask |= PT_CFG_COST;
318 uid_cfg->admin_point2point = port->adminPointToPointMac;
319 if (uid_cfg->admin_point2point != DEF_P2P)
320 uid_cfg->field_mask |= PT_CFG_P2P;
322 uid_cfg->admin_edge = port->adminEdge;
323 if (uid_cfg->admin_edge != DEF_ADMIN_EDGE)
324 uid_cfg->field_mask |= PT_CFG_EDGE;
326 uid_cfg->admin_non_stp = port->admin_non_stp;
327 if (uid_cfg->admin_non_stp != DEF_ADMIN_NON_STP)
328 uid_cfg->field_mask |= PT_CFG_NON_STP;
331 uid_cfg->field_mask |= PT_CFG_MCHECK;
701 IN UID_STP_CFG_T* uid_cfg)
714 if (BR_CFG_PRIO & uid_cfg->field_mask) {
715 old.bridge_priority = uid_cfg->bridge_priority;
718 if (BR_CFG_AGE & uid_cfg->field_mask) {
719 old.max_age = uid_cfg->max_age;
722 if (BR_CFG_HELLO & uid_cfg->field_mask) {
723 old.hello_time = uid_cfg->hello_time;
726 if (BR_CFG_DELAY & uid_cfg->field_mask) {
727 old.forward_delay = uid_cfg->forward_delay;
730 if (BR_CFG_FORCE_VER & uid_cfg->field_mask) {
731 old.force_version = uid_cfg->force_version;
741 if ((BR_CFG_STATE & uid_cfg->field_mask) &&
742 (STP_DISABLED == uid_cfg->stp_enabled)) {
743 rc = _stp_in_stpm_enable (vlan_id, uid_cfg->vlan_name, STP_DISABLED);
749 uid_cfg->field_mask &= ~BR_CFG_STATE;
750 if (! uid_cfg->field_mask) {
761 this = stp_in_stpm_create (vlan_id, uid_cfg->vlan_name, &err_code);
784 if ((BR_CFG_STATE & uid_cfg->field_mask) &&
785 STP_DISABLED != uid_cfg->stp_enabled &&
787 rc = _stp_in_stpm_enable (vlan_id, uid_cfg->vlan_name, uid_cfg->stp_enabled);
808 IN UID_STP_PORT_CFG_T* uid_cfg)
826 if (PT_CFG_MCHECK & uid_cfg->field_mask) {
831 if (PT_CFG_COST & uid_cfg->field_mask) {
832 port->adminPCost = uid_cfg->admin_port_path_cost;
835 if (PT_CFG_PRIO & uid_cfg->field_mask) {
836 port->port_id = (uid_cfg->port_priority << 8) + port_index;
839 if (PT_CFG_P2P & uid_cfg->field_mask) {
840 port->adminPointToPointMac = uid_cfg->admin_point2point;
844 if (PT_CFG_EDGE & uid_cfg->field_mask) {
845 port->adminEdge = uid_cfg->admin_edge;
856 if (PT_CFG_NON_STP & uid_cfg->field_mask) {
858 if (port->roletrns->debug && port->admin_non_stp != uid_cfg->admin_non_stp) {
861 uid_cfg->admin_non_stp ? 'Y' : 'n');
864 port->admin_non_stp = uid_cfg->admin_non_stp;
868 if (PT_CFG_DBG_SKIP_RX & uid_cfg->field_mask) {
869 port->skip_rx = uid_cfg->skip_rx;
872 if (PT_CFG_DBG_SKIP_TX & uid_cfg->field_mask) {
873 port->skip_tx = uid_cfg->skip_tx;