Commit 66887d2e authored by Brickner_cp's avatar Brickner_cp

--no commit message

--no commit message
parent b3ce6e3b
...@@ -2,14 +2,40 @@ ...@@ -2,14 +2,40 @@
namespace PcapDotNet { namespace Core namespace PcapDotNet { namespace Core
{ {
/// <summary>
/// Flags to use when openning a device to send and receive packets.
/// </summary>
[System::Flags] [System::Flags]
public enum class PacketDeviceOpenAttributes : System::Int32 public enum class PacketDeviceOpenAttributes : System::Int32
{ {
/// <summary>
/// No flags.
/// </summary>
None = 0, None = 0,
Promiscuous = 1, // Defines if the adapter has to go in promiscuous mode.
DataTransferUdpRemote = 2, // Defines if the data trasfer (in case of a remote capture) has to be done with UDP protocol. /// <summary>
NoCaptureRemote = 4, // Defines if the remote probe will capture its own generated traffic. /// Defines if the adapter has to go in promiscuous mode.
NoCaptureLocal = 8, // Defines if the local adapter will capture its own generated traffic. /// </summary>
MaximumResponsiveness = 16 // This flag configures the adapter for maximum responsiveness. Promiscuous = 1,
/// <summary>
/// Defines if the data trasfer (in case of a remote capture) has to be done with UDP protocol.
/// </summary>
DataTransferUdpRemote = 2,
/// <summary>
/// Defines if the remote probe will capture its own generated traffic.
/// </summary>
NoCaptureRemote = 4,
/// <summary>
/// Defines if the local adapter will capture its own generated traffic.
/// </summary>
NoCaptureLocal = 8,
/// <summary>
/// This flag configures the adapter for maximum responsiveness.
/// </summary>
MaximumResponsiveness = 16
}; };
}} }}
\ No newline at end of file
...@@ -3,11 +3,6 @@ ...@@ -3,11 +3,6 @@
using namespace System; using namespace System;
using namespace PcapDotNet::Core; using namespace PcapDotNet::Core;
SocketAddress::SocketAddress(unsigned short family)
{
_family = safe_cast<SocketAddressFamily>(family);
}
SocketAddressFamily^ SocketAddress::Family::get() SocketAddressFamily^ SocketAddress::Family::get()
{ {
return _family; return _family;
...@@ -17,3 +12,8 @@ String^ SocketAddress::ToString() ...@@ -17,3 +12,8 @@ String^ SocketAddress::ToString()
{ {
return Family->ToString(); return Family->ToString();
} }
SocketAddress::SocketAddress(unsigned short family)
{
_family = safe_cast<SocketAddressFamily>(family);
}
...@@ -4,11 +4,16 @@ ...@@ -4,11 +4,16 @@
namespace PcapDotNet { namespace Core namespace PcapDotNet { namespace Core
{ {
public ref class SocketAddress /// <summary>
/// The base of all device addresses.
/// Contains the family (type) of the address.
/// </summary>
public ref class SocketAddress abstract
{ {
public: public:
SocketAddress(unsigned short family); /// <summary>
/// Family (type) of the socket address.
/// </summary>
property SocketAddressFamily^ Family property SocketAddressFamily^ Family
{ {
SocketAddressFamily^ get(); SocketAddressFamily^ get();
...@@ -16,6 +21,9 @@ namespace PcapDotNet { namespace Core ...@@ -16,6 +21,9 @@ namespace PcapDotNet { namespace Core
virtual System::String^ ToString() override; virtual System::String^ ToString() override;
protected:
SocketAddress(unsigned short family);
private: private:
SocketAddressFamily^ _family; SocketAddressFamily^ _family;
}; };
......
...@@ -2,42 +2,170 @@ ...@@ -2,42 +2,170 @@
namespace PcapDotNet { namespace Core namespace PcapDotNet { namespace Core
{ {
/// <summary>
/// The type of socket address for a device address.
/// </summary>
public enum class SocketAddressFamily : System::UInt16 public enum class SocketAddressFamily : System::UInt16
{ {
Unspecified = 0, // unspecified /// <summary>
Unix = 1, // local to host (pipes, portals) /// unspecified
Internet = 2, // internetwork: UDP, TCP, etc. /// </summary>
ImpLink = 3, // arpanet imp addresses Unspecified = 0,
Pup = 4, // pup protocols: e.g. BSP
Chaos = 5, // mit CHAOS protocols /// <summary>
NS = 6, // XEROX NS protocols /// local to host (pipes, portals)
Ipx = NS, // IPX protocols: IPX, SPX, etc. /// </summary>
Iso = 7, // ISO protocols Unix = 1,
Osi = Iso, // OSI is ISO
EuropeanComputerManufactures = 8, // european computer manufacturers /// <summary>
Datakit = 9, // datakit protocols /// internetwork: UDP, TCP, etc.
/// </summary>
Internet = 2,
/// <summary>
/// arpanet imp addresses
/// </summary>
ImpLink = 3,
/// <summary>
/// pup protocols: e.g. BSP
/// </summary>
Pup = 4,
/// <summary>
/// mit CHAOS protocols
/// </summary>
Chaos = 5,
/// <summary>
/// XEROX NS protocols
/// </summary>
NS = 6,
/// <summary>
/// IPX protocols: IPX, SPX, etc.
/// </summary>
Ipx = NS,
/// <summary>
/// ISO protocols
/// </summary>
Iso = 7,
/// <summary>
/// OSI is ISO
/// </summary>
Osi = Iso,
/// <summary>
/// european computer manufacturers
/// </summary>
EuropeanComputerManufactures = 8,
/// <summary>
/// datakit protocols
/// </summary>
Datakit = 9,
/// <summary>
/// CCITT protocols, X.25 etc
/// </summary>
Ccitt = 10, Ccitt = 10,
// CCITT protocols, X.25 etc
Sna = 11, // IBM SNA /// <summary>
DECnet = 12, // DECnet /// IBM SNA
DirectDataLinkInterface = 13, // Direct data link interface /// </summary>
Lat = 14, // LAT Sna = 11,
HyperChannel = 15, // NSC Hyperchannel
AppleTalk = 16, // AppleTalk /// <summary>
NetBios = 17, // NetBios-style addresses /// DECnet
VoiceView = 18, // VoiceView /// </summary>
Firefox = 19, // Protocols from Firefox DECnet = 12,
Unknown1 = 20, // Somebody is using this!
Ban = 21, // Banyan /// <summary>
Atm = 22, // Native ATM Services /// Direct data link interface
Internet6 = 23, // Internetwork Version 6 /// </summary>
Cluster = 24, // Microsoft Wolfpack DirectDataLinkInterface = 13,
Ieee12844 = 25, // IEEE 1284.4 WG AF
Irda = 26, // IrDA /// <summary>
NetworkDesigners = 28, // Network Designers OSI & gateway /// LAT
/// </summary>
Lat = 14,
/// <summary>
/// NSC Hyperchannel
/// </summary>
HyperChannel = 15,
/// <summary>
/// AppleTalk
/// </summary>
AppleTalk = 16,
/// <summary>
/// NetBios-style addresses
/// </summary>
NetBios = 17,
/// <summary>
/// VoiceView
/// </summary>
VoiceView = 18,
/// <summary>
/// Protocols from Firefox
/// </summary>
Firefox = 19,
/// <summary>
/// Somebody is using this!
/// </summary>
Unknown1 = 20,
/// <summary>
/// Banyan
/// </summary>
Ban = 21,
/// <summary>
/// Native ATM Services
/// </summary>
Atm = 22,
/// <summary>
/// Internetwork Version 6
/// </summary>
Internet6 = 23,
/// <summary>
/// Microsoft Wolfpack
/// </summary>
Cluster = 24,
/// <summary>
/// IEEE 1284.4 WG AF
/// </summary>
Ieee12844 = 25,
/// <summary>
/// IrDA
/// </summary>
Irda = 26,
/// <summary>
/// Network Designers OSI &amp; gateway
/// </summary>
NetworkDesigners = 28,
TcnProcess = 29, TcnProcess = 29,
TcnMessage = 30, TcnMessage = 30,
Iclfxbm = 31, Iclfxbm = 31,
Bluetooth = 32 // Bluetooth RFCOMM/L2CAP protocols
/// <summary>
/// Bluetooth RFCOMM/L2CAP protocols
/// </summary>
Bluetooth = 32
}; };
}} }}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment