Lines Matching defs:rap
611 register struct icmp_ra *rap = (struct icmp_ra *)ALIGN(outpack);
621 rap->icmp_type = ICMP_ROUTERADVERT;
622 rap->icmp_code = 0;
623 rap->icmp_cksum = 0;
624 rap->icmp_num_addrs = 0;
625 rap->icmp_wpa = 2;
626 rap->icmp_lifetime = htons(lifetime);
637 if (packetlen + rap->icmp_wpa * 4 > sizeof (outpack)) {
640 rap->icmp_num_addrs);
646 packetlen += rap->icmp_wpa * 4;
647 rap->icmp_num_addrs++;
650 if (rap->icmp_num_addrs == 0)
654 rap->icmp_cksum = in_cksum((ushort_t *)rap, packetlen);
676 pr_type((int)rap->icmp_type),
808 struct icmp_ra *rap = (struct icmp_ra *)ALIGN(icp);
825 pr_type((int)rap->icmp_type),
829 if (rap->icmp_code != 0) {
832 pr_type((int)rap->icmp_type),
834 rap->icmp_code);
837 if (rap->icmp_num_addrs < 1) {
840 pr_type((int)rap->icmp_type),
844 if (rap->icmp_wpa < 2) {
847 pr_type((int)rap->icmp_type),
849 rap->icmp_wpa);
853 ICMP_MINLEN + rap->icmp_num_addrs * rap->icmp_wpa * 4) {
856 pr_type((int)rap->icmp_type),
860 rap->icmp_num_addrs *
861 rap->icmp_wpa * 4);
864 rap->icmp_lifetime = ntohs(rap->icmp_lifetime);
865 if ((rap->icmp_lifetime < 4 && rap->icmp_lifetime != 0) ||
866 rap->icmp_lifetime > 9000) {
869 pr_type((int)rap->icmp_type),
871 rap->icmp_lifetime);
876 pr_type((int)rap->icmp_type),
878 rap->icmp_lifetime);
884 for (i = 0; (unsigned)i < rap->icmp_num_addrs; i++) {
888 i * rap->icmp_wpa * 4);
900 rap->icmp_lifetime);