[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

pffindproto Kernel Service

Purpose

Returns the address of a protocol switch table entry.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
#include <sys/domain.h>
struct protosw *pffindproto (family, protocol, type)
int family;
int protocol;
int type;

Parameters

family Specifies the address family for which to search.
protocol Indicates the protocol within the address family.
type Specifies the type of socket (for example, SOCK_RAW).

Description

The pffindproto kernel service first searches the domain switch table for the address family specified by the family parameter. If found, the pffindproto service then searches the protocol switch table for that domain and checks for matches with the type and protocol parameters.

If a match is found, the pffindproto service returns the address of the protocol switch table entry. If the type parameter is set to SOCK_RAW, the pffindproto service returns the first entry it finds with protocol equal to 0 and type equal to SOCK_RAW.

Execution Environment

The pffindproto kernel service can be called from either the process or interrupt environment.

Return Values

The pffindproto service returns a null value if a protocol switch table entry was not found for the given search criteria. Upon success, the pffindproto service returns the address of a protocol switch table entry.

Implementation Specifics

The pffindproto kernel service is part of Base Operating System (BOS) Runtime.

Related Information

Network Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts.

Understanding Socket Header Files in AIX Version 4.3 Communications Programming Concepts.


[ Previous | Next | Contents | Home | Search ]