nametoportrange

fnint nametoportrange(string name, out int portLow, out int portHigh, out int proto)

Resolves a service name to its port range and protocol.

Parameters

nameThe service name.
portLowReceives the start of the port range.
portHighReceives the end of the port range.
protoReceives the protocol number.

Returns

0 on success, -1 if not found.