Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / March 2005

Tip: Looking for answers? Try searching our database.

Validating IP & MAC Addresses ...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
H.B. - 07 Mar 2005 18:58 GMT
Hi,

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

Hugo
Mark Randall - 07 Mar 2005 19:41 GMT
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

> Hi,
>
> - Is there a function that can validate IP addresses?
> - Is there a function that can validate MAC addresses?
>
> Hugo
thatsalok - 08 Mar 2005 05:03 GMT
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"

> Hi,
>
> - Is there a function that can validate IP addresses?
> - Is there a function that can validate MAC addresses?
>
> Hugo
Alexander Grigoriev - 09 Mar 2005 06:15 GMT
It depends on your definition of valid MAC address and valid IP address.

> Hi,
>
> - Is there a function that can validate IP addresses?
> - Is there a function that can validate MAC addresses?
>
> Hugo
H.B. - 14 Mar 2005 17:10 GMT
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)

> It depends on your definition of valid MAC address and valid IP address.
>
[quoted text clipped - 4 lines]
> >
> > Hugo
Frank Hickman [MVP] - 14 Mar 2005 18:32 GMT
> 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.

Signature

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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.