473,387 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Validating IP & MAC Addresses ...

Hi,

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

Hugo
Nov 17 '05 #1
5 1273
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

"H.B." <hbcrdv@_hotmail_.com> wrote in message
news:11***************@news.drenet.dnd.ca...
Hi,

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

Hugo

Nov 17 '05 #2
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"
"H.B." <hbcrdv@_hotmail_.com> wrote in message
news:11***************@news.drenet.dnd.ca...
Hi,

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

Hugo

Nov 17 '05 #3
It depends on your definition of valid MAC address and valid IP address.

"H.B." <hbcrdv@_hotmail_.com> wrote in message
news:11***************@news.drenet.dnd.ca...
Hi,

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

Hugo

Nov 17 '05 #4
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)

"Alexander Grigoriev" <al***@earthlink.net> wrote in message
news:e7**************@TK2MSFTNGP15.phx.gbl...
It depends on your definition of valid MAC address and valid IP address.

"H.B." <hbcrdv@_hotmail_.com> wrote in message
news:11***************@news.drenet.dnd.ca...
Hi,

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

Hugo


Nov 17 '05 #5
"H.B." <hbcrdv@_hotmail_.com> wrote in message
news:11***************@news.drenet.dnd.ca...
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.
Nov 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: John | last post by:
What are the methods used in validating email addresses in Windows i.e what are the replacement for getmxrr? does anyone have an example? Thank you John
8
by: UndoMiel | last post by:
Hi, I am looking for a way to validate IP addresses using XML Schemas. The following is what i used: <xsd:simpleType name="IPType"> <xsd:restriction base="xsd:string"> <xsd:pattern...
9
by: Mark | last post by:
Hi there On this page i get some errors when validating: http://www.keyone.nl/lab/beeldlijn/nl/collection.asp The problem is caused by the use of ASP in my pages. This is the code: <a...
2
by: Doug | last post by:
I'm a little confused by this functionality. It doesn't seem to be behaving like it should. I am using the following regular expression to validate email addresses:...
5
by: martin | last post by:
Hi, I would be extremly grateful for some help on producing an xml fragemt. The fragment that I wish to produce should look like this <Addresses> <Address>&qout;Somebody's Name&quot;...
6
by: yochessyo | last post by:
Hi, I would like to validate email addresses. I am not interested to validate it with a regex expression but from the email server where the addresses are. I would like to query this server and...
1
by: cemcat | last post by:
Hello, We have an ASP.NET 2.0 (C#) web form that contains a textbox for users to enter multiple e-mail addresses separated by semicolons. We need to validate that each individual e-mail address...
4
by: SAL | last post by:
I am using a RegularExpressionValidator control on my ASP page, and I have the ValidationExpression property set to "Internet E-mail Address". The email address is valiated when the user puts in a...
1
by: eastlands | last post by:
I need to use an unmanaged c++ dll which uses structs that contain callbacks and also functions. I have included the appropriate c++ definitials and my c# translations below. I first defined the...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.