Lines Matching defs:rthdr
61 * Initializes rthdr structure. Verifies the segments against the length of
69 struct ip6_rthdr0 *rthdr;
79 rthdr = (struct ip6_rthdr0 *)bp;
80 rthdr->ip6r0_nxt = 0;
81 rthdr->ip6r0_len = (segments * 2);
82 rthdr->ip6r0_type = type;
83 rthdr->ip6r0_segleft = 0; /* Incremented by rthdr_add */
84 *(uint32_t *)&rthdr->ip6r0_reserved = 0;
95 struct ip6_rthdr0 *rthdr;
98 rthdr = (struct ip6_rthdr0 *)bp;
99 if ((rthdr->ip6r0_segleft + 1) * 2 > rthdr->ip6r0_len) {
104 addrs = (struct in6_addr *)((char *)rthdr + sizeof (*rthdr));
105 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)
179 rv = (struct in6_addr *)((char *)rthdr + sizeof (*rthdr));