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

Function ff_getsockname

lib/ff_syscall_wrapper.c:1491–1513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1489}
1490
1491int
1492ff_getsockname(int s, struct linux_sockaddr *name,
1493 socklen_t *namelen)
1494{
1495 int rc;
1496 struct sockaddr *pf = NULL;
1497
1498 if ((rc = kern_getsockname(curthread, s, &pf, namelen)))
1499 goto kern_fail;
1500
1501 if (name && pf)
1502 freebsd2linux_sockaddr(name, pf);
1503
1504 if(pf != NULL)
1505 free(pf, M_SONAME);
1506 return (rc);
1507
1508kern_fail:
1509 if(pf != NULL)
1510 free(pf, M_SONAME);
1511 ff_os_errno(rc);
1512 return (-1);
1513}
1514
1515int
1516ff_shutdown(int s, int how)

Callers 2

getsocknameFunction · 0.85
ff_sys_getsocknameFunction · 0.85

Calls 4

kern_getsocknameFunction · 0.85
freebsd2linux_sockaddrFunction · 0.85
ff_os_errnoFunction · 0.85
freeFunction · 0.70

Tested by

no test coverage detected