svcfd_create Subroutine

Purpose

Creates a service on any open file descriptor.

Library

C Library (libc.a)

Syntax

#include <rpc/rpc.h>

SVCXPRT *svcfd_create ( fd,  sendsize,  recvsize)
int fd;
u_int sendsize;
u_int recvsize;

Description

The svcfd_create subroutine creates a service on any open file descriptor. Typically, this descriptor is a connected socket for a stream protocol such as Transmission Control Protocol (TCP).

By default, the RPC server uses nonblocking I/O with TCP. This behavior can be changed by setting the environment variable RPC_TCP_MODE to USEBLOCKING, which causes the TCP RPC server to use blocking I/O.
Note: Using blocking I/O leaves the server vulnerable to disruption by malicious or misconfigured clients.

Parameters

Item Description
fd Identifies the descriptor.
sendsize Specifies the size of the send buffer.
recvsize Specifies the size of the receive buffer.

Restrictions

In AIX® 5.2, the maximum number of open file descriptors that an RPC server can use has been set to 32767 so that compatibility can be maintained with RPC-server applications built on earlier releases of AIX.

Return Values

Upon successful completion, this subroutine returns a TCP-based transport handle. If unsuccessful, it returns a value of null.