Lines Matching refs:cmsg

126 inet6_option_append(struct cmsghdr *cmsg, const uint8_t *typep, int multx,  in inet6_option_append()  argument
133 _DIAGASSERT(cmsg != NULL); in inet6_option_append()
136 bp = (uint8_t *)(void *)cmsg + cmsg->cmsg_len; in inet6_option_append()
137 eh = (struct ip6_ext *)(void *)CMSG_DATA(cmsg); in inet6_option_append()
152 cmsg->cmsg_len += 2; in inet6_option_append()
163 _DIAGASSERT(__type_fit(socklen_t, padlen + cmsg->cmsg_len)); in inet6_option_append()
164 cmsg->cmsg_len += (socklen_t)padlen; in inet6_option_append()
174 _DIAGASSERT(__type_fit(socklen_t, optlen + cmsg->cmsg_len)); in inet6_option_append()
175 cmsg->cmsg_len += (socklen_t)optlen; in inet6_option_append()
182 _DIAGASSERT(__type_fit(socklen_t, padlen + cmsg->cmsg_len)); in inet6_option_append()
183 cmsg->cmsg_len += (socklen_t)padlen; in inet6_option_append()
207 inet6_option_alloc(struct cmsghdr *cmsg, int datalen, int multx, int plusy) in inet6_option_alloc() argument
214 _DIAGASSERT(cmsg != NULL); in inet6_option_alloc()
216 bp = (uint8_t *)(void *)cmsg + cmsg->cmsg_len; in inet6_option_alloc()
217 eh = (struct ip6_ext *)(void *)CMSG_DATA(cmsg); in inet6_option_alloc()
232 cmsg->cmsg_len += 2; in inet6_option_alloc()
243 cmsg->cmsg_len += (socklen_t)padlen; in inet6_option_alloc()
249 cmsg->cmsg_len += datalen; in inet6_option_alloc()
256 _DIAGASSERT(__type_fit(socklen_t, padlen + cmsg->cmsg_len)); in inet6_option_alloc()
257 cmsg->cmsg_len += (socklen_t)padlen; in inet6_option_alloc()
278 inet6_option_next(const struct cmsghdr *cmsg, uint8_t **tptrp) in inet6_option_next() argument
284 _DIAGASSERT(cmsg != NULL); in inet6_option_next()
287 if (cmsg->cmsg_level != IPPROTO_IPV6 || in inet6_option_next()
288 (cmsg->cmsg_type != IPV6_HOPOPTS && in inet6_option_next()
289 cmsg->cmsg_type != IPV6_DSTOPTS)) in inet6_option_next()
293 if (cmsg->cmsg_len < CMSG_SPACE(sizeof(struct ip6_ext))) in inet6_option_next()
295 ip6e = __UNCONST(CCMSG_DATA(cmsg)); in inet6_option_next()
297 if (cmsg->cmsg_len < CMSG_SPACE(hdrlen)) in inet6_option_next()
337 inet6_option_find(const struct cmsghdr *cmsg, uint8_t **tptrp, int type) in inet6_option_find() argument
343 _DIAGASSERT(cmsg != NULL); in inet6_option_find()
346 if (cmsg->cmsg_level != IPPROTO_IPV6 || in inet6_option_find()
347 (cmsg->cmsg_type != IPV6_HOPOPTS && in inet6_option_find()
348 cmsg->cmsg_type != IPV6_DSTOPTS)) in inet6_option_find()
352 if (cmsg->cmsg_len < CMSG_SPACE(sizeof(struct ip6_ext))) in inet6_option_find()
354 ip6e = __UNCONST(CCMSG_DATA(cmsg)); in inet6_option_find()
356 if (cmsg->cmsg_len < CMSG_SPACE(hdrlen)) in inet6_option_find()