Lines Matching defs:segments
49 * Return amount of space needed to hold N segments for the specified
53 inet6_rth_space(int type, int segments)
55 if (type != IPV6_RTHDR_TYPE_0 || segments < 0 ||
56 segments > MAX_RTHDR0_SEGMENTS)
60 segments * sizeof (struct in6_addr));
64 * Initializes rthdr structure. Verifies the segments against the length of
66 * Note that a routing header can only hold 127 segments since the length field
70 inet6_rth_init(void *bp, socklen_t bp_len, int type, int segments)
74 if (type != IPV6_RTHDR_TYPE_0 || segments < 0 ||
75 segments > MAX_RTHDR0_SEGMENTS)
79 segments * sizeof (struct in6_addr))
84 rthdr->ip6r0_len = (segments * 2);
118 int i, segments;
132 segments = rtin->ip6r0_len / 2;
135 for (i = 0; i < (segments + 1)/2; i++) {
137 rtout_addrs[i] = rtin_addrs[segments - 1 - i];
138 rtout_addrs[segments - 1 - i] = tmp;
140 rtout->ip6r0_segleft = segments;
145 * Return the number of segments in the routing header.