getprotobyname

Example

 int getprotobyname ( string $name ) 

Description

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

Return Values

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