Lines Matching refs:end

273 get_dhcpv4_option(struct dhcp *dh4, uchar_t *end, uint8_t type,
279 while (start < end) {
308 get_dhcpv4_info(ipha_t *ipha, uchar_t *end, struct dhcp **dh4)
332 if ((uchar_t *)&udph[1] > end)
346 if (dh + BASE_PKT_SIZE > end)
571 intercept_dhcpv4_outbound(mac_client_impl_t *mcip, ipha_t *ipha, uchar_t *end)
580 if (get_dhcpv4_info(ipha, end, &dh4) != 0)
587 if (get_dhcpv4_option(dh4, end, CD_DHCP_TYPE, &opt, &opt_len) != 0 ||
601 if (get_dhcpv4_option(dh4, end, CD_CLIENT_ID, &opt, &opt_len) == 0 &&
639 if (get_dhcpv4_option(dh4, end, CD_REQUESTED_IP_ADDR,
669 intercept_dhcpv4_inbound(mac_client_impl_t *mcip, uchar_t *end,
676 if (get_dhcpv4_option(dh4, end, CD_DHCP_TYPE, &opt, &opt_len) != 0 ||
807 get_dhcpv6_info(ip6_t *ip6h, uchar_t *end, dhcpv6_message_t **dh6)
816 if (!mac_ip_hdr_length_v6(ip6h, end, &hdrlen, &proto, &frag))
835 if ((uchar_t *)&udph[1] > end)
849 if (dh + sizeof (dhcpv6_message_t) > end)
857 get_ra_info(ip6_t *ip6h, uchar_t *end, nd_router_advert_t **ra)
865 if (!mac_ip_hdr_length_v6(ip6h, end, &hdrlen, &proto, &frag))
888 if ((hdrp + sizeof (struct icmp6_hdr)) > end) {
937 get_dhcpv6_status(dhcpv6_message_t *dh6, uchar_t *end, uint16_t *status)
943 d6o = get_dhcpv6_option(&dh6[1], end - (uchar_t *)&dh6[1], NULL,
951 if ((uchar_t *)d6o + olen > end)
967 get_dhcpv6_addrs(dhcpv6_message_t *dh6, uchar_t *end, dhcpv6_cid_t *cid)
974 while ((d6o = get_dhcpv6_option(&dh6[1], end - (uchar_t *)&dh6[1],
983 (uchar_t *)d6o + olen > end)
992 (uchar_t *)d6so + solen > end)
1052 create_dhcpv6_cid(dhcpv6_message_t *dh6, uchar_t *end)
1059 d6o = get_dhcpv6_option(&dh6[1], end - (uchar_t *)&dh6[1], NULL,
1061 if (d6o == NULL || (uchar_t *)d6o + olen > end)
1301 intercept_dhcpv6_outbound(mac_client_impl_t *mcip, ip6_t *ip6h, uchar_t *end)
1310 if (get_dhcpv6_info(ip6h, end, &dh6) != 0)
1329 if ((cid = create_dhcpv6_cid(dh6, end)) == NULL)
1371 intercept_dhcpv6_inbound(mac_client_impl_t *mcip, uchar_t *end,
1393 if (get_dhcpv6_status(dh6, end, &status) != 0 ||
1399 if (get_dhcpv6_addrs(dh6, end, txn->dt_cid) != 0) {
1515 intercept_ra_inbound(mac_client_impl_t *mcip, ip6_t *ip6h, uchar_t *end,
1529 ((uchar_t *)opt + sizeof (struct nd_opt_hdr)) <= end) {
1533 ((uchar_t *)opt + optlen) > end) {
1610 * Get the start/end pointers of an L3 packet and also do pullup if needed.
1614 get_l3_info(mblk_t *mp, size_t hdrsize, uchar_t **start, uchar_t **end,
1649 *end = e;
1658 uchar_t *start, *end;
1670 err = get_l3_info(mp, mhi.mhi_hdrsize, &start, &end, &nmp);
1682 if (start + sizeof (ipha_t) > end)
1685 if (get_dhcpv4_info(ipha, end, &dh4) == 0) {
1686 intercept_dhcpv4_inbound(mcip, end, dh4);
1695 if (start + sizeof (ip6_t) > end)
1698 if (get_dhcpv6_info(ip6h, end, &dh6) == 0) {
1699 intercept_dhcpv6_inbound(mcip, end, dh6);
1700 } else if (get_ra_info(ip6h, end, &ra) == 0) {
1701 intercept_ra_inbound(mcip, ip6h, end, ra);
1820 ip6_t *ip6h, uchar_t *end)
1837 if ((uchar_t *)&icmp_nd[1] > end)
1840 len = end - (uchar_t *)icmp_nd;
1935 uchar_t *start, *end;
1939 err = get_l3_info(mp, hdrsize, &start, &end, &nmp);
1951 if (start + sizeof (ipha_t) > end)
1957 if (!intercept_dhcpv4_outbound(mcip, ipha, end))
1967 if (start + sizeof (arh_t) > end)
1978 if (start + arplen > end)
1994 if (start + sizeof (ip6_t) > end)
2000 if (!ipnospoof_check_ndp(mcip, protect, ip6h, end))
2003 if (!intercept_dhcpv6_outbound(mcip, ip6h, end))
2033 ipha_t *ipha, uchar_t *end)
2041 if ((err = get_dhcpv4_info(ipha, end, &dh4)) != 0)
2049 if (get_dhcpv4_option(dh4, end, CD_CLIENT_ID, &cid, &optlen) == 0)
2064 ip6_t *ip6h, uchar_t *end)
2074 if ((err = get_dhcpv6_info(ip6h, end, &dh6)) != 0)
2085 d6o = get_dhcpv6_option(&dh6[1], end - (uchar_t *)&dh6[1], NULL,
2087 if (d6o == NULL || (uchar_t *)d6o + cidlen > end)
2122 uchar_t *start, *end;
2126 err = get_l3_info(mp, hdrsize, &start, &end, &nmp);
2138 if (start + sizeof (ipha_t) > end)
2141 if (!dhcpnospoof_check_v4(mcip, protect, ipha, end))
2149 if (start + sizeof (ip6_t) > end)
2152 if (!dhcpnospoof_check_v6(mcip, protect, ip6h, end))