Validating IP & MAC Addresses ...

  • Thread starter Thread starter H.B.
  • Start date Start date
H

H.B.

Hi,

- Is there a function that can validate IP addresses?
- Is there a function that can validate MAC addresses?

Hugo
 
Maybe, and No...

However:

A MAC is simply a char[6] (6 bytes, not actually a string) and any 6 bytes
are valid - but some manufacturers / card ID's wont have been assigned. No
way to tell...

IP Wise look up illegal addresses and such.

- MR
 
I believe you have to write your own Api to validate correct IP adress and
Mac Address as Microsoft Doesn't rpovide any api yet to check that.


--

With Regards
Alok Gupta
Visit me at http://alok.bizhat.com

"I Believe this will Help"
 
It depends on your definition of valid MAC address and valid IP address.
 
It's about syntax ...

I must validate syntax for two strings : IP string (xxx.xxx.xxx.xxx) and
MAC string. (xx-xx-xx-xx-xx-xx)
 
H.B. said:
It's about syntax ...

I must validate syntax for two strings : IP string (xxx.xxx.xxx.xxx) and
MAC string. (xx-xx-xx-xx-xx-xx)

That should be easy enough, the IP segments are between 0-255 and MAC
segments should be in the range (hex) 00-FF.

--
============
Frank Hickman
Microsoft MVP
NobleSoft, Inc.
============
Replace the _nosp@m_ with @ to reply.
 
Back
Top