Next: bpipe_hdr_cleanup, Previous: bpipe_dpktf_newP, Up: Internal Functions
Compare two data packet fields based upon the size of their data types.
#include <bpipe/bpipe.h>int bpipe_dpktf_size_cmp( const void *dpktf1, const void *dpktf2 );
const void *dpktf1
- pointer to first data packet field
const void *dpktf2
- pointer to second data packet field
This routine compares two data packet fields based upon the size of their data types. In the case of ties, it uses the fields' index to break them (in ascending order). The size comparison is in reverse order. It assumes that the types are legitimate.
Returns ‘-1’, ‘0’, ‘1’ if the second is less than, equal to, or greater than the first, respectively.