[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Kernel and Subsystems, 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.

Related Information

Network Kernel Services in AIX 5L Version 5.2 Kernel Extensions and Device Support Programming Concepts.

Understanding Socket Header Files in AIX 5L Version 5.2 Communications Programming Concepts.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]