Receive LLDP (IEEE 802.1AB) Broadcast Messages with C# or C++Calculate relative time in C#What is the difference between String and string in C#?What does the [Flags] Enum Attribute mean in C#?Hidden Features of C#?How do I enumerate an enum in C#?What are the rules about using an underscore in a C++ identifier?Why is Dictionary preferred over Hashtable in C#?How can I profile C++ code running on Linux?The Definitive C++ Book Guide and ListWhat is the “-->” operator in C++?
What were the problems on the Apollo 11 lunar module?
How did Jayne know when to shoot?
Interviewing with an unmentioned 9 months of sick leave taken during a job
Increasing muscle power without increasing volume
How to remove the first colon ':' from a timestamp?
I have found a mistake on someone's code published online: what is the protocol?
Not able to find the "TcmTemplateDebugHost" process in Attach process, Even we run the Template builder
Naming your baby - does the name influence the child?
Everyone but three
Exporting animation to Unity
How to draw a winding on a toroid of a circular cross section?
Column deletion based on number of string matches within column
Wordplay addition paradox
Which GPUs to get for Mathematical Optimization (if any)?
How is Buchholz score calculated in a Swiss tournament?
Random piece of plastic
How would thermophilic fish survive?
Why did Fury respond that way?
Is it ethical for a company to ask its employees to move furniture on a weekend?
Whipping heavy cream with melted chocolate
Grouping into more groups in one iteration
Parallel Computation with the possibility of calculation failure
An entire function all whose forward orbits are bounded
Why is Google approaching my VPS machine?
Receive LLDP (IEEE 802.1AB) Broadcast Messages with C# or C++
Calculate relative time in C#What is the difference between String and string in C#?What does the [Flags] Enum Attribute mean in C#?Hidden Features of C#?How do I enumerate an enum in C#?What are the rules about using an underscore in a C++ identifier?Why is Dictionary preferred over Hashtable in C#?How can I profile C++ code running on Linux?The Definitive C++ Book Guide and ListWhat is the “-->” operator in C++?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I would like to discover local ethernet devices in my C# application. These devices are sending LLDP (Link Layer Discovery Protocol) broadcast messages. LLDP is also known as IEEE 802.1 AB and comes on OSI Layer 2, means pure Ethernet.
I already discovered a way by using a NDIS driver like WinPCAP together with a .net wrapper like SharpPCAP. But: I don't want to sniff the network, only reading broadcast ethernet frames according to IEEE. Therefore this seems a little oversized... any other ideas?
Using C++ instead of C#? This brings the advantage to get direct access to the WinAPI instead of using the convinient but limited .net framework. I'm not so familiar with the WinAPI. Just checked out MS docs about this. I still don't see a way to get the LLDP content by WinAPI. Any more Ideas?
c# c++ winapi network-programming ethernet
add a comment |
I would like to discover local ethernet devices in my C# application. These devices are sending LLDP (Link Layer Discovery Protocol) broadcast messages. LLDP is also known as IEEE 802.1 AB and comes on OSI Layer 2, means pure Ethernet.
I already discovered a way by using a NDIS driver like WinPCAP together with a .net wrapper like SharpPCAP. But: I don't want to sniff the network, only reading broadcast ethernet frames according to IEEE. Therefore this seems a little oversized... any other ideas?
Using C++ instead of C#? This brings the advantage to get direct access to the WinAPI instead of using the convinient but limited .net framework. I'm not so familiar with the WinAPI. Just checked out MS docs about this. I still don't see a way to get the LLDP content by WinAPI. Any more Ideas?
c# c++ winapi network-programming ethernet
I do not think you can do it in c#. Only c++. First there is no difference between sniffing and reading, the code is the same except sniffer will break down all the fields to ascii. You need to filter incoming IP for only Protocol LLDP. Net Library does not allow access to all fields and types in the IP header. LLDP is not one of the enumerated types so the only way of getting access is in c++ (not c#).
– jdweng
Mar 25 at 16:27
Thx. I added some thoughts of you in my post above.
– Markus
Mar 26 at 9:26
What is wrong with using the NDIS driver? You can just filter to return LLDP. As I said there is no difference in Sniff and receive except the sniff parse entire results to text format while receive doesn't.
– jdweng
Mar 26 at 9:33
I got your point. Using a NDIS driver will most likely work. My App is intended to get used by ordinary people. Installing additial drivers and grand rights might scare them. Therefore, I try to limit those things to the minimum.
– Markus
Mar 26 at 9:40
Try following code project : codeproject.com/Articles/18572/NDIS-MONITOR-NET-32-bit-v1-00
– jdweng
Mar 26 at 10:04
add a comment |
I would like to discover local ethernet devices in my C# application. These devices are sending LLDP (Link Layer Discovery Protocol) broadcast messages. LLDP is also known as IEEE 802.1 AB and comes on OSI Layer 2, means pure Ethernet.
I already discovered a way by using a NDIS driver like WinPCAP together with a .net wrapper like SharpPCAP. But: I don't want to sniff the network, only reading broadcast ethernet frames according to IEEE. Therefore this seems a little oversized... any other ideas?
Using C++ instead of C#? This brings the advantage to get direct access to the WinAPI instead of using the convinient but limited .net framework. I'm not so familiar with the WinAPI. Just checked out MS docs about this. I still don't see a way to get the LLDP content by WinAPI. Any more Ideas?
c# c++ winapi network-programming ethernet
I would like to discover local ethernet devices in my C# application. These devices are sending LLDP (Link Layer Discovery Protocol) broadcast messages. LLDP is also known as IEEE 802.1 AB and comes on OSI Layer 2, means pure Ethernet.
I already discovered a way by using a NDIS driver like WinPCAP together with a .net wrapper like SharpPCAP. But: I don't want to sniff the network, only reading broadcast ethernet frames according to IEEE. Therefore this seems a little oversized... any other ideas?
Using C++ instead of C#? This brings the advantage to get direct access to the WinAPI instead of using the convinient but limited .net framework. I'm not so familiar with the WinAPI. Just checked out MS docs about this. I still don't see a way to get the LLDP content by WinAPI. Any more Ideas?
c# c++ winapi network-programming ethernet
c# c++ winapi network-programming ethernet
edited Mar 26 at 9:24
Markus
asked Mar 25 at 15:40
MarkusMarkus
62 bronze badges
62 bronze badges
I do not think you can do it in c#. Only c++. First there is no difference between sniffing and reading, the code is the same except sniffer will break down all the fields to ascii. You need to filter incoming IP for only Protocol LLDP. Net Library does not allow access to all fields and types in the IP header. LLDP is not one of the enumerated types so the only way of getting access is in c++ (not c#).
– jdweng
Mar 25 at 16:27
Thx. I added some thoughts of you in my post above.
– Markus
Mar 26 at 9:26
What is wrong with using the NDIS driver? You can just filter to return LLDP. As I said there is no difference in Sniff and receive except the sniff parse entire results to text format while receive doesn't.
– jdweng
Mar 26 at 9:33
I got your point. Using a NDIS driver will most likely work. My App is intended to get used by ordinary people. Installing additial drivers and grand rights might scare them. Therefore, I try to limit those things to the minimum.
– Markus
Mar 26 at 9:40
Try following code project : codeproject.com/Articles/18572/NDIS-MONITOR-NET-32-bit-v1-00
– jdweng
Mar 26 at 10:04
add a comment |
I do not think you can do it in c#. Only c++. First there is no difference between sniffing and reading, the code is the same except sniffer will break down all the fields to ascii. You need to filter incoming IP for only Protocol LLDP. Net Library does not allow access to all fields and types in the IP header. LLDP is not one of the enumerated types so the only way of getting access is in c++ (not c#).
– jdweng
Mar 25 at 16:27
Thx. I added some thoughts of you in my post above.
– Markus
Mar 26 at 9:26
What is wrong with using the NDIS driver? You can just filter to return LLDP. As I said there is no difference in Sniff and receive except the sniff parse entire results to text format while receive doesn't.
– jdweng
Mar 26 at 9:33
I got your point. Using a NDIS driver will most likely work. My App is intended to get used by ordinary people. Installing additial drivers and grand rights might scare them. Therefore, I try to limit those things to the minimum.
– Markus
Mar 26 at 9:40
Try following code project : codeproject.com/Articles/18572/NDIS-MONITOR-NET-32-bit-v1-00
– jdweng
Mar 26 at 10:04
I do not think you can do it in c#. Only c++. First there is no difference between sniffing and reading, the code is the same except sniffer will break down all the fields to ascii. You need to filter incoming IP for only Protocol LLDP. Net Library does not allow access to all fields and types in the IP header. LLDP is not one of the enumerated types so the only way of getting access is in c++ (not c#).
– jdweng
Mar 25 at 16:27
I do not think you can do it in c#. Only c++. First there is no difference between sniffing and reading, the code is the same except sniffer will break down all the fields to ascii. You need to filter incoming IP for only Protocol LLDP. Net Library does not allow access to all fields and types in the IP header. LLDP is not one of the enumerated types so the only way of getting access is in c++ (not c#).
– jdweng
Mar 25 at 16:27
Thx. I added some thoughts of you in my post above.
– Markus
Mar 26 at 9:26
Thx. I added some thoughts of you in my post above.
– Markus
Mar 26 at 9:26
What is wrong with using the NDIS driver? You can just filter to return LLDP. As I said there is no difference in Sniff and receive except the sniff parse entire results to text format while receive doesn't.
– jdweng
Mar 26 at 9:33
What is wrong with using the NDIS driver? You can just filter to return LLDP. As I said there is no difference in Sniff and receive except the sniff parse entire results to text format while receive doesn't.
– jdweng
Mar 26 at 9:33
I got your point. Using a NDIS driver will most likely work. My App is intended to get used by ordinary people. Installing additial drivers and grand rights might scare them. Therefore, I try to limit those things to the minimum.
– Markus
Mar 26 at 9:40
I got your point. Using a NDIS driver will most likely work. My App is intended to get used by ordinary people. Installing additial drivers and grand rights might scare them. Therefore, I try to limit those things to the minimum.
– Markus
Mar 26 at 9:40
Try following code project : codeproject.com/Articles/18572/NDIS-MONITOR-NET-32-bit-v1-00
– jdweng
Mar 26 at 10:04
Try following code project : codeproject.com/Articles/18572/NDIS-MONITOR-NET-32-bit-v1-00
– jdweng
Mar 26 at 10:04
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55341467%2freceive-lldp-ieee-802-1ab-broadcast-messages-with-c-sharp-or-c%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55341467%2freceive-lldp-ieee-802-1ab-broadcast-messages-with-c-sharp-or-c%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I do not think you can do it in c#. Only c++. First there is no difference between sniffing and reading, the code is the same except sniffer will break down all the fields to ascii. You need to filter incoming IP for only Protocol LLDP. Net Library does not allow access to all fields and types in the IP header. LLDP is not one of the enumerated types so the only way of getting access is in c++ (not c#).
– jdweng
Mar 25 at 16:27
Thx. I added some thoughts of you in my post above.
– Markus
Mar 26 at 9:26
What is wrong with using the NDIS driver? You can just filter to return LLDP. As I said there is no difference in Sniff and receive except the sniff parse entire results to text format while receive doesn't.
– jdweng
Mar 26 at 9:33
I got your point. Using a NDIS driver will most likely work. My App is intended to get used by ordinary people. Installing additial drivers and grand rights might scare them. Therefore, I try to limit those things to the minimum.
– Markus
Mar 26 at 9:40
Try following code project : codeproject.com/Articles/18572/NDIS-MONITOR-NET-32-bit-v1-00
– jdweng
Mar 26 at 10:04