slankdev / libpgen

Header only packet analysis library written in C++11
Other
40 stars 5 forks source link

Add check-script for PGEN-Core, PGEN-IO #21

Open slankdev opened 9 years ago

slankdev commented 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); }