MCPcopy Create free account
hub / github.com/axboe/liburing / io_uring_recvmsg_cmsg_nexthdr

Function io_uring_recvmsg_cmsg_nexthdr

src/include/liburing.h:1235–1255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1233}
1234
1235IOURINGINLINE struct cmsghdr *
1236io_uring_recvmsg_cmsg_nexthdr(struct io_uring_recvmsg_out *o, struct msghdr *msgh,
1237 struct cmsghdr *cmsg)
1238 LIBURING_NOEXCEPT
1239{
1240 unsigned char *end;
1241
1242 if (cmsg->cmsg_len < sizeof(struct cmsghdr))
1243 return NULL;
1244 end = (unsigned char *) io_uring_recvmsg_cmsg_firsthdr(o, msgh) +
1245 o->controllen;
1246 cmsg = (struct cmsghdr *)((unsigned char *) cmsg +
1247 CMSG_ALIGN(cmsg->cmsg_len));
1248
1249 if ((unsigned char *) (cmsg + 1) > end)
1250 return NULL;
1251 if (((unsigned char *) cmsg) + CMSG_ALIGN(cmsg->cmsg_len) > end)
1252 return NULL;
1253
1254 return cmsg;
1255}
1256
1257IOURINGINLINE void *io_uring_recvmsg_payload(struct io_uring_recvmsg_out *o,
1258 struct msghdr *msgh)

Callers 1

testFunction · 0.85

Calls 1

Tested by

no test coverage detected