Find available network interfaces in C/C++? [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
Does anyone know a C/C++ code for finding the network interfaces available?
I've been looking for some code, but most times they are quite complex. Is there a simple way to do this?

See the getifaddrs man page. There is an example program towards the end.

If you're looking for this in context of a desktop application, and you want to be notified of changes (e.g. interfaces connecting/disconnecting), consider using DBus to monitor NetworkManager.
http://projects.gnome.org/NetworkManager/developers/api/09/spec.html
You can enumerate interfaces, as well as interface-specific things (like available and connected WiFi access points, configured-but-not-dialed PPP links, and so forth), and if anything changes, you'll receive a notification over the DBus.
(If this is for something more like a server program, where you expect the network configuration to remain more stable, then things like getifaddrs are possibly more appropriate.)

Related

Is it possible to add VBA programming environment to my C++ application? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I have an application that is written in C++ and would like to offer the user the possibility to have a VBA-programming interface (not dissimilar from the one in Excel). Is there the possibility to do that? Does a set of libraries exists for this? Is it very difficult to do?
Yes it is possible, but do regard it as being extremely difficult. As a starter for ten, your application will need a comprehensive Component Object Model interface. At that point, you would be able to use VBScript, so it might be wise to stop there.
For fully-fledged embedded VBA, you'll need to negotiate a licence with Microsoft.
Some applications (e.g. Reuters Kobra) licence the VBA interface in a similar way.

How to interact with a smart card in C/C++? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
Is there any open framework written in C/C++ which helps in interacting with smart card devices, here my aim is to create such a system which is platform independent by in C/C++.
I have been trying to search such Libraries but all i came across is Java based frameworks like OCF and Java Smart Card I/O API.
Any help is appreciated.
Indeed there are methods like SCardEstablishContext, SCardConnect, SCardTransmit, which you use to establish communication with the smart card, and then send commands to the card, on the APDU level.
See also here

USB API for Windows [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Is there a standard API for USB devices on windows? I know classes will have an impact on them but I cant find a standard one/list at all?
Yes there is.
Its called WinUSB - http://msdn.microsoft.com/en-us/library/windows/hardware/ff540196(v=vs.85).aspx
Sample WinUSB code found here - http://msdn.microsoft.com/en-us/library/windows/hardware/ff540174(v=vs.85).aspx
All USB devices has unique Pid, Vid. You can use generic library to interact with its end points for me I am using cypress library which has 2 versions for managed and unmanaged languages.
http://www.cypress.com/?rID=34870
Keep in mind the license for this library is free of charge if used with cypress powered devices only. But you can check it and use native APIs to achieve the same behavior but it supports some good features epically high speed transfer to bulk end points.
Also check this question
Working with USB devices in .NET

network packet creation/parsing library? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm looking for a library that helps with network packet creation/parsing. Something as Python dpkg library. I need to change IP addresses, to check ports and to analyze payload of TCP/UDP packets which I have as Ethernet frames.
I know this can be done manually, e.g. as is presented in WinPcap docs or libpcap docs. Are there any library for this?
C++ on Windows.
Take a look to libcrafter. It's a library for creation and decoding of network packets very similar to Scapy. Not sure if it can work on Windows but you can try.
I know it's been a while this answer but you should try libtins. It is a really versatile, object-oriented and efficient library.
Disclaimer: I was one of the creators of the library and it is actively maintained by Matias Fontanini.
Have a look at the plugins and API for for Wireshark.

Concurrent system modeling tools [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I'm currently taking a course in concurrent software design, and we're focusing a lot on modeling. I see the value in this, but I am not sure if the tool we are using is horrible, good, or somewhere in between, because I can't find any other examples. We're currently using LTS Analyzer, with some more information here.
So my question is, for anyone who has done concurrent system design, do you model you application before implementing, and if so what tools do you use to do so? Thanks.
While I haven't used is myself I've heard some good things about JPF (planning to use it soon).
One of the more widely known tools for modelling & verification of concurrent/distributed systems in various industries is the SPIN model checker: http://spinroot.com/spin/
However keep in mind that no matter how correct your design and/or verified your model is, your implementation still needs to follow suit. This is where many projects fail in one way or another.