MAC address

public static NDIS_802_3_ADDRESS StrToByteArray(string str)
        {
            ASCIIEncoding encoding = new ASCIIEncoding();
            byte[] m = encoding.GetBytes(str);
            NDIS_802_3_ADDRESS mac = new NDIS_802_3_ADDRESS(m);
            return mac;
        }

You use this method to change the string to the mac address, however the output of this value is a fixed value of 30-30-2D-32-31-2D, regardless of the input string.

Any ideas?

+3
source share
2 answers

It probably returns the MAC address of your network interface card.

If you are running Windows, run ipconfig / all from the command line. Does this match your return value?

I'm not sure what this method should do in the first place. What do you pass as an input string and what do you expect from this method?

+5
source

, NDIS_802_3_ADDRESS , ? ? /, , .

0

Source: https://habr.com/ru/post/1703682/


All Articles