Kdrefactor

I think part of `? 0 : 1` could be omitted. More, i think should be extract as variable just before snprintf. 
Also should be moved to `ethernet.cpp`