Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pcap-Net
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Pcap-Net
Commits
66887d2e
Commit
66887d2e
authored
Jul 20, 2009
by
Brickner_cp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
b3ce6e3b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
212 additions
and
50 deletions
+212
-50
PacketDeviceOpenAttributes.h
PcapDotNet/src/PcapDotNet.Core/PacketDeviceOpenAttributes.h
+31
-5
SocketAddress.cpp
PcapDotNet/src/PcapDotNet.Core/SocketAddress.cpp
+5
-5
SocketAddress.h
PcapDotNet/src/PcapDotNet.Core/SocketAddress.h
+13
-5
SocketAddressFamily.h
PcapDotNet/src/PcapDotNet.Core/SocketAddressFamily.h
+163
-35
No files found.
PcapDotNet/src/PcapDotNet.Core/PacketDeviceOpenAttributes.h
View file @
66887d2e
...
...
@@ -2,14 +2,40 @@
namespace
PcapDotNet
{
namespace
Core
{
/// <summary>
/// Flags to use when openning a device to send and receive packets.
/// </summary>
[
System
::
Flags
]
public
enum
class
PacketDeviceOpenAttributes
:
System
::
Int32
{
/// <summary>
/// No flags.
/// </summary>
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.
NoCaptureRemote
=
4
,
// Defines if the remote probe will capture its own generated traffic.
NoCaptureLocal
=
8
,
// Defines if the local adapter will capture its own generated traffic.
MaximumResponsiveness
=
16
// This flag configures the adapter for maximum responsiveness.
/// <summary>
/// Defines if the adapter has to go in promiscuous mode.
/// </summary>
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
PcapDotNet/src/PcapDotNet.Core/SocketAddress.cpp
View file @
66887d2e
...
...
@@ -3,11 +3,6 @@
using
namespace
System
;
using
namespace
PcapDotNet
::
Core
;
SocketAddress
::
SocketAddress
(
unsigned
short
family
)
{
_family
=
safe_cast
<
SocketAddressFamily
>
(
family
);
}
SocketAddressFamily
^
SocketAddress
::
Family
::
get
()
{
return
_family
;
...
...
@@ -17,3 +12,8 @@ String^ SocketAddress::ToString()
{
return
Family
->
ToString
();
}
SocketAddress
::
SocketAddress
(
unsigned
short
family
)
{
_family
=
safe_cast
<
SocketAddressFamily
>
(
family
);
}
PcapDotNet/src/PcapDotNet.Core/SocketAddress.h
View file @
66887d2e
...
...
@@ -4,11 +4,16 @@
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
:
SocketAddress
(
unsigned
short
family
);
public
:
/// <summary>
/// Family (type) of the socket address.
/// </summary>
property
SocketAddressFamily
^
Family
{
SocketAddressFamily
^
get
();
...
...
@@ -16,7 +21,10 @@ namespace PcapDotNet { namespace Core
virtual
System
::
String
^
ToString
()
override
;
private
:
protected
:
SocketAddress
(
unsigned
short
family
);
private
:
SocketAddressFamily
^
_family
;
};
}}
\ No newline at end of file
PcapDotNet/src/PcapDotNet.Core/SocketAddressFamily.h
View file @
66887d2e
...
...
@@ -2,42 +2,170 @@
namespace
PcapDotNet
{
namespace
Core
{
/// <summary>
/// The type of socket address for a device address.
/// </summary>
public
enum
class
SocketAddressFamily
:
System
::
UInt16
{
Unspecified
=
0
,
// unspecified
Unix
=
1
,
// local to host (pipes, portals)
Internet
=
2
,
// internetwork: UDP, TCP, etc.
ImpLink
=
3
,
// arpanet imp addresses
Pup
=
4
,
// pup protocols: e.g. BSP
Chaos
=
5
,
// mit CHAOS protocols
NS
=
6
,
// XEROX NS protocols
Ipx
=
NS
,
// IPX protocols: IPX, SPX, etc.
Iso
=
7
,
// ISO protocols
Osi
=
Iso
,
// OSI is ISO
EuropeanComputerManufactures
=
8
,
// european computer manufacturers
Datakit
=
9
,
// datakit protocols
Ccitt
=
10
,
// CCITT protocols, X.25 etc
Sna
=
11
,
// IBM SNA
DECnet
=
12
,
// DECnet
DirectDataLinkInterface
=
13
,
// Direct data link interface
Lat
=
14
,
// LAT
HyperChannel
=
15
,
// NSC Hyperchannel
AppleTalk
=
16
,
// AppleTalk
NetBios
=
17
,
// NetBios-style addresses
VoiceView
=
18
,
// VoiceView
Firefox
=
19
,
// Protocols from Firefox
Unknown1
=
20
,
// Somebody is using this!
Ban
=
21
,
// Banyan
Atm
=
22
,
// Native ATM Services
Internet6
=
23
,
// Internetwork Version 6
Cluster
=
24
,
// Microsoft Wolfpack
Ieee12844
=
25
,
// IEEE 1284.4 WG AF
Irda
=
26
,
// IrDA
NetworkDesigners
=
28
,
// Network Designers OSI & gateway
TcnProcess
=
29
,
TcnMessage
=
30
,
Iclfxbm
=
31
,
Bluetooth
=
32
// Bluetooth RFCOMM/L2CAP protocols
/// <summary>
/// unspecified
/// </summary>
Unspecified
=
0
,
/// <summary>
/// local to host (pipes, portals)
/// </summary>
Unix
=
1
,
/// <summary>
/// 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
,
/// <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 & gateway
/// </summary>
NetworkDesigners
=
28
,
TcnProcess
=
29
,
TcnMessage
=
30
,
Iclfxbm
=
31
,
/// <summary>
/// Bluetooth RFCOMM/L2CAP protocols
/// </summary>
Bluetooth
=
32
};
}}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment