Skip to content

Commit

Permalink
dos2unix on all files for consistent line endings
Browse files Browse the repository at this point in the history
  • Loading branch information
chmorgan committed Feb 12, 2017
1 parent 0ff1682 commit b86cc6c
Show file tree
Hide file tree
Showing 69 changed files with 2,714 additions and 2,714 deletions.
132 changes: 66 additions & 66 deletions Examples/AirPcapBasicCapture/Program.cs
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SharpPcap;
using SharpPcap.AirPcap;

namespace AirPcapBasicCapture
{
class Program
{
static void Main(string[] args)
{
var devices = AirPcapDeviceList.Instance;

if (devices.Count == 0)
{
Console.WriteLine("No devices found, are you running as admin(if in Windows), or root(if in Linux/Mac)?");
return;
}

Console.WriteLine("Available AirPcap devices:");
for (var i = 0; i < devices.Count; i++)
{
Console.WriteLine("[{0}] - {1}", i, devices[i].Name);
}

Console.WriteLine();
Console.Write("-- Please choose a device to capture: ");
var devIndex = int.Parse(Console.ReadLine());

var device = devices[devIndex];

device.Open();

device.OnPacketArrival += new PacketArrivalEventHandler(device_OnPacketArrival);

device.StartCapture();

Console.WriteLine("Press Enter to exit");
Console.ReadLine();

device.StopCapture();

Console.WriteLine("-- Capture stopped.");

// Print out the device statistics
Console.WriteLine(device.Statistics.ToString());

// Close the pcap device
device.Close();
}

private static void device_OnPacketArrival(object sender, CaptureEventArgs e)
{
var time = e.Packet.Timeval.Date;
var len = e.Packet.Data.Length;
Console.WriteLine("{0}:{1}:{2},{3} Len={4}",
time.Hour, time.Minute, time.Second, time.Millisecond, len);
Console.WriteLine(e.Packet.ToString());

var p = PacketDotNet.Packet.ParsePacket(e.Packet.LinkLayerType, e.Packet.Data);
Console.WriteLine(p.ToString(PacketDotNet.StringOutputType.VerboseColored));
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SharpPcap;
using SharpPcap.AirPcap;

namespace AirPcapBasicCapture
{
class Program
{
static void Main(string[] args)
{
var devices = AirPcapDeviceList.Instance;

if (devices.Count == 0)
{
Console.WriteLine("No devices found, are you running as admin(if in Windows), or root(if in Linux/Mac)?");
return;
}

Console.WriteLine("Available AirPcap devices:");
for (var i = 0; i < devices.Count; i++)
{
Console.WriteLine("[{0}] - {1}", i, devices[i].Name);
}

Console.WriteLine();
Console.Write("-- Please choose a device to capture: ");
var devIndex = int.Parse(Console.ReadLine());

var device = devices[devIndex];

device.Open();

device.OnPacketArrival += new PacketArrivalEventHandler(device_OnPacketArrival);

device.StartCapture();

Console.WriteLine("Press Enter to exit");
Console.ReadLine();

device.StopCapture();

Console.WriteLine("-- Capture stopped.");

// Print out the device statistics
Console.WriteLine(device.Statistics.ToString());

// Close the pcap device
device.Close();
}

private static void device_OnPacketArrival(object sender, CaptureEventArgs e)
{
var time = e.Packet.Timeval.Date;
var len = e.Packet.Data.Length;
Console.WriteLine("{0}:{1}:{2},{3} Len={4}",
time.Hour, time.Minute, time.Second, time.Millisecond, len);
Console.WriteLine(e.Packet.ToString());

var p = PacketDotNet.Packet.ParsePacket(e.Packet.LinkLayerType, e.Packet.Data);
Console.WriteLine(p.ToString(PacketDotNet.StringOutputType.VerboseColored));
}
}
}
72 changes: 36 additions & 36 deletions Examples/AirPcapBasicCapture/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("AirPcapBasicCapture")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("AirPcapBasicCapture")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("cd354ff6-5926-4d5b-80b8-c1a34922ed2a")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("AirPcapBasicCapture")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("AirPcapBasicCapture")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("cd354ff6-5926-4d5b-80b8-c1a34922ed2a")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
Loading

0 comments on commit b86cc6c

Please sign in to comment.