Open slankdev opened 9 years ago
u_char buf[1000]; int buflen; /* recv packet */
pgen_packet* pack = &arp; pack->cast(buf, buflen);
if(buflen != pack->len()){ printf("length error \n"); }else{ int res = memcmp(buf, pack->data()); printf("result: %d \n", res); }
u_char buf[1000]; int buflen; /* recv packet */
pgen_packet* pack = &arp; pack->cast(buf, buflen);
if(buflen != pack->len()){ printf("length error \n"); }else{ int res = memcmp(buf, pack->data()); printf("result: %d \n", res); }