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

Function sockaddr_bind

adapter/syscall/ff_socket_ops.c:78–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78static int
79sockaddr_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
98static int
99sockaddr_unbind(int fd)

Callers 1

ff_sys_bindFunction · 0.85

Calls 1

rte_memcpyFunction · 0.50

Tested by

no test coverage detected