views:

163

answers:

2

Dear All,

I have a Data card with me.

I wanted to know, is there any way programatically, i can tell that, it is data card and it is LAN card.

I have used IFTable, I have used IListManager, INetwork manager provided by microsoft, but not able to solve the problem

Edited:

I have one lan card and one data card connected on my system, i want to do some operation on data card, but i dont know, when my data card is connected and when my LAN card, enumerating will give me list of all connections, but how to identify LAN and Data card among them.

Please help me in this regard.

vinayaka karjigi

A: 

You should clarify your problem. What problem are you trying to solve? Why do you want to distinguish the cards?

That said, some ideas:

  • If you just want to identify your specific cards, every network card has a unique ID (the MAC). You can retrieve it using networking tools.
  • If you want to identify the type of card, you can try to get PCI information, and look for a string. But that is difficult in the general case, because there are so many different types of cards. So you'd need to clarify your question.
sleske
I have one lan card and one data card connected on my system, i want to do some operation on data card, but i dont know, when my data card is connected and when my LAN card, enumerating will give me list of all connections, but how to identify LAN and Data card among them.
Vinayaka Karjigi
As I wrote, try to retrieve the card's MAC address. Under Linux, you can do it e.g. using /sbin/ifconfig (lists all network interfaces with their internal name (eth0 etc.) and MAC address). Other OSes should have something similar.
sleske
But getting MAC address will not help me in differentiating Data card from LAN card or any other card inserted on to system i guess
Vinayaka Karjigi
A: 

There is no clear distinction between the different kinds of networks anymore. On the one hand, LANs have gone wireless with WiFi. On the other hand, public networks have gone local with femtocells. Hence, it becomes increasingly difficult to distinguish the two kinds of networks, and therefore the network cards connecting to them. There is no clear boundary.

MSalters