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

Function socket

adapter/micro_thread/mt_sys_hook.cpp:123–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123int socket(int domain, int type, int protocol)
124{
125 mt_hook_syscall(socket);
126
127 if (!ff_hook_active())
128 {
129 return mt_real_func(socket)(domain, type, protocol);
130 }
131
132 int fd = ff_hook_socket(domain, type, protocol);
133 if (fd < 0)
134 {
135 return fd;
136 }
137
138 mt_hook_new_fd(fd);
139
140 mt_hook_syscall(ioctl);
141 int nb = 1;
142 ff_hook_ioctl(fd, FIONBIO, &nb);
143
144 return fd;
145}
146
147int close(int fd)
148{

Callers 11

CreateSocketMethod · 0.70
CreateSockMethod · 0.70
CreateSocketMethod · 0.70
create_tcp_sockFunction · 0.70
mt_udpsendrcvFunction · 0.70
mt_tcp_create_sockFunction · 0.70
mainFunction · 0.50
mainFunction · 0.50
loopFunction · 0.50
loopFunction · 0.50
mainFunction · 0.50

Calls 3

mt_hook_new_fdFunction · 0.85
ff_hook_socketFunction · 0.70
ff_hook_ioctlFunction · 0.70

Tested by

no test coverage detected