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

Function ff_accept

lib/ff_syscall_wrapper.c:1354–1384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1352}
1353
1354int
1355ff_accept(int s, struct linux_sockaddr * addr,
1356 socklen_t * addrlen)
1357{
1358 int rc;
1359 struct file *fp;
1360 struct sockaddr *pf = NULL;
1361 socklen_t socklen = sizeof(struct sockaddr_storage);
1362
1363 if ((rc = kern_accept(curthread, s, &pf, &socklen, &fp)))
1364 goto kern_fail;
1365
1366 rc = curthread->td_retval[0];
1367 fdrop(fp, curthread);
1368
1369 if (addr && pf)
1370 freebsd2linux_sockaddr(addr, pf);
1371
1372 if (addrlen)
1373 *addrlen = pf->sa_len;
1374
1375 if(pf != NULL)
1376 free(pf, M_SONAME);
1377 return (rc);
1378
1379kern_fail:
1380 if(pf != NULL)
1381 free(pf, M_SONAME);
1382 ff_os_errno(rc);
1383 return (-1);
1384}
1385
1386int
1387ff_accept4(int s, struct linux_sockaddr * addr,

Callers 9

loopFunction · 0.85
loopFunction · 0.85
loopFunction · 0.85
acceptFunction · 0.85
accept4Function · 0.85
acceptFunction · 0.85
accept4Function · 0.85
ff_sys_acceptFunction · 0.85
ff_hook_acceptFunction · 0.85

Calls 4

kern_acceptFunction · 0.85
freebsd2linux_sockaddrFunction · 0.85
ff_os_errnoFunction · 0.85
freeFunction · 0.70

Tested by

no test coverage detected