| 57 | } |
| 58 | |
| 59 | static int |
| 60 | sockaddr_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 | |
| 78 | static int |
| 79 | sockaddr_bind(int fd, struct sockaddr *addr) |
no test coverage detected