Lines Matching refs:cmsg
202 struct cmsghdr *cmsg; in inet6_srcrt_init() local
208 cmsg = (struct cmsghdr *) bp; in inet6_srcrt_init()
210 cmsg->cmsg_len = sizeof(struct cmsghdr) + sizeof(struct ip6_rthdr0); in inet6_srcrt_init()
211 cmsg->cmsg_level = SOL_IPV6; in inet6_srcrt_init()
212 cmsg->cmsg_type = IPV6_RTHDR; in inet6_srcrt_init()
214 return cmsg; in inet6_srcrt_init()
217 int inet6_srcrt_add(struct cmsghdr *cmsg, const struct in6_addr *addr) in inet6_srcrt_add() argument
221 hdr = (struct ip6_rthdr0 *) CMSG_DATA(cmsg); in inet6_srcrt_add()
223 cmsg->cmsg_len += sizeof(struct in6_addr); in inet6_srcrt_add()
1043 struct cmsghdr *cmsg; in main() local
1046 cmsg = (struct cmsghdr*)(cmsgbuf+cmsglen); in main()
1048 cmsg->cmsg_len = CMSG_LEN(sizeof(*ipi)); in main()
1049 cmsg->cmsg_level = SOL_IPV6; in main()
1050 cmsg->cmsg_type = IPV6_PKTINFO; in main()
1052 ipi = (struct in6_pktinfo*)CMSG_DATA(cmsg); in main()
1276 struct cmsghdr *cmsg; in receive_error_msg() local
1299 for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) { in receive_error_msg()
1300 if (cmsg->cmsg_level == SOL_IPV6) { in receive_error_msg()
1301 if (cmsg->cmsg_type == IPV6_RECVERR) in receive_error_msg()
1302 e = (struct sock_extended_err *)CMSG_DATA(cmsg); in receive_error_msg()