コード例 #1
0
        public static byte[] CreateRedirectorPacket()
        {
            List <Blaze.Tdf> Result = new List <Blaze.Tdf>();
            List <Blaze.Tdf> VALU   = new List <Blaze.Tdf>();

            VALU.Add(Blaze.TdfString.Create("HOST", "localhost"));
            VALU.Add(Blaze.TdfInteger.Create("IP\0\0", Blaze.GetIPfromString("127.0.0.1")));
            VALU.Add(Blaze.TdfInteger.Create("PORT", targetPort));
            Blaze.TdfUnion ADDR = Blaze.TdfUnion.Create("ADDR", 0, Blaze.TdfStruct.Create("VALU", VALU));
            Result.Add(ADDR);
            Result.Add(Blaze.TdfInteger.Create("SECU", 0));
            Result.Add(Blaze.TdfInteger.Create("XDNS", 0));
            return(Blaze.CreatePacket(5, 1, 0, 0x1000, 0, Result));
        }