I am modifying CPP Arduino library. purpose is to add hostname in user code.
Here is Arduino ethernet library: Arduino Ethernet Library
I am using ethernet.h in my source code.
in ethernet.h there is include statement.
#include "dhcp.h"
and in dhcp.h macro is there.
#define HOST_NAME "MYBOARD"
in dhcp.cpp this macro used
#include "dhcp.h"
buffer[17] = strlen(HOST_NAME) ; // length of hostname + last 3 bytes of mac address
strcpy((char*)&(buffer[18]), HOST_NAME);
can this macro replaced with variable, such that I can assign value for HOST_NAME is my source code?
example. in my source code
variable_name ="MYBOARD1"
should pass value to HOST_NAME in dhcp.cpp
I dont know much about c++ , need help with example code.
Thank You
Sudhir