Lines Matching refs:rthdr
64 * Initializes rthdr structure. Verifies the segments against the length of
72 struct ip6_rthdr0 *rthdr;
82 rthdr = (struct ip6_rthdr0 *)bp;
83 rthdr->ip6r0_nxt = 0;
84 rthdr->ip6r0_len = (segments * 2);
85 rthdr->ip6r0_type = type;
86 rthdr->ip6r0_segleft = 0; /* Incremented by rthdr_add */
87 *(uint32_t *)&rthdr->ip6r0_reserved = 0;
98 struct ip6_rthdr0 *rthdr;
101 rthdr = (struct ip6_rthdr0 *)bp;
102 if ((rthdr->ip6r0_segleft + 1) * 2 > rthdr->ip6r0_len) {
106 addrs = (struct in6_addr *)((char *)rthdr + sizeof (*rthdr));
107 addrs[rthdr->ip6r0_segleft++] = *addr;
150 struct ip6_rthdr0 *rthdr;
152 rthdr = (struct ip6_rthdr0 *)bp;
153 if (rthdr->ip6r0_type == 0) {
154 if (rthdr->ip6r0_len > MAX_RTHDR0_SEGMENTS * 2) {
157 return (rthdr->ip6r0_len / 2);
171 struct ip6_rthdr0 *rthdr;
174 rthdr = (struct ip6_rthdr0 *)bp;
175 if (index >= rthdr->ip6r0_len/2 || index < 0)
178 rv = (struct in6_addr *)((char *)rthdr + sizeof (*rthdr));