Lines Matching refs:cmsg
96 inet6_option_append(struct cmsghdr *cmsg, const u_int8_t *typep, int multx, in inet6_option_append() argument
100 u_char *bp = (u_char *)cmsg + cmsg->cmsg_len; in inet6_option_append()
101 struct ip6_ext *eh = (struct ip6_ext *)CMSG_DATA(cmsg); in inet6_option_append()
116 cmsg->cmsg_len += 2; in inet6_option_append()
126 cmsg->cmsg_len += padlen; in inet6_option_append()
136 cmsg->cmsg_len += optlen; in inet6_option_append()
143 cmsg->cmsg_len += padlen; in inet6_option_append()
165 inet6_option_alloc(struct cmsghdr *cmsg, int datalen, int multx, int plusy) in inet6_option_alloc() argument
168 u_int8_t *bp = (u_char *)cmsg + cmsg->cmsg_len; in inet6_option_alloc()
170 struct ip6_ext *eh = (struct ip6_ext *)CMSG_DATA(cmsg); in inet6_option_alloc()
185 cmsg->cmsg_len += 2; in inet6_option_alloc()
195 cmsg->cmsg_len += padlen; in inet6_option_alloc()
201 cmsg->cmsg_len += datalen; in inet6_option_alloc()
208 cmsg->cmsg_len += padlen; in inet6_option_alloc()
227 inet6_option_next(const struct cmsghdr *cmsg, u_int8_t **tptrp) in inet6_option_next() argument
233 if (cmsg->cmsg_level != IPPROTO_IPV6 || in inet6_option_next()
234 (cmsg->cmsg_type != IPV6_HOPOPTS && in inet6_option_next()
235 cmsg->cmsg_type != IPV6_DSTOPTS)) in inet6_option_next()
239 if (cmsg->cmsg_len < CMSG_SPACE(sizeof(struct ip6_ext))) in inet6_option_next()
241 ip6e = (struct ip6_ext *)CMSG_DATA(cmsg); in inet6_option_next()
243 if (cmsg->cmsg_len < CMSG_SPACE(hdrlen)) in inet6_option_next()
283 inet6_option_find(const struct cmsghdr *cmsg, u_int8_t **tptrp, int type) in inet6_option_find() argument
289 if (cmsg->cmsg_level != IPPROTO_IPV6 || in inet6_option_find()
290 (cmsg->cmsg_type != IPV6_HOPOPTS && in inet6_option_find()
291 cmsg->cmsg_type != IPV6_DSTOPTS)) in inet6_option_find()
295 if (cmsg->cmsg_len < CMSG_SPACE(sizeof(struct ip6_ext))) in inet6_option_find()
297 ip6e = (struct ip6_ext *)CMSG_DATA(cmsg); in inet6_option_find()
299 if (cmsg->cmsg_len < CMSG_SPACE(hdrlen)) in inet6_option_find()