#include "config.h" #include #include #include #ifdef OS_LINUX #include #endif #ifdef ARDUINO #include #include #endif #include "rpt.h" #include "dns_sd.h" #include "dns_sd_print.h" #include "dns_sd_const.h" int _print_name( printCallback_t printCbFunc, const unsigned char* s, const unsigned char* buf ) { int n = 0; // track allocated length of the name in this record bool incrFl = true; // do not incrmement 'n' if the name switches to a ptr segment while( *s ) { if( (*s & 0xc0) == 0xc0 ) { if( incrFl ) n += 2; incrFl = false; s = buf + s[1]; } else { for(char i=0; i 0x%2x",ntohs(u[0])); break; } if( ntohs(u[1]) & 0x80 ) rpt(printCbFunc,"flush "); rpt(printCbFunc,"\n"); }