RPC_SVC_ERR(3)
β¨ RPC_SVC_ERR(3) β server-side RPC error routines, bestie edition β¨
okay so this is a page from the Library Functions Manual (section 3, the C library girlies π ), and it's all about the little error-reporting glow-ups your RPC server can use. no cap, if you're writing a server that talks to other machines over the network, this is your moment. π«Ά
πΈ NAME πΈ
rpc_svc_err, svcerr_auth, svcerr_decode, svcerr_noproc, svcerr_noprog, svcerr_progvers, svcerr_systemerr, svcerr_weakauth β literally a whole friend group of library routines for server side remote procedure call errors. they handle the awkward moments so your dispatch function doesn't have to. π
π LIBRARY π
Standard C Library (libc, -lc) β she's iconic, she's everywhere.
β¨ SYNOPSIS β¨
#include <rpc/rpc.h>
void
svcerr_auth(SVCXPRT *xprt, enum auth_stat why);
void
svcerr_decode(SVCXPRT *xprt);
void
svcerr_noproc(SVCXPRT *xprt);
void
svcerr_noprog(SVCXPRT *xprt);
void
svcerr_progvers(SVCXPRT *xprt, rpcvers_t low_vers, rpcvers_t high_vers);
void
svcerr_systemerr(SVCXPRT *xprt);
void
svcerr_weakauth(SVCXPRT *xprt);
π¦ DESCRIPTION π¦
these routines are part of the RPC library, which is the whole vibe that lets C language programs make procedure calls on other machines across the network. like, your code reaching out and touching someone else's code. on a different computer. β¨
so the tea is: these routines can be called by the server side dispatch function if there's any error in the transaction with the client. think of it as the server going "bestie, something went wrong, and here's exactly which something." π
π Routines π
see rpc(3) for the definition of the SVCXPRT data structure. yes, you need it. go look. π
svcerr_auth()β called by a service dispatch routine that refuses to perform a remote procedure call because of an authentication error. like, sorry babe, you're not on the list. πsvcerr_decode()β called by a service dispatch routine that can't successfully decode the remote arguments (seesvc_getargs()inrpc_svc_reg(3)). the args arrived and they're giving corrupted file energy. πsvcerr_noproc()β called by a service dispatch routine that does not implement the procedure number that the caller requests. wrong procedure, bestie, we don't do that one here.svcerr_noprog()β called when the desired program is not registered with the RPC package. service implementors usually do not need this routine. (not you, bestie, you probably don't need it π )svcerr_progvers()β called when the desired version of a program is not registered with the RPC package. thelow_versargument is the lowest version number, andhigh_versis the highest version number. service implementors usually do not need this routine either β it's giving "handled for you, don't worry about it." β¨svcerr_systemerr()β called by a service dispatch routine when it detects a system error not covered by any particular protocol. for example, if a service can no longer allocate storage, it may call this routine. out of memory? she's calling this. the catch-all of catch-alls. π₯svcerr_weakauth()β called by a service dispatch routine that refuses to perform a remote procedure call due to insufficient (but correct) authentication arguments. so the creds are real, they're just not enough β the routine callssvcerr_auth(xprt, AUTH_TOOWEAK). it's giving "you're valid but you're not that valid." π
ngl, these all take an SVCXPRT *xprt β that's your transport handle, your connection to the client. keep her close. π«Ά
π SEE ALSO π
rpc(3), rpc_svc_calls(3), rpc_svc_create(3), rpc_svc_reg(3)
and that's the whole page, bestie!! this one's from the Debian flavor of the manual, dated May 3, 1993 β yes, she's a vintage icon and she ATE. periodt. πβ¨π
π¦ where this page comes from
- freebsd 15.1: base 15.1
- Copyright 1989 AT&T
- Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms