public totoHandler() { this.service.Name = "totoCafeWebServices"; this.service.Description = "JSON API for totoCafe Android Appliation"; InterfaceConfiguration IConfig = new InterfaceConfiguration("RestAPI", typeof(IServiceAPI), typeof(ServiceAPI)); this.service.Interfaces.Add(IConfig); }
public Handler1() { this.service.Name = "JSONWebAPI"; this.service.Description = "JSON API for android appliation"; InterfaceConfiguration IConfig = new InterfaceConfiguration("RestAPI", typeof(IServiceAPI), typeof(ServiceAPI)); this.service.Interfaces.Add(IConfig); }
public Handler() { service.Name = "JSONWebAPI"; service.Description = "JSON API for android appliation"; var config = new InterfaceConfiguration("RestAPI", typeof(IServiceApi), typeof(ServiceApi)); service.Interfaces.Add(config); }
public EthernetInterfaceControlDefinition(WinPcapInterface wpcInt) { this.wpcInt = wpcInt; if (InterfaceType != System.Net.NetworkInformation.NetworkInterfaceType.Ethernet && InterfaceType != System.Net.NetworkInformation.NetworkInterfaceType.Wireless80211) { throw new ArgumentException("Cannot create an interface with type " + InterfaceType.ToString() + ", since the EthernetInterface only supports ethernet."); } try { Name = InterfaceConfiguration.GetFriendlyName(wpcInt.Name); } catch (Exception ex) { Name = "[Could not load description: " + ex.Message + "]"; } Description = "This traffic handler represents a WinPcap capable ethernet interface.\n" + this.Name; Author = "Emanuel Jöbstl"; WebLink = "http://www.eex-dev.net"; PluginType = PluginTypes.Interface; PluginKey = "eex_winpcap_ethernet"; }
public Handler1() { this.service.Name = "Json"; this.service.Description = "JSON API for android application"; InterfaceConfiguration IConfig = new InterfaceConfiguration("RestAPI", typeof(IStationRepository), typeof(StationRepository)); this.service.Interfaces.Add(IConfig); }
public Handler() { this.service.Name = "JSONWebAPI"; this.service.Description = "JSON API for Web and Android App"; InterfaceConfiguration iConfig = new InterfaceConfiguration("RestAPI", typeof(IServiceAPI), typeof(ServiceAPI)); this.service.Interfaces.Add(iConfig); }
public Handler1() { this.service.Name = "JSONWebAPI"; this.service.Description = "JSON API for android appliation"; InterfaceConfiguration IConfig = new InterfaceConfiguration("RestAPI", typeof(TransportManagementSystemFYP.AndroidHandlerClasses.IServiceAPI), typeof(TransportManagementSystemFYP.AndroidHandlerClasses.ServiceAPI)); this.service.Interfaces.Add(IConfig); }
public UserRepositoryHandler() { this.service.Name = "Performances.Api"; this.service.Description = ""; InterfaceConfiguration IConfig = new InterfaceConfiguration("UserAPI", typeof(IUserRepository), typeof(UserRepository)); this.service.Interfaces.Add(IConfig); }
public Handler() { this.service.Name = "CrawlerNodeApi"; this.service.Description = "JSON API for CloudCrawler worker node implementation"; InterfaceConfiguration IConfig = new InterfaceConfiguration("Crawler_Node_RestAPI", typeof(IServiceApi), typeof(ServiceApi)); this.service.Interfaces.Add(IConfig); }
public API() { this.service.Name = "CafeOnline.API"; this.service.Description = "BossCF API"; InterfaceConfiguration IConfig = new InterfaceConfiguration("RestAPI", typeof(IService), typeof(Services)); this.service.Interfaces.Add(IConfig); }
public onay() { this.service.Name = "api"; this.service.Description = "api tanımları"; InterfaceConfiguration IConfig = new InterfaceConfiguration("RestFull", typeof(IServis), typeof(Servis)); this.service.Interfaces.Add(IConfig); }
public Handler() { this.service.Name = "AndroidClientApi"; this.service.Description = "JSON API for CloudCrawler Android Client"; InterfaceConfiguration IConfig = new InterfaceConfiguration("Android_Client_RestAPI", typeof(IServiceApi), typeof(ServiceApi)); this.service.Interfaces.Add(IConfig); }
public CrawlerHandler() { this.service.Name = "WebCrawlerApi"; this.service.Description = "JSON API for CloudCrawler Web Crawler"; InterfaceConfiguration IConfig = new InterfaceConfiguration("Crawler_Manager_RestAPI", typeof(ICrawlerApi), typeof(CrawlerApi)); this.service.Interfaces.Add(IConfig); }
/// <summary> /// Creates a new instance of this class /// </summary> public NetMap() { ndiuUtility = new NetDiscoveryUtility(); ndiuUtility.OnResolveFinished += new NetDiscoveryUtility.ResolveCompletedEventHandler(ndiuUtility_OnResolveFinished); lHosts = new List <Host>(); dictIPHost = new Dictionary <IPAddress, Host>(); dictMACHost = new Dictionary <MACAddress, Host>(); lDataLinkNeighbours = new List <Host>(); lUpperLayerNeighbours = new List <Host>(); lDataLinkDistributors = new List <Host>(); ResolveHostnames = true; hLocalhost = CreateHost(System.Environment.MachineName); Host hNetwork; IPAddress[] ipa; Subnetmask[] smMasks; MACAddress mcMac; string[] strInterfaces = InterfaceConfiguration.GetAllInterfaceNames(); for (int iC2 = 0; iC2 < strInterfaces.Length; iC2++) { if (strInterfaces[iC2] != null) { ipa = InterfaceConfiguration.GetIPAddressesForInterface(strInterfaces[iC2]); smMasks = InterfaceConfiguration.GetIPSubnetsForInterface(strInterfaces[iC2]); mcMac = InterfaceConfiguration.GetMacAddressForInterface(strInterfaces[iC2]); if (ipa != null) { for (int iC1 = 0; iC1 < ipa.Length; iC1++) { if (ipa[iC1].AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) { if (smMasks != null && smMasks.Length > iC1) { AddIPToHost(hLocalhost, ipa[iC1]); hNetwork = CreateHost("Network"); SetAsDistributionDevice(hNetwork); hNetwork.Properties.Add("subnetmask", smMasks[iC1]); hNetwork.Properties.Add("network", IPAddressAnalysis.GetClasslessNetworkAddress(ipa[iC1], smMasks[iC1])); AddIPToHost(hNetwork, IPAddressAnalysis.GetClasslessNetworkAddress(ipa[iC1], smMasks[iC1])); lDataLinkDistributors.Add(hNetwork); Connect(hNetwork, hLocalhost); } } } } if (mcMac != null) { AddMACToHost(hLocalhost, mcMac); } } } }
public TCPStreamModifier() { lStacks = new List <TCPStreamModifierStack>(); AutoExcludeLocalConnections = true; lLocalAddresses = new List <IPAddress>(); foreach (string strInterface in InterfaceConfiguration.GetAllInterfaceNames()) { lLocalAddresses.AddRange(InterfaceConfiguration.GetIPAddressesForInterface(strInterface)); } }
// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { // Interface mapping InterfaceConfiguration.ConfigureServices(services); // Database DatabaseConfiguration.ConfigureServices(services, Configuration); services.AddRazorPages() .AddRazorRuntimeCompilation(); services.AddLiveReload(); }
/// <summary> /// Returns all interface extensions known by the Network Library Management Layer by default. This normally includes all Ethernet interfaces of the computer. /// </summary> /// <returns>All interface extensions known by the Network Library Management Layer by default</returns> public IInterfaceDefinition[] Create() { List <IInterfaceDefinition> lDefinitions = new List <IInterfaceDefinition>(); foreach (WinPcapInterface wpc in EthernetInterface.GetAllPcapInterfaces()) { if (InterfaceConfiguration.GetAdapterTypeForInterface(wpc.Name) == System.Net.NetworkInformation.NetworkInterfaceType.Ethernet || InterfaceConfiguration.GetAdapterTypeForInterface(wpc.Name) == System.Net.NetworkInformation.NetworkInterfaceType.Wireless80211) { lDefinitions.Add(new EthernetInterfaceControlDefinition(wpc)); } } return(lDefinitions.ToArray()); }
/// <summary> /// Creates a new instance of this class, listening to the given interface /// </summary> /// <param name="wpcInterface">A WinPcapInterface which defines the interface to listen to</param> public EthernetInterface(WinPcapInterface wpcInterface) { if (InterfaceConfiguration.GetAdapterTypeForInterface(wpcInterface.Name) != System.Net.NetworkInformation.NetworkInterfaceType.Ethernet && InterfaceConfiguration.GetAdapterTypeForInterface(wpcInterface.Name) != System.Net.NetworkInformation.NetworkInterfaceType.Ethernet3Megabit && InterfaceConfiguration.GetAdapterTypeForInterface(wpcInterface.Name) != System.Net.NetworkInformation.NetworkInterfaceType.FastEthernetFx && InterfaceConfiguration.GetAdapterTypeForInterface(wpcInterface.Name) != System.Net.NetworkInformation.NetworkInterfaceType.FastEthernetT && InterfaceConfiguration.GetAdapterTypeForInterface(wpcInterface.Name) != System.Net.NetworkInformation.NetworkInterfaceType.GigabitEthernet && InterfaceConfiguration.GetAdapterTypeForInterface(wpcInterface.Name) != System.Net.NetworkInformation.NetworkInterfaceType.Wireless80211) { throw new ArgumentException("Only enabled ethernet interfaces are supported at the moment."); } if (wpcInterface.Name == null) { throw new ArgumentException("Cannot create an interface instance for an interface not properly recognised by WinPcap."); } bPromiscousMode = true; oInterfaceStartStopLock = new object(); AddressResolutionMethod = AddressResolution.NDP; bExcludeOwnTraffic = true; bExcludeLocalHostTraffic = true; arpHostTable = new HostTable(); lmacSpoofAdresses = new List <MACAddress>(); bRun = false; bShutdownPending = false; qFrameQueue = new Queue <byte[]>(); bIsRunning = false; areWorkToDo = new AutoResetEvent(false); this.wpcInterface = wpcInterface; wpcDevice = new WinPcapDotNet(); this.maMacAddress = InterfaceConfiguration.GetMacAddressForInterface(wpcInterface.Name); this.aType = InterfaceConfiguration.GetAdapterTypeForInterface(wpcInterface.Name); this.MTU = InterfaceConfiguration.GetMtuForInterface(wpcInterface.Name) - 18; //Reserve 18 bytes for our ethernet-header IPAddress[] arip = InterfaceConfiguration.GetIPAddressesForInterface(wpcInterface.Name); Subnetmask[] smMask = InterfaceConfiguration.GetIPSubnetsForInterface(wpcInterface.Name); for (int iC1 = 0; iC1 < arip.Length && iC1 < smMask.Length; iC1++) { this.AddAddress(arip[iC1], smMask[iC1]); } ipStandardgateways.AddRange(InterfaceConfiguration.GetIPStandardGatewaysForInterface(wpcInterface.Name)); this.strDNSName = Dns.GetHostName(); PrimaryMACAddress = this.MACAddress; }
private void initTestService() { InterfaceConfiguration iconf1 = new InterfaceConfiguration("SimpleInterface", "Simple Interface", new RuntimeInfo(typeof(ISimpleInterface), typeof(SimpleInterfaceImpl))); InterfaceConfiguration iconf2 = new InterfaceConfiguration("TestInterface", "Test Interface", new RuntimeInfo(typeof(ITestInterface), typeof(TestInterfaceImpl))); ServiceConfig sconf = new ServiceConfig("hxf_service", "HXF Service"); sconf.InterfaceConfigs.Add(iconf1); sconf.InterfaceConfigs.Add(iconf2); testService = ServiceBuilder.BuildFromServiceConf(sconf); TreeBuilder builder = new TreeBuilder(testService); TreeNode rootNode = builder.Build(); treeView.Nodes.Add(rootNode); edtJson.Text = testService.ToJson(); }
public static InterfaceConfiguration <T> InMemorySubscriptions <T>(this InterfaceConfiguration <T> interfaceConfig) where T : TransportDefinition, new() { interfaceConfig.EnableMessageDrivenPublishSubscribe(new InMemorySubscriptionStorage()); return(interfaceConfig); }
public static InterfaceConfiguration <T> InMemorySubscriptions <T>(this InterfaceConfiguration <T> interfaceConfig) where T : TransportDefinition, new() { interfaceConfig.UseSubscriptionPersistence(new InMemorySubscriptionStorage()); return(interfaceConfig); }
private bool IsLocalHostTraffic(EthernetFrame fFrame) { IPFrame ipFrame = GetIPFrame(fFrame); return(ipFrame != null && (InterfaceConfiguration.IsLocalAddress(ipFrame.SourceAddress) || InterfaceConfiguration.IsLocalAddress(ipFrame.DestinationAddress))); }