トリッキーってのとはちょっと違うけど、
int is_sip_message( const char* buf ) {
return *(uint64_t*)buf == *(uint64_t*)"SIP/2.0 ";
}
これってアリ?普通?常套手段?