Esempio n. 1
0
        public static void GetAuthInfoHack(int fd, out AuthInfo authinfo)
        {
            /*
             *       string fname = UnixMarshal.PtrToStringUnix (XauFileName ());
             *       Trace.WriteLine ("auth fname: " + fname);
             */

            Xau xau = new Xau();

            //string fname = xau.GetFileName ();

            //foreach (Xauth xauth in xau.ReadAuths (fname))
            foreach (Xauth xauth in xau)
            {
                Trace.WriteLine(xauth.Name);
            }

            /*
             *       UnixFileInfo ufi = new UnixFileInfo (fname);
             *
             *       UnixStream us = ufi.OpenRead ();
             *
             *       Trace.WriteLine ("a: " + us.Handle);
             *       IntPtr auth = XauReadAuth (us.Handle);
             *       Trace.WriteLine ("auth: " + auth);
             *
             *       us.Close ();
             */

            IntPtr authPtr = XauGetAuthByAddr((ushort)AddressFamily.Unix, (ushort)5, "rover", 1, "1");

            Trace.WriteLine("authPtr: " + authPtr);

            authinfo = new AuthInfo();
        }
Esempio n. 2
0
		public static void GetAuthInfoHack (int fd, out AuthInfo authinfo)
		{
			/*
				 string fname = UnixMarshal.PtrToStringUnix (XauFileName ());
				 Trace.WriteLine ("auth fname: " + fname);
				 */

			Xau xau = new Xau ();
			//string fname = xau.GetFileName ();

			//foreach (Xauth xauth in xau.ReadAuths (fname))
			foreach (Xauth xauth in xau) {
				Trace.WriteLine (xauth.Name);
			}

			/*
				 UnixFileInfo ufi = new UnixFileInfo (fname);

				 UnixStream us = ufi.OpenRead ();

				 Trace.WriteLine ("a: " + us.Handle);
				 IntPtr auth = XauReadAuth (us.Handle);
				 Trace.WriteLine ("auth: " + auth);

				 us.Close ();
				 */

			IntPtr authPtr = XauGetAuthByAddr ((ushort)AddressFamily.Unix, (ushort) 5, "rover", 1, "1");
			Trace.WriteLine ("authPtr: " + authPtr);

			authinfo = new AuthInfo ();
		}
Esempio n. 3
0
	public static void Main (string[] args)
	{
		XAuthOptions opts = new XAuthOptions (args);

		Xau xau = new Xau ();

		foreach (Xauth xa in xau) {
			//Console.Write (xa.Address);
			//Console.Write ((AddressFamily)xa.Family);
			Console.Write (xa.Address + "/" + xa.Family.ToString ().ToLower ());
			Console.Write (":" + xa.Number);
			Console.Write ("  ");
			Console.Write (xa.Name);
			Console.Write ("  ");
			//SocketAddress sa = new SocketAddress ((AddressFamily)xa.Family, xa.Address.Length);
			Console.WriteLine (Xau.ToHex (xa.Data));

			//EndPoint ep = UnixEndPoint.Create (xa.Address);
			//Console.WriteLine (ep);
		}
	}
Esempio n. 4
0
    public static void Main(string[] args)
    {
        XAuthOptions opts = new XAuthOptions(args);

        Xau xau = new Xau();

        foreach (Xauth xa in xau)
        {
            //Console.Write (xa.Address);
            //Console.Write ((AddressFamily)xa.Family);
            Console.Write(xa.Address + "/" + xa.Family.ToString().ToLower());
            Console.Write(":" + xa.Number);
            Console.Write("  ");
            Console.Write(xa.Name);
            Console.Write("  ");
            //SocketAddress sa = new SocketAddress ((AddressFamily)xa.Family, xa.Address.Length);
            Console.WriteLine(Xau.ToHex(xa.Data));

            //EndPoint ep = UnixEndPoint.Create (xa.Address);
            //Console.WriteLine (ep);
        }
    }