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

Function ff_getpeername

lib/ff_syscall_wrapper.c:1467–1489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1465}
1466
1467int
1468ff_getpeername(int s, struct linux_sockaddr * name,
1469 socklen_t *namelen)
1470{
1471 int rc;
1472 struct sockaddr *pf = NULL;
1473
1474 if ((rc = kern_getpeername(curthread, s, &pf, namelen)))
1475 goto kern_fail;
1476
1477 if (name && pf)
1478 freebsd2linux_sockaddr(name, pf);
1479
1480 if(pf != NULL)
1481 free(pf, M_SONAME);
1482 return (rc);
1483
1484kern_fail:
1485 if(pf != NULL)
1486 free(pf, M_SONAME);
1487 ff_os_errno(rc);
1488 return (-1);
1489}
1490
1491int
1492ff_getsockname(int s, struct linux_sockaddr *name,

Callers 2

getpeernameFunction · 0.85
ff_sys_getpeernameFunction · 0.85

Calls 4

kern_getpeernameFunction · 0.85
freebsd2linux_sockaddrFunction · 0.85
ff_os_errnoFunction · 0.85
freeFunction · 0.70

Tested by

no test coverage detected