Home
last modified time | relevance | path

Searched refs:msghdr (Results 1 – 25 of 42) sorted by relevance

12

/ohos5.0/base/startup/init/interfaces/innerkits/fd_holder/
H A Dfd_holder_internal.c26 int BuildControlMessage(struct msghdr *msghdr, int *fds, int fdCount, bool sendUcred) in BuildControlMessage() argument
36 msghdr->msg_controllen = 0; in BuildControlMessage()
43 msghdr->msg_control = calloc(1, ((msghdr->msg_controllen == 0) ? 1 : msghdr->msg_controllen)); in BuildControlMessage()
47 cmsg = CMSG_FIRSTHDR(msghdr); in BuildControlMessage()
56 msghdr->msg_control = NULL; in BuildControlMessage()
59 cmsg = CMSG_NXTHDR(msghdr, cmsg); in BuildControlMessage()
64 msghdr->msg_control = NULL; in BuildControlMessage()
79 STATIC int *GetFdsFromMsg(size_t *outFdCount, pid_t *requestPid, struct msghdr msghdr) in GetFdsFromMsg() argument
81 if ((msghdr.msg_flags) & MSG_TRUNC) { in GetFdsFromMsg()
89 for (cmsg = CMSG_FIRSTHDR(&msghdr); cmsg != NULL; cmsg = CMSG_NXTHDR(&msghdr, cmsg)) { in GetFdsFromMsg()
[all …]
H A Dfd_holder.c80 struct msghdr msghdr = { in ServiceSendFds() local
97 free(msghdr.msg_control); in ServiceSendFds()
98 msghdr.msg_control = NULL; in ServiceSendFds()
100 msghdr.msg_controllen = 0; in ServiceSendFds()
108 free(msghdr.msg_control); in ServiceSendFds()
109 msghdr.msg_control = NULL; in ServiceSendFds()
111 msghdr.msg_controllen = 0; in ServiceSendFds()
115 if (msghdr.msg_control != NULL) { in ServiceSendFds()
116 free(msghdr.msg_control); in ServiceSendFds()
117 msghdr.msg_control = NULL; in ServiceSendFds()
[all …]
H A Dfd_holder_internal.h43 int BuildControlMessage(struct msghdr *msghdr, int *fds, int fdCount, bool sendUcred);
/ohos5.0/foundation/communication/bluetooth_service/services/bluetooth/service/src/sock/
H A Dsocket_util.cpp52 struct msghdr msghdr = {}; in SocketSendFd() local
57 (void)memset_s(&msghdr, sizeof(msghdr), 0, sizeof(msghdr)); in SocketSendFd()
60 msghdr.msg_control = msgbuffer; in SocketSendFd()
61 msghdr.msg_controllen = sizeof(msgbuffer); in SocketSendFd()
62 cmsghdr = CMSG_FIRSTHDR(&msghdr); in SocketSendFd()
72 msghdr.msg_iov = &iovec; in SocketSendFd()
73 msghdr.msg_iovlen = 1; in SocketSendFd()
76 ssize_t size = sendmsg(sockFd, &msghdr, 0); in SocketSendFd()
78 ssize_t size = sendmsg(sockFd, &msghdr, MSG_NOSIGNAL); in SocketSendFd()
88 (void)memset_s(&msghdr, sizeof(msghdr), 0, sizeof(msghdr)); in SocketSendFd()
/ohos5.0/base/startup/init/ueventd/
H A Dueventd_socket.c64 struct msghdr msghdr = {}; in ReadUeventMessage() local
76 msghdr.msg_name = &addr; in ReadUeventMessage()
77 msghdr.msg_namelen = sizeof(addr); in ReadUeventMessage()
78 msghdr.msg_iov = &iov; in ReadUeventMessage()
79 msghdr.msg_iovlen = 1; in ReadUeventMessage()
80 msghdr.msg_control = credMsg; in ReadUeventMessage()
81 msghdr.msg_controllen = sizeof(credMsg); in ReadUeventMessage()
83 n = recvmsg(sockFd, &msghdr, 0); in ReadUeventMessage()
87 struct cmsghdr *cmsghdr = CMSG_FIRSTHDR(&msghdr); in ReadUeventMessage()
/ohos5.0/base/startup/init/test/unittest/innerkits/
H A Dinnerkits_unittest.cpp48 int *GetFdsFromMsg(size_t *outFdCount, pid_t *requestPid, struct msghdr msghdr);
436 struct msghdr msghdr = {}; variable
440 free(msghdr.msg_control);
441 msghdr.msg_control = nullptr;
445 free(msghdr.msg_control);
446 msghdr.msg_control = nullptr;
450 free(msghdr.msg_control);
451 msghdr.msg_control = nullptr;
466 struct msghdr msghdr = {}; variable
468 msghdr.msg_flags = MSG_TRUNC;
[all …]
/ohos5.0/drivers/peripheral/usb/ddk/host/src/
H A Dddk_uevent_handle.c138 struct msghdr msghdr = {0}; in DdkReadUeventMsg() local
139 msghdr.msg_name = &addr; in DdkReadUeventMsg()
140 msghdr.msg_namelen = sizeof(addr); in DdkReadUeventMsg()
141 msghdr.msg_iov = &iov; in DdkReadUeventMsg()
142 msghdr.msg_iovlen = 1; in DdkReadUeventMsg()
145 msghdr.msg_control = credMsg; in DdkReadUeventMsg()
146 msghdr.msg_controllen = sizeof(credMsg); in DdkReadUeventMsg()
148 ssize_t len = recvmsg(sockFd, &msghdr, 0); in DdkReadUeventMsg()
153 struct cmsghdr *hdr = CMSG_FIRSTHDR(&msghdr); in DdkReadUeventMsg()
/ohos5.0/foundation/communication/netmanager_base/services/netmanagernative/src/netsys/
H A Dnetlink_socket.cpp51 struct msghdr msgHeader; in SendNetlinkMsgToKernel()
93 struct nlmsghdr *msghdr = reinterpret_cast<struct nlmsghdr *>(msghdrBuf.get()); in ClearRouteInfo() local
94 …errno_t result = memset_s(msghdr, NLMSG_SPACE(NETLINKMESSAGE_MAX_LEN), 0, NLMSG_SPACE(NETLINKMESSA… in ClearRouteInfo()
100 …int32_t copeResult = memcpy_s(NLMSG_DATA(msghdr), sizeof(struct rtmsg), &msg, sizeof(struct rtmsg)… in ClearRouteInfo()
104 msghdr->nlmsg_len = static_cast<uint32_t>(NLMSG_LENGTH(sizeof(struct rtmsg))); in ClearRouteInfo()
105 msghdr->nlmsg_type = clearThing; in ClearRouteInfo()
106 msghdr->nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP; in ClearRouteInfo()
107 return SendNetlinkMsgToKernel(msghdr); in ClearRouteInfo()
H A Dclatd.cpp189 msghdr msgHdr; in ProcessV6Packet()
276 int32_t Clatd::ReadV6Packet(msghdr &msgHdr, ssize_t &readLen) in ReadV6Packet()
316 static msghdr msgHeader; in SendV6OnRawSocket()
/ohos5.0/base/tee/tee_client/frameworks/libteec_vendor/
H A Dtee_client_socket.c83 static int InitRecvMsg(struct msghdr *recvMsg, struct iovec *iov, size_t iovLen, in InitRecvMsg()
102 struct msghdr hmsg; in RecvFileDescriptor()
112 rc = memset_s(&hmsg, sizeof(struct msghdr), 0, sizeof(struct msghdr)); in RecvFileDescriptor()
182 static void InitSockMsg(struct msghdr *message, CaRevMsg *revMsg, struct iovec *iov) in InitSockMsg()
213 struct msghdr message; in CaDaemonConnectWithCaInfo()
/ohos5.0/drivers/hdf_core/adapter/uhdf2/manager/src/
H A Ddevmgr_uevent.c399 struct msghdr msghdr = {0}; in DevMgrReadUeventMessage() local
400 msghdr.msg_name = &addr; in DevMgrReadUeventMessage()
401 msghdr.msg_namelen = sizeof(addr); in DevMgrReadUeventMessage()
402 msghdr.msg_iov = &iov; in DevMgrReadUeventMessage()
403 msghdr.msg_iovlen = 1; in DevMgrReadUeventMessage()
404 msghdr.msg_control = credMsg; in DevMgrReadUeventMessage()
405 msghdr.msg_controllen = sizeof(credMsg); in DevMgrReadUeventMessage()
407 ssize_t n = recvmsg(sockFd, &msghdr, 0); in DevMgrReadUeventMessage()
412 struct cmsghdr *hdr = CMSG_FIRSTHDR(&msghdr); in DevMgrReadUeventMessage()
/ohos5.0/foundation/multimedia/audio_framework/services/audio_policy/server/src/service/manager/pnp_server/
H A Daudio_socket_thread.cpp111 msghdr msghdr = {0}; in AudioPnpReadUeventMsg() local
118 msghdr.msg_name = &addr; in AudioPnpReadUeventMsg()
119 msghdr.msg_namelen = sizeof(addr); in AudioPnpReadUeventMsg()
120 msghdr.msg_iov = &iov; in AudioPnpReadUeventMsg()
121 msghdr.msg_iovlen = 1; in AudioPnpReadUeventMsg()
122 msghdr.msg_control = credMsg; in AudioPnpReadUeventMsg()
123 msghdr.msg_controllen = sizeof(credMsg); in AudioPnpReadUeventMsg()
125 ssize_t len = recvmsg(sockFd, &msghdr, 0); in AudioPnpReadUeventMsg()
129 cmsghdr *hdr = CMSG_FIRSTHDR(&msghdr); in AudioPnpReadUeventMsg()
/ohos5.0/drivers/peripheral/audio/hal/hdi_binder/server/src/
H A Dhdf_audio_pnp_uevent.c659 struct msghdr msghdr = {0}; in AudioPnpReadUeventMsg() local
666 msghdr.msg_name = &addr; in AudioPnpReadUeventMsg()
667 msghdr.msg_namelen = sizeof(addr); in AudioPnpReadUeventMsg()
668 msghdr.msg_iov = &iov; in AudioPnpReadUeventMsg()
669 msghdr.msg_iovlen = 1; in AudioPnpReadUeventMsg()
670 msghdr.msg_control = credMsg; in AudioPnpReadUeventMsg()
671 msghdr.msg_controllen = sizeof(credMsg); in AudioPnpReadUeventMsg()
673 ssize_t len = recvmsg(sockFd, &msghdr, 0); in AudioPnpReadUeventMsg()
678 struct cmsghdr *hdr = CMSG_FIRSTHDR(&msghdr); in AudioPnpReadUeventMsg()
/ohos5.0/base/startup/init/services/init/standard/
H A Dfd_holder_service.c78 struct msghdr msghdr = { in SendErrorInfo() local
86 if (TEMP_FAILURE_RETRY(sendmsg(sock, &msghdr, MSG_NOSIGNAL)) < 0) { in SendErrorInfo()
/ohos5.0/foundation/communication/dsoftbus/components/nstackx/fillp/src/app_lib/src/
H A Dsocket_app.c184 static FILLP_CONST struct FrameInfo *SockSendGetFrameInfo(struct msghdr *m) in SockSendGetFrameInfo()
209 static FILLP_CONST struct FrameInfo *SockSendGetFrameInfo(struct msghdr *m) in SockSendGetFrameInfo()
219 struct msghdr msg; in SockSendFrame()
246 static int SocketMsgGetLen(const struct msghdr *msg) in SocketMsgGetLen()
460 struct msghdr *msg, FILLP_INT flags, FILLP_INT bufLen) in SockSendmsgDataToBufCache()
561 struct msghdr msg; in SockRecv()
670 struct msghdr *msg, FILLP_INT flags, FILLP_INT bufLen) in SockRecvmsgDataFromBufCache()
785 struct msghdr msg; in SockWritev()
797 (void)memset_s(&msg, sizeof(struct msghdr), 0, sizeof(struct msghdr)); in SockWritev()
806 struct msghdr msg; in SockReadv()
[all …]
/ohos5.0/foundation/communication/dsoftbus/components/nstackx/fillp/src/app_lib/include/
H A Dsocket_app.h48 FILLP_INT SockRecvmsg(FILLP_INT sockIndex, struct msghdr *msg, FILLP_INT flags);
49 FILLP_INT SockSendmsg(FILLP_INT sockIndex, struct msghdr *msg, FILLP_INT flags);
76 struct msghdr { struct
/ohos5.0/base/hiviewdfx/faultloggerd/interfaces/innerkits/faultloggerd_client/
H A Dfaultloggerd_socket.cpp154 struct msghdr msgh; in RecvMsgFromSocket()
198 struct msghdr msgh; in RecvMsgCredFromSocket()
248 struct msghdr msgh; in SendMsgIovToSocket()
275 struct msghdr msgh; in SendMsgCtlToSocket()
/ohos5.0/base/tee/tee_client/services/teecd/src/
H A Dtee_ca_auth.c86 struct msghdr message; in RecvCaMsg()
96 errno_t rc = memset_s(&message, sizeof(message), 0, sizeof(struct msghdr)); in RecvCaMsg()
H A Dtee_ca_daemon.c45 static int InitMsg(struct msghdr *hmsg, struct iovec *iov, size_t iovLen, in InitMsg()
62 struct msghdr hmsg; in SendFileDescriptor()
/ohos5.0/foundation/communication/dsoftbus/components/nstackx/nstackx_congestion/platform/unix/qdisc/
H A Dnstackx_nlmsg.c85 struct msghdr requestMsg = { in SendNetlinkRequest()
129 struct msghdr msg = { in RecvNetlinkResponse()
/ohos5.0/foundation/communication/dsoftbus/components/nstackx/nstackx_util/platform/unix/
H A Dsys_socket.c83 struct msghdr mh; in SocketSendEx()
112 struct msghdr mh; in SendUdpSegment()
/ohos5.0/base/hiviewdfx/hiview/plugins/sysevent_source/
H A Devent_server.cpp118 struct msghdr& msgh, struct iovec& iov) in InitMsgh()
133 pid_t ReadPidFromMsgh(struct msghdr& msgh) in ReadPidFromMsgh()
239 struct msghdr msgh = {0}; in ReceiveMsg()
/ohos5.0/base/hiviewdfx/hilog/frameworks/libhilog/socket/include/
H A Dsocket_server.h37 int RecvMsg(struct msghdr *hdr, int flags = 0);
/ohos5.0/base/hiviewdfx/hilog/frameworks/libhilog/socket/
H A Ddgram_socket_server.cpp35 struct msghdr msgh = {0}; in RecvPacket()
/ohos5.0/foundation/communication/netmanager_base/services/netmanagernative/include/netsys/
H A Dclatd.h47 int32_t ReadV6Packet(msghdr &msgHdr, ssize_t &readLen);

12