nametoeproto

fnint nametoeproto(string name)

Resolves an Ethernet protocol name to its number.

Parameters

nameThe Ethernet protocol name (e.g. "ip").

Returns

The protocol number, or -1 if not found.