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

Function sockaddr_is_bound

adapter/syscall/ff_socket_ops.c:59–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59static int
60sockaddr_is_bound(struct sockaddr *addr)
61{
62 int i;
63
64 for (i = 0; i < FF_MAX_BOUND_NUM; i++) {
65 struct ff_bound_info *info = &ff_bound_fds[i];
66 if (info->fd == 0) {
67 continue;
68 }
69
70 if (sockaddr_cmp(&info->addr, addr) == 0) {
71 return info->fd;
72 }
73 }
74
75 return 0;
76}
77
78static int
79sockaddr_bind(int fd, struct sockaddr *addr)

Callers 1

ff_sys_bindFunction · 0.85

Calls 1

sockaddr_cmpFunction · 0.85

Tested by

no test coverage detected