| 76 | } |
| 77 | |
| 78 | static int |
| 79 | sockaddr_bind(int fd, struct sockaddr *addr) |
| 80 | { |
| 81 | int i; |
| 82 | |
| 83 | for (i = 0; i < FF_MAX_BOUND_NUM; i++) { |
| 84 | struct ff_bound_info *info = &ff_bound_fds[i]; |
| 85 | if (info->fd != 0) { |
| 86 | continue; |
| 87 | } |
| 88 | |
| 89 | info->fd = fd; |
| 90 | rte_memcpy(&info->addr, addr, sizeof(struct sockaddr)); |
| 91 | |
| 92 | return 0; |
| 93 | } |
| 94 | |
| 95 | return -1; |
| 96 | } |
| 97 | |
| 98 | static int |
| 99 | sockaddr_unbind(int fd) |
no test coverage detected