getprotobyname

 int getprotobyname ( string $name ) 

説明

getprotobyname() returns the protocol number associated with the protocol name as per /etc/protocols.

戻り値

Returns the protocol number or -1 if the protocol is not found.