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

Function sodupsockaddr

freebsd/kern/uipc_socket.c:4088–4097  ·  view source on GitHub ↗

* Make a copy of a sockaddr in a malloced buffer of type M_SONAME. */

Source from the content-addressed store, hash-verified

4086 * Make a copy of a sockaddr in a malloced buffer of type M_SONAME.
4087 */
4088struct sockaddr *
4089sodupsockaddr(const struct sockaddr *sa, int mflags)
4090{
4091 struct sockaddr *sa2;
4092
4093 sa2 = malloc(sa->sa_len, M_SONAME, mflags);
4094 if (sa2)
4095 bcopy(sa, sa2, sa->sa_len);
4096 return sa2;
4097}
4098
4099/*
4100 * Register per-socket destructor.

Callers 13

sctp_soreceiveFunction · 0.85
uipc_socket.cFile · 0.85
soreceive_dgramFunction · 0.85
uipc_bindatFunction · 0.85
ng_btsocket_sco_peeraddrFunction · 0.85
ng_btsocket_sco_sockaddrFunction · 0.85

Calls 1

mallocFunction · 0.85

Tested by

no test coverage detected