Lines Matching refs:cmsg
107 inet6_option_append(struct cmsghdr *cmsg, const u_int8_t *typep, int multx, in inet6_option_append() argument
111 u_char *bp = (u_char *)cmsg + cmsg->cmsg_len; in inet6_option_append()
112 struct ip6_ext *eh = (struct ip6_ext *)CMSG_DATA(cmsg); in inet6_option_append()
127 cmsg->cmsg_len += 2; in inet6_option_append()
137 cmsg->cmsg_len += padlen; in inet6_option_append()
147 cmsg->cmsg_len += optlen; in inet6_option_append()
154 cmsg->cmsg_len += padlen; in inet6_option_append()
176 inet6_option_alloc(struct cmsghdr *cmsg, int datalen, int multx, int plusy) in inet6_option_alloc() argument
179 u_int8_t *bp = (u_char *)cmsg + cmsg->cmsg_len; in inet6_option_alloc()
181 struct ip6_ext *eh = (struct ip6_ext *)CMSG_DATA(cmsg); in inet6_option_alloc()
196 cmsg->cmsg_len += 2; in inet6_option_alloc()
206 cmsg->cmsg_len += padlen; in inet6_option_alloc()
212 cmsg->cmsg_len += datalen; in inet6_option_alloc()
219 cmsg->cmsg_len += padlen; in inet6_option_alloc()
238 inet6_option_next(const struct cmsghdr *cmsg, u_int8_t **tptrp) in inet6_option_next() argument
244 if (cmsg->cmsg_level != IPPROTO_IPV6 || in inet6_option_next()
245 (!is_ipv6_hopopts(cmsg->cmsg_type) && in inet6_option_next()
246 !is_ipv6_dstopts(cmsg->cmsg_type))) in inet6_option_next()
250 if (cmsg->cmsg_len < CMSG_SPACE(sizeof(struct ip6_ext))) in inet6_option_next()
252 ip6e = (struct ip6_ext *)CMSG_DATA(cmsg); in inet6_option_next()
254 if (cmsg->cmsg_len < CMSG_SPACE(hdrlen)) in inet6_option_next()
294 inet6_option_find(const struct cmsghdr *cmsg, u_int8_t **tptrp, int type) in inet6_option_find() argument
300 if (cmsg->cmsg_level != IPPROTO_IPV6 || in inet6_option_find()
301 (!is_ipv6_hopopts(cmsg->cmsg_type) && in inet6_option_find()
302 !is_ipv6_dstopts(cmsg->cmsg_type))) in inet6_option_find()
306 if (cmsg->cmsg_len < CMSG_SPACE(sizeof(struct ip6_ext))) in inet6_option_find()
308 ip6e = (struct ip6_ext *)CMSG_DATA(cmsg); in inet6_option_find()
310 if (cmsg->cmsg_len < CMSG_SPACE(hdrlen)) in inet6_option_find()