Lines Matching refs:port

78 	struct portdata *port = arg;  in dlpi_notify()  local
84 if (port->speed == info->dni_speed / 1000) in dlpi_notify()
86 port->speed = info->dni_speed / 1000; in dlpi_notify()
87 if ((rc = STP_IN_changed_port_speed(port->port_index, in dlpi_notify()
88 port->speed)) != 0) in dlpi_notify()
90 port->name, STP_IN_get_error_explanation(rc)); in dlpi_notify()
94 if (memcmp(info->dni_physaddr, port->mac_addr, ETHERADDRL) != 0) in dlpi_notify()
95 rstp_change_mac(port, info->dni_physaddr); in dlpi_notify()
99 if (!port->phys_status) in dlpi_notify()
101 port->phys_status = B_FALSE; in dlpi_notify()
102 if (!port->admin_status || protect != DLADM_BRIDGE_PROT_STP || in dlpi_notify()
103 port->sdu_failed) in dlpi_notify()
105 if ((rc = STP_IN_enable_port(port->port_index, False)) != 0) in dlpi_notify()
107 port->name, STP_IN_get_error_explanation(rc)); in dlpi_notify()
111 if (port->phys_status) in dlpi_notify()
113 port->phys_status = B_TRUE; in dlpi_notify()
114 if (!port->admin_status || protect != DLADM_BRIDGE_PROT_STP || in dlpi_notify()
115 port->sdu_failed) { in dlpi_notify()
116 port->bpdu_protect = B_FALSE; in dlpi_notify()
124 if (port->admin_non_stp && port->bpdu_protect) { in dlpi_notify()
125 port->bpdu_protect = B_FALSE; in dlpi_notify()
126 enable_forwarding(port); in dlpi_notify()
128 if ((rc = STP_IN_enable_port(port->port_index, True)) != 0) in dlpi_notify()
130 port->name, STP_IN_get_error_explanation(rc)); in dlpi_notify()
136 port_dlpi_open(const char *portname, struct portdata *port, in port_dlpi_open() argument
150 rc = dlpi_open(portname, &port->dlpi, DLPI_RAW); in port_dlpi_open()
157 port->phys_status = B_TRUE; in port_dlpi_open()
158 port->sdu_failed = B_FALSE; in port_dlpi_open()
159 port->bpdu_protect = B_FALSE; in port_dlpi_open()
166 get_dladm_speed(port); in port_dlpi_open()
172 port->name = dlpi_linkname(port->dlpi); in port_dlpi_open()
179 if ((rc = dlpi_bind(port->dlpi, 0, NULL)) != DLPI_SUCCESS) { in port_dlpi_open()
184 if ((rc = dlpi_enabmulti(port->dlpi, bridge_group_address, in port_dlpi_open()
192 if ((rc = dlpi_enabnotify(port->dlpi, in port_dlpi_open()
194 DL_NOTE_SPEED, dlpi_notify, port, &port->notifyid)) != in port_dlpi_open()
200 rc = dlpi_get_physaddr(port->dlpi, DL_CURR_PHYS_ADDR, addrbuf, &alen); in port_dlpi_open()
203 port->name, dlpi_strerror(rc)); in port_dlpi_open()
208 alen, port->name); in port_dlpi_open()
211 (void) memcpy(port->mac_addr, addrbuf, ETHERADDRL); in port_dlpi_open()
214 int fd = dlpi_fd(port->dlpi); in port_dlpi_open()
238 (void) _link_ntoa(port->mac_addr, addrstr, ETHERADDRL, in port_dlpi_open()
241 port->name); in port_dlpi_open()