nametoproto

fnint nametoproto(string name)

Resolves a protocol name to its number.

Parameters

nameThe protocol name (e.g. "tcp").

Returns

The protocol number, or -1 if not found.