/third_party/rust/crates/libc/libc-test/test/ |
H A D | cmsg.rs | 16 pub fn cmsg_nxthdr(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr; in cmsg_nxthdr() 34 let mut mhdr: msghdr = unsafe { mem::zeroed() }; in test_cmsg_firsthdr() variables 35 mhdr.msg_control = 0xdeadbeef as *mut c_void; in test_cmsg_firsthdr() 36 let pmhdr = &mhdr as *const msghdr; in test_cmsg_firsthdr() 38 mhdr.msg_controllen = l; in test_cmsg_firsthdr() 62 let mut mhdr: msghdr = unsafe { mem::zeroed() }; in test_cmsg_nxthdr() variables 63 let pmhdr = &mhdr as *const msghdr; in test_cmsg_nxthdr() 66 mhdr.msg_control = pcmsghdr as *mut c_void; in test_cmsg_nxthdr() 67 mhdr.msg_controllen = (160 - start_ofs) as _; in test_cmsg_nxthdr()
|
/third_party/toybox/toys/pending/ |
H A D | ip.c | 104 static int filter_nlmesg(int (*fun)(struct nlmsghdr *mhdr, char **), char **); 599 struct nlmsghdr mhdr; in linkupdate() member 629 request.mhdr.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)); in linkupdate() 630 request.mhdr.nlmsg_flags = NLM_F_REQUEST|NLM_F_ACK; in linkupdate() 632 request.mhdr.nlmsg_flags |= NLM_F_CREATE|NLM_F_EXCL; in linkupdate() 633 request.mhdr.nlmsg_type = RTM_NEWLINK; in linkupdate() 635 request.mhdr.nlmsg_type = RTM_DELLINK; in linkupdate() 639 attr = NLMSG_TAIL(&request.mhdr); in linkupdate() 641 add_string_to_rtattr(&request.mhdr, sizeof(request), in linkupdate() 643 add_string_to_rtattr(&request.mhdr, sizeo in linkupdate() 944 display_link_info(struct nlmsghdr *mhdr, char **argv) display_link_info() argument 963 struct nlmsghdr mhdr; link_show() member 1571 display_route_info(struct nlmsghdr *mhdr, char **argv) display_route_info() argument 1709 struct nlmsghdr* mhdr = (struct nlmsghdr*)toybuf; display_route_info() local 1733 struct nlmsghdr *mhdr; display_route_info() local 1785 struct nlmsghdr mhdr; route_get() member 1840 struct nlmsghdr *mhdr = (struct nlmsghdr*)toybuf; route_get() local 1879 struct nlmsghdr mhdr; route_show_flush() member 2190 struct nlmsghdr mhdr; ruleupdate() member 2325 show_rules(struct nlmsghdr *mhdr, char **argv __attribute__ ((__unused__))) show_rules() argument 2785 filter_nlmesg(int (*fun)(struct nlmsghdr *mhdr, char **argv), char **argv) filter_nlmesg() argument 2789 struct nlmsghdr *mhdr; filter_nlmesg() local [all...] |
/third_party/node/deps/openssl/openssl/crypto/asn1/ |
H A D | asn_mime.c | 49 static int mime_hdr_addparam(MIME_HEADER *mhdr, const char *name, const char *value); 686 MIME_HEADER *mhdr = NULL, *new_hdr = NULL; in STACK_OF() local 695 if (mhdr && ossl_isspace(linebuf[0])) in STACK_OF() 728 mhdr = new_hdr; in STACK_OF() 758 mime_hdr_addparam(mhdr, ntmp, strip_ends(q)); in STACK_OF() 785 mhdr = new_hdr; in STACK_OF() 788 mime_hdr_addparam(mhdr, ntmp, strip_ends(q)); in STACK_OF() 851 MIME_HEADER *mhdr = NULL; in mime_hdr_new() local 866 mhdr = OPENSSL_malloc(sizeof(*mhdr)); in mime_hdr_new() 882 mime_hdr_addparam(MIME_HEADER *mhdr, const char *name, const char *value) mime_hdr_addparam() argument [all...] |
/third_party/openssl/crypto/asn1/ |
H A D | asn_mime.c | 49 static int mime_hdr_addparam(MIME_HEADER *mhdr, const char *name, const char *value); 680 MIME_HEADER *mhdr = NULL, *new_hdr = NULL; in STACK_OF() local 689 if (mhdr && ossl_isspace(linebuf[0])) in STACK_OF() 722 mhdr = new_hdr; in STACK_OF() 752 mime_hdr_addparam(mhdr, ntmp, strip_ends(q)); in STACK_OF() 779 mhdr = new_hdr; in STACK_OF() 782 mime_hdr_addparam(mhdr, ntmp, strip_ends(q)); in STACK_OF() 845 MIME_HEADER *mhdr = NULL; in mime_hdr_new() local 860 mhdr = OPENSSL_malloc(sizeof(*mhdr)); in mime_hdr_new() 876 mime_hdr_addparam(MIME_HEADER *mhdr, const char *name, const char *value) mime_hdr_addparam() argument [all...] |
/third_party/libcoap/src/ |
H A D | coap_io.c | 903 struct msghdr mhdr; local 914 memset(&mhdr, 0, sizeof(struct msghdr)); 915 memcpy(&mhdr.msg_name, &addr, sizeof(mhdr.msg_name)); 916 mhdr.msg_namelen = session->addr_info.remote.addr.sa.sa_family == AF_INET ? 920 mhdr.msg_iov = iov; 921 mhdr.msg_iovlen = 1; 934 mhdr.msg_control = buf; 935 mhdr.msg_controllen = CMSG_SPACE(sizeof(struct in_pktinfo)); 937 cmsg = CMSG_FIRSTHDR(&mhdr); 1124 struct msghdr mhdr; global() local [all...] |
/third_party/musl/porting/liteos_m_iccarm/kernel/include/sys/ |
H A D | socket.h | 352 #define __MHDR_END(mhdr) ((unsigned char *)(mhdr)->msg_control + (mhdr)->msg_controllen) 355 #define CMSG_NXTHDR(mhdr, cmsg) ((cmsg)->cmsg_len < sizeof (struct cmsghdr) || \ 356 __CMSG_LEN(cmsg) + sizeof(struct cmsghdr) >= __MHDR_END(mhdr) - (unsigned char *)(cmsg) \ 358 #define CMSG_FIRSTHDR(mhdr) ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0)
|
/third_party/musl/porting/liteos_a_newlib/kernel/include/sys/ |
H A D | socket.h | 343 #define __MHDR_END(mhdr) ((unsigned char *)(mhdr)->msg_control + (mhdr)->msg_controllen) 346 #define CMSG_NXTHDR(mhdr, cmsg) ((cmsg)->cmsg_len < sizeof (struct cmsghdr) || \ 347 __CMSG_LEN(cmsg) + sizeof(struct cmsghdr) >= __MHDR_END(mhdr) - (unsigned char *)(cmsg) \ 349 #define CMSG_FIRSTHDR(mhdr) ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0)
|
/third_party/musl/porting/liteos_m/kernel/include/sys/ |
H A D | socket.h | 352 #define __MHDR_END(mhdr) ((unsigned char *)(mhdr)->msg_control + (mhdr)->msg_controllen) 355 #define CMSG_NXTHDR(mhdr, cmsg) ((cmsg)->cmsg_len < sizeof (struct cmsghdr) || \ 356 __CMSG_LEN(cmsg) + sizeof(struct cmsghdr) >= __MHDR_END(mhdr) - (unsigned char *)(cmsg) \ 358 #define CMSG_FIRSTHDR(mhdr) ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0)
|
/third_party/musl/porting/liteos_a/kernel/include/sys/ |
H A D | socket.h | 354 #define __MHDR_END(mhdr) ((unsigned char *)(mhdr)->msg_control + (mhdr)->msg_controllen) 357 #define CMSG_NXTHDR(mhdr, cmsg) ((cmsg)->cmsg_len < sizeof (struct cmsghdr) || \ 358 __CMSG_LEN(cmsg) + sizeof(struct cmsghdr) >= __MHDR_END(mhdr) - (unsigned char *)(cmsg) \ 360 #define CMSG_FIRSTHDR(mhdr) ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0)
|
/third_party/musl/porting/linux/user/include/sys/ |
H A D | socket.h | 358 #define __MHDR_END(mhdr) ((unsigned char *)(mhdr)->msg_control + (mhdr)->msg_controllen) 361 #define CMSG_NXTHDR(mhdr, cmsg) ((cmsg)->cmsg_len < sizeof (struct cmsghdr) || \ 362 __CMSG_LEN(cmsg) + sizeof(struct cmsghdr) >= __MHDR_END(mhdr) - (unsigned char *)(cmsg) \ 364 #define CMSG_FIRSTHDR(mhdr) ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0)
|
/third_party/musl/porting/uniproton/kernel/include/sys/ |
H A D | socket.h | 352 #define __MHDR_END(mhdr) ((unsigned char *)(mhdr)->msg_control + (mhdr)->msg_controllen) 355 #define CMSG_NXTHDR(mhdr, cmsg) ((cmsg)->cmsg_len < sizeof (struct cmsghdr) || \ 356 __CMSG_LEN(cmsg) + sizeof(struct cmsghdr) >= __MHDR_END(mhdr) - (unsigned char *)(cmsg) \ 358 #define CMSG_FIRSTHDR(mhdr) ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0)
|
/third_party/musl/include/sys/ |
H A D | socket.h | 358 #define __MHDR_END(mhdr) ((unsigned char *)(mhdr)->msg_control + (mhdr)->msg_controllen) 361 #define CMSG_NXTHDR(mhdr, cmsg) ((cmsg)->cmsg_len < sizeof (struct cmsghdr) || \ 362 __CMSG_NEXT(cmsg) + sizeof(struct cmsghdr) >= __MHDR_END(mhdr) ? 0 : (struct cmsghdr *)__CMSG_NEXT(cmsg)) 363 #define CMSG_FIRSTHDR(mhdr) ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0)
|
/third_party/rust/crates/linux-raw-sys/src/ |
H A D | lib.rs | 105 pub unsafe fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { in CMSG_FIRSTHDR() 106 if (*mhdr).msg_controllen < size_of::<cmsghdr>() as _ { in CMSG_FIRSTHDR() 110 (*mhdr).msg_control as *mut cmsghdr in CMSG_FIRSTHDR() 113 pub unsafe fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { in CMSG_NXTHDR() 119 let max = ((*mhdr).msg_control as usize) + ((*mhdr).msg_controllen as usize); in CMSG_NXTHDR()
|
/third_party/rust/crates/nix/src/sys/socket/ |
H A D | mod.rs | 610 mhdr: msghdr, 619 mhdr: &self.mhdr in cmsgs() 628 mhdr: &'a msghdr 641 // Advance the internal pointer. Safe if mhdr and cmsghdr point in next() 644 let p = CMSG_NXTHDR(self.mhdr as *const _, hdr as *const _); in next() 1485 let mhdr = pack_mhdr_to_send(&mut cmsg_buffer[..], iov, cmsgs, addr); in sendmsg() 1487 let ret = unsafe { libc::sendmsg(fd, &mhdr, flags.bits()) }; in sendmsg() 1554 // Safe because mhdr is valid in sendmmsg() 1612 // we will be storing pointers to addresses inside mhdr in preallocate() 1968 let mut mhdr = mem::MaybeUninit::<msghdr>::zeroed(); pack_mhdr_to_receive() variables 2003 let mut mhdr = mem::MaybeUninit::<msghdr>::zeroed(); pack_mhdr_to_send() variables 2058 let mut mhdr = unsafe { recvmsg() variables [all...] |
/third_party/lwip/src/include/lwip/ |
H A D | sockets.h | 158 #define CMSG_FIRSTHDR(mhdr) \ 159 ((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \ 160 (struct cmsghdr *)(mhdr)->msg_control : \ 163 #define CMSG_NXTHDR(mhdr, cmsg) \ 164 (((cmsg) == NULL) ? CMSG_FIRSTHDR(mhdr) : \ 167 (u8_t *)((mhdr)->msg_control) + (mhdr)->msg_controllen) ? \
|
/third_party/libbpf/src/ |
H A D | netlink.c | 106 static int netlink_recvmsg(int sock, struct msghdr *mhdr, int flags) in netlink_recvmsg() argument 111 len = recvmsg(sock, mhdr, flags); in netlink_recvmsg() 137 struct msghdr mhdr = { in libbpf_netlink_recv() local 153 len = netlink_recvmsg(sock, &mhdr, MSG_PEEK | MSG_TRUNC); in libbpf_netlink_recv() 165 len = netlink_recvmsg(sock, &mhdr, 0); in libbpf_netlink_recv()
|
/third_party/rust/crates/libc/src/vxworks/ |
H A D | mod.rs | 1043 pub fn CMSG_NXTHDR(mhdr: *const msghdr, in CMSG_NXTHDR() 1047 let max = (*mhdr).msg_control as usize in CMSG_NXTHDR() 1048 + (*mhdr).msg_controllen as usize; in CMSG_NXTHDR() 1057 pub fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { in CMSG_FIRSTHDR() 1058 if (*mhdr).msg_controllen as usize > 0 { in CMSG_FIRSTHDR() 1059 (*mhdr).msg_control as *mut cmsghdr in CMSG_FIRSTHDR()
|
/third_party/rust/crates/libc/src/unix/haiku/ |
H A D | mod.rs | 1471 pub fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { in CMSG_FIRSTHDR() 1472 if (*mhdr).msg_controllen as usize >= ::mem::size_of::<cmsghdr>() { in CMSG_FIRSTHDR() 1473 (*mhdr).msg_control as *mut cmsghdr in CMSG_FIRSTHDR() 1493 pub fn CMSG_NXTHDR(mhdr: *const msghdr, in CMSG_NXTHDR() 1496 return ::CMSG_FIRSTHDR(mhdr); in CMSG_NXTHDR() 1500 let max = (*mhdr).msg_control as usize in CMSG_NXTHDR() 1501 + (*mhdr).msg_controllen as usize; in CMSG_NXTHDR()
|
/third_party/rust/crates/libc/src/unix/bsd/ |
H A D | mod.rs | 545 pub fn CMSG_FIRSTHDR(mhdr: *const ::msghdr) -> *mut ::cmsghdr { in CMSG_FIRSTHDR() 546 if (*mhdr).msg_controllen as usize >= ::mem::size_of::<::cmsghdr>() { in CMSG_FIRSTHDR() 547 (*mhdr).msg_control as *mut ::cmsghdr in CMSG_FIRSTHDR()
|
/third_party/rust/crates/libc/src/unix/solarish/ |
H A D | mod.rs | 2606 pub fn CMSG_FIRSTHDR(mhdr: *const ::msghdr) -> *mut ::cmsghdr { in CMSG_FIRSTHDR() 2607 if ((*mhdr).msg_controllen as usize) < ::mem::size_of::<::cmsghdr>() { in CMSG_FIRSTHDR() 2610 (*mhdr).msg_control as *mut ::cmsghdr in CMSG_FIRSTHDR() 2614 pub fn CMSG_NXTHDR(mhdr: *const ::msghdr, cmsg: *const ::cmsghdr) in CMSG_NXTHDR() 2618 return ::CMSG_FIRSTHDR(mhdr); in CMSG_NXTHDR() 2622 let max = (*mhdr).msg_control as usize in CMSG_NXTHDR() 2623 + (*mhdr).msg_controllen as usize; in CMSG_NXTHDR()
|
/third_party/rust/crates/libc/src/unix/bsd/netbsdlike/openbsd/ |
H A D | mod.rs | 1690 pub fn CMSG_NXTHDR(mhdr: *const ::msghdr, cmsg: *const ::cmsghdr) in CMSG_NXTHDR() 1694 return ::CMSG_FIRSTHDR(mhdr); in CMSG_NXTHDR() 1698 let max = (*mhdr).msg_control as usize in CMSG_NXTHDR() 1699 + (*mhdr).msg_controllen as usize; in CMSG_NXTHDR()
|
/third_party/rust/crates/libc/src/unix/nto/ |
H A D | mod.rs | 2517 pub fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { in CMSG_FIRSTHDR() 2518 if (*mhdr).msg_controllen as usize >= ::mem::size_of::<cmsghdr>() { in CMSG_FIRSTHDR() 2519 (*mhdr).msg_control as *mut cmsghdr in CMSG_FIRSTHDR() 2525 pub fn CMSG_NXTHDR(mhdr: *const ::msghdr, cmsg: *const ::cmsghdr) in CMSG_NXTHDR() 2530 if next > (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize { in CMSG_NXTHDR()
|
/third_party/rust/crates/libc/src/fuchsia/ |
H A D | mod.rs | 3242 pub fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) in CMSG_NXTHDR() 3248 >= __MHDR_END(mhdr) { in CMSG_NXTHDR() 3255 pub fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { in CMSG_FIRSTHDR() 3256 if (*mhdr).msg_controllen as ::size_t >= ::mem::size_of::<cmsghdr>() { in CMSG_FIRSTHDR() 3257 (*mhdr).msg_control.cast() in CMSG_FIRSTHDR() 3336 fn __MHDR_END(mhdr: *const msghdr) -> *mut c_uchar { in __MHDR_END() 3337 unsafe { (*mhdr).msg_control.offset((*mhdr).msg_controllen as isize) }.cast() in __MHDR_END()
|
/third_party/rust/crates/libc/src/unix/linux_like/emscripten/ |
H A D | mod.rs | 1675 pub fn CMSG_NXTHDR(mhdr: *const msghdr, in CMSG_NXTHDR() 1683 let max = (*mhdr).msg_control as usize in CMSG_NXTHDR() 1684 + (*mhdr).msg_controllen as usize; in CMSG_NXTHDR()
|
/third_party/rust/crates/libc/src/unix/linux_like/ |
H A D | mod.rs | 1520 pub fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { in CMSG_FIRSTHDR() 1521 if (*mhdr).msg_controllen as usize >= ::mem::size_of::<cmsghdr>() { in CMSG_FIRSTHDR() 1522 (*mhdr).msg_control as *mut cmsghdr in CMSG_FIRSTHDR()
|