3

I have a third party dll, that is supposed to return machine name. Sometimes it returns

\\John-PC

some other times it returns

\\192.168.1.120

and recently i discovered that it returns something like this

\\[ef80::32d6:2255:27dd:123c]

So what is the third option?

If it is not a bug or MAC orelse, could i convert it to \192.168.1.120 and get happy???

Kara
  • 6,115
  • 16
  • 50
  • 57
OrElse
  • 9,709
  • 39
  • 140
  • 253

3 Answers3

14

It is the IPv6 version of the IPv4 address 192.168.1.120 . It also amuses me how your DLL seems to be indecisive with what to return.

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
  • Well amusement has just stopped, since the machine name returns from the Marshal.PtrToStringUni method... – OrElse Sep 07 '10 at 13:58
3

It's an IPv6 address. IPv6 allows you to leave out sections that are equal to 0, hence the ::.

Kaleb Brasee
  • 51,193
  • 8
  • 108
  • 113
0

The 3rd option is a IPv6 address

bramp
  • 9,581
  • 5
  • 40
  • 46