I want to build simple DHCP packet and one of the protocol oprion is client mac address (option 61), so i have my mac address:
string macAddress = "00:14:22:18:81:11";
and i want to put it in my packet array (6 bytes), this is what i have try and i wonder how to do that (i try to convert my string into byte[] but this array length is 24)
// Set requested ip address - 61
index += DHCPMessageTypeLength;
packetArrayBytes[index] = 61; // option
packetArrayBytes[index + 1] = 7; // length
packetArrayBytes[index + 2] = 1; // hardware type Ethernet
packetArrayBytes[index + 3] = ?; // mac
packetArrayBytes[index + 4] = ?; // mac
packetArrayBytes[index + 5] = ?; // mac
packetArrayBytes[index + 6] = ?; // mac
packetArrayBytes[index + 7] = ?; // mac
packetArrayBytes[index + 8] = ?; // mac