libpgen
libpgen copied to clipboard
Get statistics data from PGEN-descriptor
We want a function that gets statistical-data from PGEN-descriptor.
Implementation example)
pgen_t* handle = pgen_open_offline("in.pcapng", PCAPNG_READ);
if(handle == NULL){
pgen_perror("oopes");
return -1;
}
struct pgen_statistics ps;
u_char buf[1000];
int buflen;
while(1){
buflen = pgen_recvpacket_handle(handle, buf, buflen);
if(buflen < 0){
pgen_perror("oops");
break;
}else if(buflen == 0){
break;
}
}
pgen_getstatistic(handle, &ps);
pgen_close(handle);
I'm going to implement new function that gets statistical data. However, I didn't decide function specification. 1st, I have to decide one.