Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > comparing MAC addresses

Reply
Thread Tools

comparing MAC addresses

 
 
smilesonisamal@gmail.com
Guest
Posts: n/a
 
      04-12-2009
On Apr 11, 8:44*pm, Juha Nieminen <(E-Mail Removed)> wrote:
> (E-Mail Removed) wrote:
> > Hi all,
> > * * I was just looking for a example code in C++ which converts 2 mac
> > address.

>
> > Mac Address A : 00:0E:AA:BB:CC:EA(Hexadecimal form)
> > Mac Address B: *1 0 94 0 0 2

>
> > I want to convert Mac address A to decimal form and then compare both
> > MAC address are equal or not. Any example code will be helpful for me.

>
> > Could anybody help me in this regard?

>
> * There's a major problem in your question: You haven't specified where
> you are reading those addresses from and in which format.
>
> * Are those addresses in an ascii file which you are trying to read, or
> something like that? Can you give us an example of such file so that we
> would know better exactly what is it that you are trying to achieve. And
> where do you want that converted address to be output? To another ascii
> file?
>
> * It's basically impossible to answer your question "how to convert from
> Mac Address A to Mac Address B" without knowing how you are reading the
> first address in the first place, or where the converted address should
> be output.


The input is from a binary file which contains series of octets.The
output is another file if the MAC address matches.

 
Reply With Quote
 
 
 
 
Juha Nieminen
Guest
Posts: n/a
 
      04-12-2009
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> The input is from a binary file which contains series of octets.The
> output is another file if the MAC address matches.


In that case your question makes absolutely no sense. If the input is
binary, and the mac addresses are already in byte form, then there's no
conversion between "hexadecimal" and "decimal". Those are *ascii*
representations of numbers, not binary ones.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to implement a firewall for Windows platform that blocks based on Mac addresses instead of IP addresses cagdas.gerede@gmail.com C Programming 1 12-07-2006 04:30 AM
Physical Addresses VS. Logical Addresses namespace1 C++ 3 11-29-2006 03:07 PM
NEW TOOL: SMAC-CL 1.0, Console App for modifying MAC addresses kl Wireless Networking 2 07-19-2004 07:12 AM
ADSL modem registers 2 mac addresses? Han Valk Cisco 3 01-27-2004 11:47 AM
mac-addresses,speed of ports of 2948G switch..Need help..Urgent Arunkumar Cisco 2 01-14-2004 05:40 PM



Advertisments