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

Function sys_getsockopt

freebsd/kern/uipc_syscalls.c:1282–1300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1280}
1281
1282int
1283sys_getsockopt(struct thread *td, struct getsockopt_args *uap)
1284{
1285 socklen_t valsize;
1286 int error;
1287
1288 if (uap->val) {
1289 error = copyin(uap->avalsize, &valsize, sizeof (valsize));
1290 if (error != 0)
1291 return (error);
1292 }
1293
1294 error = kern_getsockopt(td, uap->s, uap->level, uap->name,
1295 uap->val, UIO_USERSPACE, &valsize);
1296
1297 if (error == 0)
1298 error = copyout(&valsize, uap->avalsize, sizeof (valsize));
1299 return (error);
1300}
1301
1302/*
1303 * Kernel version of getsockopt.

Callers

nothing calls this directly

Calls 3

kern_getsockoptFunction · 0.85
copyinFunction · 0.50
copyoutFunction · 0.50

Tested by

no test coverage detected