public static string GetProtocolByNumber(int number) { NetworkUtils.ProtoEnt ent = NetworkUtils.GetProtocolByNumber(number); if (ent == null) { return(null); } return(ent.p_name); }
public static int GetProtocolByName(string name) { if (string.IsNullOrEmpty(name)) { return(-1); } NetworkUtils.ProtoEnt ent = NetworkUtils.GetProtocolByName(name); if (ent == null) { return(-1); } return(ent.p_proto); }