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

Function linux2freebsd_sockaddr

lib/ff_syscall_wrapper.c:678–693  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

676}
677
678static void
679linux2freebsd_sockaddr(const struct linux_sockaddr *linux,
680 socklen_t addrlen, struct sockaddr *freebsd)
681{
682 if (linux == NULL || freebsd == NULL) {
683 return;
684 }
685
686 /* #linux and #freebsd may point to the same address */
687 freebsd->sa_family = linux->sa_family == LINUX_AF_INET6 ? AF_INET6 : linux->sa_family;
688 freebsd->sa_len = addrlen;
689
690 if (linux->sa_data != freebsd->sa_data) {
691 bcopy(linux->sa_data, freebsd->sa_data, addrlen - sizeof(linux->sa_family));
692 }
693}
694
695static void
696freebsd2linux_sockaddr(struct linux_sockaddr *linux,

Callers 5

linux2freebsd_msghdrFunction · 0.85
ff_sendtoFunction · 0.85
ff_bindFunction · 0.85
ff_connectFunction · 0.85
ff_route_ctlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected