Home
last modified time | relevance | path

Searched refs:msg (Results 1 – 25 of 137) sorted by relevance

123456

/device/linaro/hikey/hifi/xaf/host-apf/proxy/
Dxf-proxy.c49 static inline int xf_proxy_cmd_exec(xf_proxy_t *proxy, xf_user_msg_t *msg) in xf_proxy_cmd_exec() argument
54 m.id = msg->id, m.opcode = msg->opcode, m.length = msg->length; in xf_proxy_cmd_exec()
57 XF_CHK_ERR((m.address = xf_proxy_b2a(proxy, msg->buffer)) != XF_PROXY_BADADDR, -EINVAL); in xf_proxy_cmd_exec()
60 XF_CHK_API(xf_ipc_send(&proxy->ipc, &m, msg->buffer)); in xf_proxy_cmd_exec()
66 msg->id = m.id, msg->opcode = m.opcode, msg->length = m.length; in xf_proxy_cmd_exec()
69 XF_CHK_ERR((msg->buffer = xf_proxy_a2b(proxy, m.address)) != (void *)-1, -EBADFD); in xf_proxy_cmd_exec()
71 …TRACE(EXEC, _b("proxy[%p]: command done: [%08x:%p:%u]"), proxy, msg->opcode, msg->buffer, msg->len… in xf_proxy_cmd_exec()
80 xf_proxy_msg_t msg;
83 msg.id = __XF_MSG_ID(__XF_AP_CLIENT(proxy->core, handle->client), m->id);
84 msg.opcode = m->opcode;
[all …]
Dxf-fio.c63 int xf_ipc_send(xf_proxy_ipc_data_t *ipc, xf_proxy_msg_t *msg, void *b) in xf_ipc_send() argument
71 TRACE(CMD, _b("C[%08x]:(%x,%08x,%u)"), msg->id, msg->opcode, msg->address, msg->length); in xf_ipc_send()
74 XF_CHK_ERR(write(fd, msg, sizeof(*msg)) == sizeof(*msg), -errno); in xf_ipc_send()
76 …ret = ioctl(fd, HIFI_MISC_IOCTL_XAF_IPC_MSG_SEND, msg);// GJB:-Verify th return value with driver … in xf_ipc_send()
106 int xf_ipc_recv(xf_proxy_ipc_data_t *ipc, xf_proxy_msg_t *msg, void **buffer) in xf_ipc_recv() argument
113 if ((r = read(fd, msg, sizeof(*msg))) == sizeof(*msg)) in xf_ipc_recv()
115 TRACE(RSP, _b("R[%08x]:(%x,%u,%08x)"), msg->id, msg->opcode, msg->length, msg->address); in xf_ipc_recv()
118 XF_CHK_ERR((*buffer = xf_ipc_a2b(ipc, msg->address)) != (void *)-1, -EBADFD); in xf_ipc_recv()
121 return sizeof(*msg); in xf_ipc_recv()
126 msg->id = temp.id; in xf_ipc_recv()
[all …]
/device/linaro/hikey/hifi/xaf/host-apf/include/sys/fio/
Dxf-ipc.h49 #define xf_proxy_ipc_response_put(ipc, msg) \ argument
50 (write((ipc)->pipe[1], (msg), sizeof(*(msg))) == sizeof(*(msg)) ? 0 : -errno)
52 #define xf_proxy_ipc_response_get(ipc, msg) \ argument
53 (read((ipc)->pipe[0], (msg), sizeof(*(msg))) == sizeof(*(msg)) ? 0 : -errno)
98 #define xf_ipc_response_put(ipc, msg) \ argument
99 (write((ipc)->pipe[1], (msg), sizeof(*(msg))) == sizeof(*(msg)) ? 0 : -errno)
101 #define xf_ipc_response_get(ipc, msg) \ argument
102 (read((ipc)->pipe[0], (msg), sizeof(*(msg))) == sizeof(*(msg)) ? 0 : -errno)
115 extern int xf_ipc_send(xf_proxy_ipc_data_t *ipc, xf_proxy_msg_t *msg, void *b);
121 extern int xf_ipc_recv(xf_proxy_ipc_data_t *ipc, xf_proxy_msg_t *msg, void **b);
/device/google/contexthub/contexthubhal/test/
Dmain.cpp64 virtual void onMessage(const hub_message_t &msg) = 0;
82 void onMessage(const hub_message_t &msg) { in onMessage() argument
84 mHandler(msg); in onMessage()
87 void sendMessage(const hub_message_t &msg) { in sendMessage() argument
88 mParent->sendMessage(mHub->hub_id, msg); in sendMessage()
99 static int contextHubCallback(uint32_t id, const hub_message_t *msg, void *cookie) in contextHubCallback() argument
102 hub->onMessage(id, msg); in contextHubCallback()
130 void onMessage(uint32_t hubId, const hub_message_t *msg) { in onMessage() argument
132 if (cli != nullptr && msg != nullptr) { in onMessage()
133 cli->onMessage(*msg); in onMessage()
[all …]
/device/google/cuttlefish/host/frontend/gcastv2/https/
DWebSocketHandler.cpp117 uint8_t headerByte, const uint8_t *msg, size_t len) { in handleMessage() argument
126 std::cerr << hexdump(msg, len); in handleMessage()
158 uint8_t *msg = buffer.get(); in sendMessage() local
159 msg[0] = 0x80 | opcode; // FIN==1 in sendMessage()
160 msg[1] = kUseMask ? 0x80 : 0x00; in sendMessage()
163 msg[1] |= 127; in sendMessage()
164 msg[2] = 0x00; in sendMessage()
165 msg[3] = 0x00; in sendMessage()
166 msg[4] = 0x00; in sendMessage()
167 msg[5] = 0x00; in sendMessage()
[all …]
/device/google/contexthub/contexthubhal/
Dnanohubhal.cpp172 nano_message_chre msg = { in doSendToDevice() local
182 memcpy(&msg.data[0], data, len); in doSendToDevice()
184 return rwrite(mFd, &msg, len + sizeof(msg.hdr)); in doSendToDevice()
187 void NanoHub::doSendToApp(HubMessage &&msg) in doSendToApp() argument
190 mAppTxQueue.push_back((HubMessage &&)msg); in doSendToApp()
254 nano_message msg; in runDeviceRx() local
256 ret = rread(mFd, &msg, sizeof(msg)); in runDeviceRx()
261 if (ret < (int)sizeof(msg.raw.hdr)) { in runDeviceRx()
266 uint32_t len = msg.raw.hdr.len; in runDeviceRx()
274 if (ret == (int)(sizeof(msg.raw.hdr) + len)) { in runDeviceRx()
[all …]
DNanohubHidlAdapter.cpp55 bool Contexthub::setOsAppAsDestination(hub_message_t *msg, int hubId) { in setOsAppAsDestination() argument
62 msg->app_name = mCachedHubInfo[hubId].osAppName; in setOsAppAsDestination()
132 const ContextHubMsg &msg) { in sendMessageToHub() argument
133 if (!isValidHubId(hubId) || msg.msg.size() > UINT32_MAX) { in sendMessageToHub()
138 .app_name.id = msg.appName, in sendMessageToHub()
139 .message_type = msg.msgType, in sendMessageToHub()
140 .message_len = static_cast<uint32_t>(msg.msg.size()), // Note the check above in sendMessageToHub()
141 .message = static_cast<const uint8_t *>(msg.msg.data()), in sendMessageToHub()
155 if(NanoHub::sendToNanohub(hubId, &txMsg, 0, msg.hostEndPoint) != 0) { in sendMessageToHub()
200 static bool isValidOsStatus(const uint8_t *msg, in isValidOsStatus() argument
[all …]
Dnanohubhal.h84 HubMessage(const hub_message_t *msg, uint32_t transaction_id, uint16_t endpoint) { in HubMessage() argument
85 app_name = msg->app_name; in HubMessage()
86 message_type = msg->message_type; in HubMessage()
87 message_len = msg->message_len; in HubMessage()
88 message = msg->message; in HubMessage()
91 if (msg->message_len > 0 && msg->message != nullptr) { in HubMessage()
92 data_ = std::unique_ptr<uint8_t>(new uint8_t[msg->message_len]); in HubMessage()
93 memcpy(data_.get(), msg->message, msg->message_len); in HubMessage()
152 int doSendToNanohub(uint32_t hub_id, const hub_message_t *msg,
156 void doSendToApp(HubMessage &&msg);
[all …]
/device/google/crosshatch/json-c/
Ddebug.c44 void mc_debug(const char *msg, ...) in mc_debug() argument
48 va_start(ap, msg); in mc_debug()
51 vsyslog(LOG_DEBUG, msg, ap); in mc_debug()
54 vprintf(msg, ap); in mc_debug()
59 void mc_error(const char *msg, ...) in mc_error() argument
62 va_start(ap, msg); in mc_error()
65 vsyslog(LOG_ERR, msg, ap); in mc_error()
68 vfprintf(stderr, msg, ap); in mc_error()
72 void mc_info(const char *msg, ...) in mc_info() argument
75 va_start(ap, msg); in mc_info()
[all …]
/device/google/coral/json-c/
Ddebug.c44 void mc_debug(const char *msg, ...) in mc_debug() argument
48 va_start(ap, msg); in mc_debug()
51 vsyslog(LOG_DEBUG, msg, ap); in mc_debug()
54 vprintf(msg, ap); in mc_debug()
59 void mc_error(const char *msg, ...) in mc_error() argument
62 va_start(ap, msg); in mc_error()
65 vsyslog(LOG_ERR, msg, ap); in mc_error()
68 vfprintf(stderr, msg, ap); in mc_error()
72 void mc_info(const char *msg, ...) in mc_info() argument
75 va_start(ap, msg); in mc_info()
[all …]
/device/google/bonito/json-c/
Ddebug.c44 void mc_debug(const char *msg, ...) in mc_debug() argument
48 va_start(ap, msg); in mc_debug()
51 vsyslog(LOG_DEBUG, msg, ap); in mc_debug()
54 vprintf(msg, ap); in mc_debug()
59 void mc_error(const char *msg, ...) in mc_error() argument
62 va_start(ap, msg); in mc_error()
65 vsyslog(LOG_ERR, msg, ap); in mc_error()
68 vfprintf(stderr, msg, ap); in mc_error()
72 void mc_info(const char *msg, ...) in mc_info() argument
75 va_start(ap, msg); in mc_info()
[all …]
/device/generic/goldfish/network/wifi_forwarder/
Dlocal_connection.cpp39 static uint32_t getSeqNum(struct nl_msg* msg) { in getSeqNum() argument
40 return nlmsg_hdr(msg)->nlmsg_seq; in getSeqNum()
47 static int onSeqCheck(struct nl_msg* msg, void*) { in onSeqCheck() argument
48 uint32_t seq = getSeqNum(msg); in onSeqCheck()
105 NetlinkMessage msg; in transferFrame() local
107 if (!msg.initGeneric(mNetlinkFamily, HWSIM_CMD_FRAME, kHwSimVersion)) { in transferFrame()
114 if (!msg.addAttribute(HWSIM_ATTR_ADDR_RECEIVER, dest.addr, ETH_ALEN) || in transferFrame()
115 !msg.addAttribute(HWSIM_ATTR_FRAME, frame->data(), frame->size()) || in transferFrame()
116 !msg.addAttribute(HWSIM_ATTR_RX_RATE, 1u) || in transferFrame()
117 !msg.addAttribute(HWSIM_ATTR_SIGNAL, kDefaultSignalStrength) || in transferFrame()
[all …]
/device/google/contexthub/firmware/app/chre/common/
Dchre_app.c202 const struct SensorRateChangeEvent *msg = eventData; in chreappProcessConfigEvt() local
205 change.sensorHandle = msg->sensorHandle; in chreappProcessConfigEvt()
206 if (!msg->newRate) { in chreappProcessConfigEvt()
212 if (msg->newRate == SENSOR_RATE_ONDEMAND in chreappProcessConfigEvt()
213 || msg->newRate == SENSOR_RATE_ONCHANGE in chreappProcessConfigEvt()
214 || msg->newRate == SENSOR_RATE_ONESHOT) in chreappProcessConfigEvt()
217 change.status.interval = (UINT32_C(1024000000) / msg->newRate) * UINT64_C(1000); in chreappProcessConfigEvt()
219 if (msg->newLatency == SENSOR_LATENCY_NODATA) in chreappProcessConfigEvt()
222 change.status.latency = msg->newLatency; in chreappProcessConfigEvt()
235 struct chreMessageFromHostData msg; in chreappHandle() member
[all …]
Dchre10_app.c202 const struct SensorRateChangeEvent *msg = eventData; in chreappProcessConfigEvt() local
205 change.sensorHandle = msg->sensorHandle; in chreappProcessConfigEvt()
206 if (!msg->newRate) { in chreappProcessConfigEvt()
212 if (msg->newRate == SENSOR_RATE_ONDEMAND in chreappProcessConfigEvt()
213 || msg->newRate == SENSOR_RATE_ONCHANGE in chreappProcessConfigEvt()
214 || msg->newRate == SENSOR_RATE_ONESHOT) in chreappProcessConfigEvt()
217 change.status.interval = (UINT32_C(1024000000) / msg->newRate) * UINT64_C(1000); in chreappProcessConfigEvt()
219 if (msg->newLatency == SENSOR_LATENCY_NODATA) in chreappProcessConfigEvt()
222 change.status.latency = msg->newLatency; in chreappProcessConfigEvt()
235 struct chreMessageFromHostData msg; in chreappHandle() member
[all …]
/device/google/cuttlefish/guest/hals/ril/reference-libril/
Dsap_service.cpp70 Return<void> addPayloadAndDispatchRequest(MsgHeader *msg, uint16_t reqLen, uint8_t *reqPtr);
96 MsgHeader *msg = (MsgHeader *)calloc(1, sizeof(MsgHeader)); in createMsgHeader() local
97 if (msg == NULL) { in createMsgHeader()
100 msg->token = token; in createMsgHeader()
101 msg->type = MsgType_REQUEST; in createMsgHeader()
102 msg->id = msgId; in createMsgHeader()
103 msg->error = Error_RIL_E_SUCCESS; in createMsgHeader()
104 return msg; in createMsgHeader()
107 Return<void> SapImpl::addPayloadAndDispatchRequest(MsgHeader *msg, uint16_t reqLen, in addPayloadAndDispatchRequest() argument
111 sendFailedResponse(msg->id, msg->token, 2, reqPtr, msg); in addPayloadAndDispatchRequest()
[all …]
/device/google/cuttlefish/guest/hals/ril/libril/
Dsap_service.cpp70 Return<void> addPayloadAndDispatchRequest(MsgHeader *msg, uint16_t reqLen, uint8_t *reqPtr);
96 MsgHeader *msg = (MsgHeader *)calloc(1, sizeof(MsgHeader)); in createMsgHeader() local
97 if (msg == NULL) { in createMsgHeader()
100 msg->token = token; in createMsgHeader()
101 msg->type = MsgType_REQUEST; in createMsgHeader()
102 msg->id = msgId; in createMsgHeader()
103 msg->error = Error_RIL_E_SUCCESS; in createMsgHeader()
104 return msg; in createMsgHeader()
107 Return<void> SapImpl::addPayloadAndDispatchRequest(MsgHeader *msg, uint16_t reqLen, in addPayloadAndDispatchRequest() argument
111 sendFailedResponse(msg->id, msg->token, 2, reqPtr, msg); in addPayloadAndDispatchRequest()
[all …]
/device/generic/goldfish/radio/libril/
Dsap_service.cpp70 Return<void> addPayloadAndDispatchRequest(MsgHeader *msg, uint16_t reqLen, uint8_t *reqPtr);
96 MsgHeader *msg = (MsgHeader *)calloc(1, sizeof(MsgHeader)); in createMsgHeader() local
97 if (msg == NULL) { in createMsgHeader()
100 msg->token = token; in createMsgHeader()
101 msg->type = MsgType_REQUEST; in createMsgHeader()
102 msg->id = msgId; in createMsgHeader()
103 msg->error = Error_RIL_E_SUCCESS; in createMsgHeader()
104 return msg; in createMsgHeader()
107 Return<void> SapImpl::addPayloadAndDispatchRequest(MsgHeader *msg, uint16_t reqLen, in addPayloadAndDispatchRequest() argument
111 sendFailedResponse(msg->id, msg->token, 2, reqPtr, msg); in addPayloadAndDispatchRequest()
[all …]
/device/generic/goldfish-opengl/android-emu/android/base/synchronization/
DAndroidMessageChannel.h122 bool send(const T& msg) { in send() argument
126 mItems[pos] = msg; in send()
132 bool send(T&& msg) { in send() argument
136 mItems[pos] = std::move(msg); in send()
142 bool trySend(const T& msg) { in trySend() argument
145 mItems[*pos] = msg; in trySend()
151 bool trySend(T&& msg) { in trySend() argument
154 mItems[*pos] = std::move(msg); in trySend()
160 bool receive(T* msg) { in receive() argument
164 *msg = std::move(mItems[pos]); in receive()
[all …]
/device/google/contexthub/firmware/app/chre/chre_test2.app/
Dmain.cpp35 uint8_t msg; member
109 const struct chreMessageFromHostData *msg = (const struct chreMessageFromHostData *)evtData; in nanoappHandleEvent() local
110 const uint8_t *data = (const uint8_t *)msg->message; in nanoappHandleEvent()
111 const size_t size = msg->messageSize; in nanoappHandleEvent()
112 const uint32_t type = msg->messageType; in nanoappHandleEvent()
113 const uint16_t endpoint = msg->hostEndpoint; in nanoappHandleEvent()
120 const struct chreNanoappInfo *msg = (const struct chreNanoappInfo *)evtData; in nanoappHandleEvent() local
121 const uint64_t appId = msg->appId; in nanoappHandleEvent()
122 const uint32_t version = msg->version; in nanoappHandleEvent()
123 const uint32_t instanceId = msg->instanceId; in nanoappHandleEvent()
[all …]
/device/google/cuttlefish/common/libs/tcp_socket/
Dtcp_socket.cpp108 void AppendInNetworkByteOrder(Message* msg, const std::uint8_t b) { in AppendInNetworkByteOrder() argument
109 msg->push_back(b); in AppendInNetworkByteOrder()
112 void AppendInNetworkByteOrder(Message* msg, const std::uint16_t s) { in AppendInNetworkByteOrder() argument
115 msg->insert(msg->end(), p, p + sizeof n); in AppendInNetworkByteOrder()
118 void AppendInNetworkByteOrder(Message* msg, const std::uint32_t w) { in AppendInNetworkByteOrder() argument
121 msg->insert(msg->end(), p, p + sizeof n); in AppendInNetworkByteOrder()
124 void AppendInNetworkByteOrder(Message* msg, const std::int32_t w) { in AppendInNetworkByteOrder() argument
127 AppendInNetworkByteOrder(msg, u); in AppendInNetworkByteOrder()
130 void AppendInNetworkByteOrder(Message* msg, const std::string& str) { in AppendInNetworkByteOrder() argument
131 msg->insert(msg->end(), str.begin(), str.end()); in AppendInNetworkByteOrder()
/device/google/cuttlefish/common/libs/net/
Dnetlink_client.cpp57 struct msghdr msg = { &sa, sizeof(sa), &iov, 1, NULL, 0, 0 }; in CheckResponse() local
60 int result = netlink_fd_->RecvMsg(&msg, 0); in CheckResponse()
112 struct msghdr msg; in Send() local
113 memset(&msg, 0, sizeof(msg)); in Send()
116 msg.msg_name = &address_; in Send()
117 msg.msg_namelen = sizeof(address_); in Send()
118 msg.msg_iov = &netlink_iov; in Send()
119 msg.msg_iovlen = sizeof(netlink_iov) / sizeof(iovec); in Send()
121 if (netlink_fd_->SendMsg(&msg, 0) < 0) { in Send()
/device/generic/goldfish/dhcp/client/
Drouter.cpp49 struct rtmsg msg; in setDefaultGateway() member
56 request.hdr.nlmsg_len = NLMSG_LENGTH(sizeof(request.msg)); in setDefaultGateway()
60 request.msg.rtm_family = AF_INET; in setDefaultGateway()
61 request.msg.rtm_dst_len = 0; in setDefaultGateway()
62 request.msg.rtm_table = RT_TABLE_MAIN; in setDefaultGateway()
63 request.msg.rtm_protocol = RTPROT_BOOT; in setDefaultGateway()
64 request.msg.rtm_scope = RT_SCOPE_UNIVERSE; in setDefaultGateway()
65 request.msg.rtm_type = RTN_UNICAST; in setDefaultGateway()
/device/generic/goldfish/wifi/mac80211_create_radios/
Dmain.cpp94 std::unique_ptr<struct nl_msg, nl_msg_deleter> msg(nlmsg_alloc()); in createNlMessage() local
95 if (!msg) { RETURN_ERROR("nlmsg_alloc", nullptr); } in createNlMessage()
97 void* user = genlmsg_put(msg.get(), NL_AUTO_PORT, NL_AUTO_SEQ, family, 0, in createNlMessage()
101 RETURN(msg); in createNlMessage()
106 std::unique_ptr<struct nl_msg, nl_msg_deleter> msg = in buildCreateRadioMessage() local
108 if (!msg) { RETURN(nullptr); } in buildCreateRadioMessage()
111 ret = nla_put(msg.get(), HWSIM_ATTR_PERM_ADDR, ETH_ALEN, mac); in buildCreateRadioMessage()
114 ret = nla_put_flag(msg.get(), HWSIM_ATTR_SUPPORT_P2P_DEVICE); in buildCreateRadioMessage()
117 RETURN(msg); in buildCreateRadioMessage()
130 std::unique_ptr<struct nl_msg, nl_msg_deleter> msg = in createRadios() local
[all …]
/device/google/cuttlefish/host/frontend/vnc_server/
Dvnc_client_connection.cpp430 auto msg = client_.Recv(kFramebufferUpdateRequestLength); in HandleFramebufferUpdateRequest() local
431 if (msg.size() != kFramebufferUpdateRequestLength) { in HandleFramebufferUpdateRequest()
434 FrameBufferUpdateRequest fbur{msg[1] == 0, uint16_tAt(&msg[1]), in HandleFramebufferUpdateRequest()
435 uint16_tAt(&msg[3]), uint16_tAt(&msg[5]), in HandleFramebufferUpdateRequest()
436 uint16_tAt(&msg[7])}; in HandleFramebufferUpdateRequest()
445 auto msg = client_.Recv(kSetEncodingsLength); in HandleSetEncodings() local
446 if (msg.size() != kSetEncodingsLength) { in HandleSetEncodings()
449 auto count = uint16_tAt(&msg[1]); in HandleSetEncodings()
479 auto msg = client_.Recv(kSetPixelFormatLength); in HandleSetPixelFormat() local
480 if (msg.size() != kSetPixelFormatLength) { in HandleSetPixelFormat()
[all …]
/device/google/contexthub/firmware/app/chre/chre_test0.app/
Dmain.c34 uint8_t msg; member
52 static void nanoappFreeMessage(void *msg, size_t size) in nanoappFreeMessage() argument
55 msg, size); in nanoappFreeMessage()
56 chreHeapFree(msg); in nanoappFreeMessage()
90 extMsg->msg = 0x01; in nanoappHandleEvent()
99 const struct chreMessageFromHostData *msg = (const struct chreMessageFromHostData *)evtData; in nanoappHandleEvent() local
100 const uint8_t *data = (const uint8_t *)msg->message; in nanoappHandleEvent()
101 const size_t size = msg->messageSize; in nanoappHandleEvent()

123456