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++?

Avoiding repetition when using the "snprintf idiom" to write text

The Lucas argument vs the theorem-provers -- who wins and why?

Correct use of the the idiom 'Гнать/Катить бочку'

Why was Pan Am Flight 103 flying over Lockerbie?

What prevents a US state from colonizing a smaller state?

Would skyscrapers tip over if people fell sideways?

"I am [the / an] owner of a bookstore"?

Does a lens with a bigger max. aperture focus faster than a lens with a smaller max. aperture?

Does it make sense to (partially) create a conlang that you don't intend to actually use in the story?

Dynamic Sql Query - how to add an int to the code?

Is this house-rule removing the increased effect of cantrips at higher character levels balanced?

Calculus, water poured into a cone: Why is the derivative non-linear?

How soon after takeoff can you recline your airplane seat?

How do banks maintain reserves?

How would one prevent political gerrymandering?

Is my guitar action too high or is the bridge too high?

How far can gerrymandering go?

The alcoholic village festival

Listen to my Story...Let us find the Unique Invisible Pan Digital Pair

Having to constantly redo everything because I don't know how to do it

Word ending in "-ine" for rat-like

Meaning of the word "good" in context

Could you fall off a planet if it was being accelerated by engines?

German idiomatic equivalents of 能骗就骗 (if you can trick, then trick)



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++?













1















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?










share|improve this question
























  • 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















1















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?










share|improve this question
























  • 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













1












1








1








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?










share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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

















  • 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










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
);



);













draft saved

draft discarded


















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.



















draft saved

draft discarded
















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript