Router()
{
Text = "Cisco Router Utilization";
Size = new Size(400, 380);
Label label1 = new Label();
label1.Parent = this;
lab
Tag: dns
C# Programmation Réseau: Résolution de nom de domaine
using System;
using System.Net;
public class DNSNameResolution
{
[STAThread]
static void Main(string[] args)
{
IPHostEntry MyHost = Dns.Resolve(args[0]);
foreach (IPAddress MyIP in MyHost.AddressList)
{
Console.WriteLine(MyIP.Address);
}
}
}
C# Programmation Réseau: Afficher l’adresse IP de l’ordinateur
ns of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistributions in binary for
C# Programmation Réseau: Déterminer le nom de domaine qui est associé à une adresse IP donnée
ddress in ipHostEntry.AddressList) {
Console.WriteLine("Address: {0}", address.ToString());
}
Console.ReadLine();
}
static
C# Programmation Réseau: Créer une application SNMP
MP information:");
// Send sysName SNMP request
response = conn.get("get", argv[0], argv[1], "1.3.6.1.2.1.1.5.0");
if (response[0] == 0xff)
C# Programmation Réseau: Trouver la liste des hôtes
using System;
using System.Net;
class MainClass {
public static void Main(string[] args) {
foreach (string comp in args) {
try {
IPAddress[] addresses = Dns.GetHostEntry(comp).AddressList;
foreach (IPAddress address in addresses) {
Console.WriteLine("{0} = {1} ({2})",
comp, address, address.AddressFamily);
}
} catch (Exception ex) {
Console.WriteLine("{0} = Error ({1})", comp, ex.Message);
}
}
}
}
C# Programmation Réseau: Obtenir l’adresse IP de l’hôte
ons of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistributions in binary fo
C# Programmation Réseau: Trouver les serveurs DNS dans le registre
= (string)DNSserverKey.GetValue("NameServer");
Console.WriteLine("DNS Servers: {0}", serverlist);
DNSserverKey.Close();
start.Close();
C# Programmation Réseau: Obtenir le nom et l’adresse de l’hôte
using System;
using System.Net;
public class DNSName
{
public static void Main()
{
string hostName = Dns.GetHostName();
Console.WriteLine("Local hostname: {0}", hostName);
IPHostEntry myself = Dns.GetHostByName(hostName);
foreach (IPAddress address in myself.AddressList)
{
Console.WriteLine("IP Address: {0}", address.ToString());
}
}
}
C# Programmation Réseau: Obtenir l’adresse mac de l’ordinateur
onse = new byte[1024];
nextmib = mib;
while (true)
{
response = conn.get("getnext", argv[0], argv[1], nextmib);
commlength