Returns the address of a protocol switch table entry.
#include <sys/types.h> #include <sys/errno.h> #include <sys/domain.h>
struct protosw *pffindproto (family, protocol, type) int family; int protocol; int type;
|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).|
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.
The pffindproto kernel service can be called from either the process or interrupt environment.
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.
The pffindproto kernel service is part of Base Operating System (BOS) Runtime.
Network Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts.
Understanding Socket Header Files in AIX Version 4.3 Communications Programming Concepts.