Ejemplo n.º 1
0
        public static string GetProtocolByNumber(int number)
        {
            NetworkUtils.ProtoEnt ent = NetworkUtils.GetProtocolByNumber(number);

            if (ent == null)
            {
                return(null);
            }
            return(ent.p_name);
        }
Ejemplo n.º 2
0
        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);
        }