Changeset View
Changeset View
Standalone View
Standalone View
sys/rpc/svc_dg.c
Show All 39 Lines | |||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
__FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
/* | /* | ||||
* svc_dg.c, Server side for connectionless RPC. | * svc_dg.c, Server side for connectionless RPC. | ||||
*/ | */ | ||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/jail.h> | |||||
#include <sys/lock.h> | #include <sys/lock.h> | ||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/mbuf.h> | #include <sys/mbuf.h> | ||||
#include <sys/mutex.h> | #include <sys/mutex.h> | ||||
#include <sys/protosw.h> | #include <sys/protosw.h> | ||||
#include <sys/queue.h> | #include <sys/queue.h> | ||||
#include <sys/socket.h> | #include <sys/socket.h> | ||||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | |||||
svc_dg_create(SVCPOOL *pool, struct socket *so, size_t sendsize, | svc_dg_create(SVCPOOL *pool, struct socket *so, size_t sendsize, | ||||
size_t recvsize) | size_t recvsize) | ||||
{ | { | ||||
SVCXPRT *xprt; | SVCXPRT *xprt; | ||||
struct __rpc_sockinfo si; | struct __rpc_sockinfo si; | ||||
struct sockaddr* sa; | struct sockaddr* sa; | ||||
int error; | int error; | ||||
if (jailed(curthread->td_ucred)) | |||||
return (NULL); | |||||
if (!__rpc_socket2sockinfo(so, &si)) { | if (!__rpc_socket2sockinfo(so, &si)) { | ||||
printf(svc_dg_str, svc_dg_err1); | printf(svc_dg_str, svc_dg_err1); | ||||
return (NULL); | return (NULL); | ||||
} | } | ||||
/* | /* | ||||
* Find the receive and the send size | * Find the receive and the send size | ||||
*/ | */ | ||||
sendsize = __rpc_get_t_size(si.si_af, si.si_proto, (int)sendsize); | sendsize = __rpc_get_t_size(si.si_af, si.si_proto, (int)sendsize); | ||||
▲ Show 20 Lines • Show All 193 Lines • Show Last 20 Lines |