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

Function recvfrom

adapter/micro_thread/mt_sys_hook.cpp:229–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227}
228
229ssize_t recvfrom(int fd, void *buffer, size_t length, int flags,
230 struct sockaddr *address, socklen_t *address_len)
231{
232 mt_hook_syscall(recvfrom);
233 MtHookFd* hook_fd = mt_hook_find_fd(fd);
234 if (!mt_hook_active() || !hook_fd || !ff_hook_active())
235 {
236 return mt_real_func(recvfrom)(fd, buffer, length, flags, address, address_len);
237 }
238
239 if (hook_fd->sock_flag & MT_FD_FLG_UNBLOCK)
240 {
241 return ff_hook_recvfrom(fd, buffer, length, flags, address, address_len);
242 }
243
244 return MtFrame::recvfrom(fd, buffer, length, flags, address, address_len, hook_fd->read_timeout);
245
246}
247
248ssize_t recv(int fd, void *buffer, size_t length, int flags)
249{

Callers 5

NgRecvMsgFunction · 0.85
NgRecvDataFunction · 0.85
af_xdp_rx_zcFunction · 0.85
mt_udpsendrcvFunction · 0.85
mt_recvfromFunction · 0.85

Calls 2

mt_hook_find_fdFunction · 0.85
ff_hook_recvfromFunction · 0.70

Tested by

no test coverage detected