{
    "mode": "man",
    "parameter": "endrpcent",
    "section": "3",
    "url": "https://www.chedong.com/phpMan.php/man/endrpcent/3/json",
    "generated": "2026-06-12T13:59:33Z",
    "synopsis": "",
    "sections": {
        "NAME": {
            "content": "getrpcent, getrpcbyname, getrpcbynumber, endrpcent, setrpcent — get RPC entry\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "",
            "subsections": [
                {
                    "name": "#include <rpc/rpc.h>",
                    "content": "struct rpcent *\ngetrpcent(void);\n\nstruct rpcent *\ngetrpcbyname(char *name);\n\nstruct rpcent *\ngetrpcbynumber(int number);\n\nvoid\nsetrpcent(int stayopen);\n\nvoid\nendrpcent(void);\n"
                }
            ]
        },
        "DESCRIPTION": {
            "content": "The getrpcent(), getrpcbyname(), and getrpcbynumber() functions each return a pointer to an ob‐\nject with the following structure containing the broken-out fields of a line in the rpc program\nnumber data base, /etc/rpc:\n\nstruct rpcent {\nchar    *rname;        /* name of server for this rpc program */\nchar    raliases;    /* alias list */\nlong    rnumber;       /* rpc program number */\n};\n\nThe members of this structure are:\n\nrname     The name of the server for this rpc program.\n\nraliases  A zero terminated list of alternate names for the rpc program.\n\nrnumber   The rpc program number for this service.\n\nThe getrpcent() function reads the next line of the file, opening the file if necessary.\n\nThe setrpcent() function opens and rewinds the file.  If the stayopen flag is non-zero, the net\ndata base will not be closed after each call to getrpcent() (either directly, or indirectly\nthrough one of the other “getrpc” calls).\n\nThe endrpcent() function closes the file.\n\nThe getrpcbyname() and getrpcbynumber() functions sequentially search from the beginning of the\nfile until a matching rpc program name or program number is found, or until end-of-file is en‐\ncountered.\n",
            "subsections": []
        },
        "FILES": {
            "content": "/etc/rpc\n",
            "subsections": []
        },
        "AVAILABILITY": {
            "content": "These functions are part of libtirpc.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "rpc(5), rpcinfo(8)\n",
            "subsections": []
        },
        "DIAGNOSTICS": {
            "content": "A NULL pointer is returned on EOF or error.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "All information is contained in a static area so it must be copied if it is to be saved.\n\nBSD                            December 14, 1987                           BSD",
            "subsections": []
        }
    },
    "summary": "getrpcent, getrpcbyname, getrpcbynumber, endrpcent, setrpcent — get RPC entry",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "rpc",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/rpc/5/json"
        },
        {
            "name": "rpcinfo",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/rpcinfo/8/json"
        }
    ]
}