Lines Matching refs:cmsg

110 inet6_option_append(struct cmsghdr *cmsg, const u_int8_t *typep, int multx,  in inet6_option_append()  argument
114 u_char *bp = (u_char *)cmsg + cmsg->cmsg_len; in inet6_option_append()
115 struct ip6_ext *eh = (struct ip6_ext *)CMSG_DATA(cmsg); in inet6_option_append()
130 cmsg->cmsg_len += 2; in inet6_option_append()
140 cmsg->cmsg_len += padlen; in inet6_option_append()
150 cmsg->cmsg_len += optlen; in inet6_option_append()
157 cmsg->cmsg_len += padlen; in inet6_option_append()
179 inet6_option_alloc(struct cmsghdr *cmsg, int datalen, int multx, int plusy) in inet6_option_alloc() argument
182 u_int8_t *bp = (u_char *)cmsg + cmsg->cmsg_len; in inet6_option_alloc()
184 struct ip6_ext *eh = (struct ip6_ext *)CMSG_DATA(cmsg); in inet6_option_alloc()
199 cmsg->cmsg_len += 2; in inet6_option_alloc()
209 cmsg->cmsg_len += padlen; in inet6_option_alloc()
215 cmsg->cmsg_len += datalen; in inet6_option_alloc()
222 cmsg->cmsg_len += padlen; in inet6_option_alloc()
241 inet6_option_next(const struct cmsghdr *cmsg, u_int8_t **tptrp) in inet6_option_next() argument
247 if (cmsg->cmsg_level != IPPROTO_IPV6 || in inet6_option_next()
248 (!is_ipv6_hopopts(cmsg->cmsg_type) && in inet6_option_next()
249 !is_ipv6_dstopts(cmsg->cmsg_type))) in inet6_option_next()
253 if (cmsg->cmsg_len < CMSG_SPACE(sizeof(struct ip6_ext))) in inet6_option_next()
255 ip6e = (struct ip6_ext *)CMSG_DATA(cmsg); in inet6_option_next()
257 if (cmsg->cmsg_len < CMSG_SPACE(hdrlen)) in inet6_option_next()
297 inet6_option_find(const struct cmsghdr *cmsg, u_int8_t **tptrp, int type) in inet6_option_find() argument
303 if (cmsg->cmsg_level != IPPROTO_IPV6 || in inet6_option_find()
304 (!is_ipv6_hopopts(cmsg->cmsg_type) && in inet6_option_find()
305 !is_ipv6_dstopts(cmsg->cmsg_type))) in inet6_option_find()
309 if (cmsg->cmsg_len < CMSG_SPACE(sizeof(struct ip6_ext))) in inet6_option_find()
311 ip6e = (struct ip6_ext *)CMSG_DATA(cmsg); in inet6_option_find()
313 if (cmsg->cmsg_len < CMSG_SPACE(hdrlen)) in inet6_option_find()