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

Function sys_sendmsg

freebsd/kern/uipc_syscalls.c:889–910  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

887#endif
888
889int
890sys_sendmsg(struct thread *td, struct sendmsg_args *uap)
891{
892 struct msghdr msg;
893 struct iovec *iov;
894 int error;
895
896 error = copyin(uap->msg, &msg, sizeof (msg));
897 if (error != 0)
898 return (error);
899 error = copyiniov(msg.msg_iov, msg.msg_iovlen, &iov, EMSGSIZE);
900 if (error != 0)
901 return (error);
902 msg.msg_iov = iov;
903#ifdef COMPAT_OLDSOCK
904 if (SV_PROC_FLAG(td->td_proc, SV_AOUT))
905 msg.msg_flags = 0;
906#endif
907 error = sendit(td, uap->s, &msg, uap->flags);
908 free(iov, M_IOV);
909 return (error);
910}
911
912int
913kern_recvit(struct thread *td, int s, struct msghdr *mp, enum uio_seg fromseg,

Callers

nothing calls this directly

Calls 4

senditFunction · 0.85
copyiniovFunction · 0.70
freeFunction · 0.70
copyinFunction · 0.50

Tested by

no test coverage detected