MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sendto

Function sendto

adapter/micro_thread/mt_sys_hook.cpp:210–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210ssize_t sendto(int fd, const void *message, size_t length, int flags,
211 const struct sockaddr *dest_addr, socklen_t dest_len)
212{
213 mt_hook_syscall(sendto);
214 MtHookFd* hook_fd = mt_hook_find_fd(fd);
215 if (!mt_hook_active() || !hook_fd || !ff_hook_active())
216 {
217 return mt_real_func(sendto)(fd, message, length, flags, dest_addr, dest_len);
218 }
219
220 if (hook_fd->sock_flag & MT_FD_FLG_UNBLOCK)
221 {
222 return ff_hook_sendto(fd, message, length, flags, dest_addr, dest_len);
223 }
224
225 return MtFrame::sendto(fd, message, (int)length, flags,
226 dest_addr, dest_len, hook_fd->write_timeout);
227}
228
229ssize_t recvfrom(int fd, void *buffer, size_t length, int flags,
230 struct sockaddr *address, socklen_t *address_len)

Callers 7

mt_udpsendrcvFunction · 0.70
mt_sendtoFunction · 0.70
NgDeliverMsgFunction · 0.50
NgSendDataFunction · 0.50
WriteCmdFunction · 0.50
kernel_tx_process_mbufFunction · 0.50
eth_af_packet_txFunction · 0.50

Calls 2

mt_hook_find_fdFunction · 0.85
ff_hook_sendtoFunction · 0.70

Tested by

no test coverage detected