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,7 +21,10 @@ namespace PcapDotNet { namespace Core ...@@ -16,7 +21,10 @@ namespace PcapDotNet { namespace Core
virtual System::String^ ToString() override; virtual System::String^ ToString() override;
private: protected:
SocketAddress(unsigned short family);
private:
SocketAddressFamily^ _family; SocketAddressFamily^ _family;
}; };
}} }}
\ No newline at end of file
...@@ -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.
Ccitt = 10, /// </summary>
// CCITT protocols, X.25 etc Internet = 2,
Sna = 11, // IBM SNA
DECnet = 12, // DECnet /// <summary>
DirectDataLinkInterface = 13, // Direct data link interface /// arpanet imp addresses
Lat = 14, // LAT /// </summary>
HyperChannel = 15, // NSC Hyperchannel ImpLink = 3,
AppleTalk = 16, // AppleTalk
NetBios = 17, // NetBios-style addresses /// <summary>
VoiceView = 18, // VoiceView /// pup protocols: e.g. BSP
Firefox = 19, // Protocols from Firefox /// </summary>
Unknown1 = 20, // Somebody is using this! Pup = 4,
Ban = 21, // Banyan
Atm = 22, // Native ATM Services /// <summary>
Internet6 = 23, // Internetwork Version 6 /// mit CHAOS protocols
Cluster = 24, // Microsoft Wolfpack /// </summary>
Ieee12844 = 25, // IEEE 1284.4 WG AF Chaos = 5,
Irda = 26, // IrDA
NetworkDesigners = 28, // Network Designers OSI & gateway /// <summary>
TcnProcess = 29, /// XEROX NS protocols
TcnMessage = 30, /// </summary>
Iclfxbm = 31, NS = 6,
Bluetooth = 32 // Bluetooth RFCOMM/L2CAP protocols
/// <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,
/// <summary>
/// IBM SNA
/// </summary>
Sna = 11,
/// <summary>
/// DECnet
/// </summary>
DECnet = 12,
/// <summary>
/// Direct data link interface
/// </summary>
DirectDataLinkInterface = 13,
/// <summary>
/// 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,
TcnMessage = 30,
Iclfxbm = 31,
/// <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