Lines Matching defs:lacp
678 fill_lacp_pdu(aggr_port_t *portp, lacp_t *lacp)
687 lacp->subtype = LACP_SUBTYPE;
688 lacp->version = LACP_VERSION;
693 lacp->actor_info.tlv_type = ACTOR_TLV;
694 lacp->actor_info.information_len = sizeof (link_info_t);
695 lacp->actor_info.system_priority =
697 bcopy(aggrp->lg_addr, (uchar_t *)&lacp->actor_info.system_id,
699 lacp->actor_info.key = htons(pl->ActorOperPortKey);
700 lacp->actor_info.port_priority = htons(pl->ActorPortPriority);
701 lacp->actor_info.port = htons(pl->ActorPortNumber);
702 lacp->actor_info.state.state = pl->ActorOperPortState.state;
707 lacp->partner_info.tlv_type = PARTNER_TLV;
708 lacp->partner_info.information_len = sizeof (link_info_t);
709 lacp->partner_info.system_priority =
711 lacp->partner_info.system_id = pl->PartnerOperSystem;
712 lacp->partner_info.key = htons(pl->PartnerOperKey);
713 lacp->partner_info.port_priority =
715 lacp->partner_info.port = htons(pl->PartnerOperPortNum);
716 lacp->partner_info.state.state = pl->PartnerOperPortState.state;
719 lacp->tlv_collector = COLLECTOR_TLV;
720 lacp->collector_len = 0x10;
721 lacp->collector_max_delay = htons(aggrp->aggr.CollectorMaxDelay);
724 lacp->tlv_terminator = TERMINATOR_TLV;
725 lacp->terminator_len = 0x0;
1707 valid_lacp_pdu(aggr_port_t *portp, lacp_t *lacp)
1717 if ((lacp->actor_info.information_len != sizeof (link_info_t)) ||
1718 (lacp->partner_info.information_len != sizeof (link_info_t)) ||
1719 (lacp->collector_len != LACP_COLLECTOR_INFO_LEN) ||
1720 (lacp->terminator_len != LACP_TERMINATOR_INFO_LEN)) {
1723 lacp->terminator_len));
1824 record_PDU(aggr_port_t *portp, lacp_t *lacp)
1835 pl->PartnerOperPortNum = ntohs(lacp->actor_info.port);
1837 ntohs(lacp->actor_info.port_priority);
1838 pl->PartnerOperSystem = lacp->actor_info.system_id;
1840 htons(lacp->actor_info.system_priority);
1841 pl->PartnerOperKey = ntohs(lacp->actor_info.key);
1845 pl->PartnerOperPortState.state = lacp->actor_info.state.state;
1858 if (((ntohs(lacp->partner_info.port) == pl->ActorPortNumber) &&
1859 (ntohs(lacp->partner_info.port_priority) ==
1861 (ether_cmp(&lacp->partner_info.system_id,
1863 (ntohs(lacp->partner_info.system_priority) ==
1865 (ntohs(lacp->partner_info.key) == pl->ActorOperPortKey) &&
1866 (lacp->partner_info.state.bit.aggregation ==
1868 (!lacp->actor_info.state.bit.aggregation)) {
1871 lacp->actor_info.state.bit.sync;
1893 update_selected(aggr_port_t *portp, lacp_t *lacp)
1899 if ((pl->PartnerOperPortNum != ntohs(lacp->actor_info.port)) ||
1901 ntohs(lacp->actor_info.port_priority)) ||
1903 &lacp->actor_info.system_id) != 0) ||
1905 ntohs(lacp->actor_info.system_priority)) ||
1906 (pl->PartnerOperKey != ntohs(lacp->actor_info.key)) ||
1908 lacp->actor_info.state.bit.aggregation)) {
1956 update_NTT(aggr_port_t *portp, lacp_t *lacp)
1963 if ((pl->ActorPortNumber != ntohs(lacp->partner_info.port)) ||
1965 ntohs(lacp->partner_info.port_priority)) ||
1967 &lacp->partner_info.system_id) != 0) ||
1969 ntohs(lacp->partner_info.system_priority)) ||
1970 (pl->ActorOperPortKey != ntohs(lacp->partner_info.key)) ||
1972 lacp->partner_info.state.bit.activity) ||
1974 lacp->partner_info.state.bit.timeout) ||
1976 lacp->partner_info.state.bit.sync) ||
1978 lacp->partner_info.state.bit.aggregation)) {
1992 * - lacp - pointer in the case of a received LACPDU.
2001 lacp_receive_sm(aggr_port_t *portp, lacp_t *lacp)
2022 } else if (lacp != NULL) {
2035 if (!((lacp && (oldstate == LACP_CURRENT) &&
2063 lacp_receive_sm(portp, lacp);
2123 if (!lacp) /* no LACPDU so current_while_timer popped */
2134 if (!valid_lacp_pdu(portp, lacp)) {
2142 selected_updated = update_selected(portp, lacp);
2143 update_NTT(portp, lacp);
2144 sync_updated = record_PDU(portp, lacp);
2224 lacp_t *lacp;
2233 lacp = (lacp_t *)dmp->b_rptr;
2234 if (lacp->subtype != LACP_SUBTYPE && lacp->subtype != MARKER_SUBTYPE) {
2237 portp->lp_linkid, lacp->subtype));
2277 lacp_t *lacp;
2285 lacp = (lacp_t *)dmp->b_rptr;
2286 switch (lacp->subtype) {
2294 lacp_receive_sm(portp, lacp);