MCPcopy Index your code
hub / github.com/F-Stack/f-stack / ff_sys_bind

Function ff_sys_bind

adapter/syscall/ff_socket_ops.c:123–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123static int
124ff_sys_bind(struct ff_bind_args *args)
125{
126 int bound_fd;
127 int ret;
128
129 bound_fd = sockaddr_is_bound(args->addr);
130 if (bound_fd != 0 && bound_fd != args->fd) {
131 return ff_dup2(bound_fd, args->fd);
132 }
133
134 ret = ff_bind(args->fd, args->addr, args->addrlen);
135 if (ret == 0) {
136 sockaddr_bind(args->fd, args->addr);
137 }
138
139 return ret;
140}
141
142static int
143ff_sys_listen(struct ff_listen_args *args)

Callers 1

ff_so_handlerFunction · 0.85

Calls 4

sockaddr_is_boundFunction · 0.85
ff_dup2Function · 0.85
ff_bindFunction · 0.85
sockaddr_bindFunction · 0.85

Tested by

no test coverage detected