question is that In computer networking, a Media Access Control address (MAC address) is a unique
identifier assigned to most network adapters or network interface cards (NICs) by the
manufacturer for identification, and used in the Media Access Control protocol sub-layer.
The original IEEE 802 MAC address comes from the original Xerox Ethernet addressing
scheme. This 48-bit address space contains potentially 248 or 281,474,976,710,656
possible MAC addresses.

Byte6 ,,Byte5, Byte4 ,Byte3 ,Byte2 ,Byte1
MSB ----------------------------------------LSB

A universally administered address is uniquely assigned to a device by its manufacturer;
these are sometimes called "burned-in addresses" (BIA). The first three octets (in
transmission order) identify the organization that issued the identifier and are known as
the Organizationally Unique Identifier. The last three represent network interface
controller specification or NIC.
Our class MACAddress is used to validate MAC addresses as well as to provide helpful
processing in any application. The data member in our class is of Char pointer that holds
dotted decimal number for any given MAC Address.

class MACAddress{
char * Address;
bool Validate(const MACAddress& rhs);
MACAddress ();
MACAddress (const char * str);
MACAddress (const MACAddress & rhs);
MACAddress & operator=(const MACAddress & rhs);
// MAC to Decimal conversion
long MACtoDec()const;
MACAddress & DtoMAC (long decimalValue);
~ MACAddress ();
char* getNIC() const; // first 3 bytes
char* getOUI() const; // last 3 bytes
char* toString();// convert it to 01:23:45:67:89:ab

Input/ Output Requirements: The input file may contain an MAC address in colon or
hyphen decimal form. You class can create an object from this string. The output file can
produce the returning values of all functions.

Votes + Comments
Too many "z"s in title.
6 Years
Discussion Span
Last Post by Ancient Dragon
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.