Next: , Previous: bpipe_dpktf_newP, Up: Internal Functions


A.5.11 bpipe_dpktf_size_cmp

Compare two data packet fields based upon the size of their data types.

Synopsis

     #include <bpipe/bpipe.h>
     
     
     
int bpipe_dpktf_size_cmp( const void *dpktf1, const void *dpktf2 );

Parameters

const void *dpktf1
pointer to first data packet field
const void *dpktf2
pointer to second data packet field

Description

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

Returns ‘-1’, ‘0’, ‘1’ if the second is less than, equal to, or greater than the first, respectively.