lib/libdmsg/msg_lnk.c
static
uint32_t
dmsg_rnss(void)
{
	if (DMsgRNSS == 0) {
		pthread_mutex_lock(&cluster_mtx);
		while (DMsgRNSS == 0) {
			srandomdev();
			DMsgRNSS = random();
		}
		pthread_mutex_unlock(&cluster_mtx);
	}
	return(DMsgRNSS);
}
/*
 * Random number sub-sort value to add to SPAN rnss fields on relay.
 * This allows us to differentiate spans with the same <dist> field
 * for relaying purposes.  We must normally limit the number of relays
 * for any given SPAN origination but we must also guarantee that a
 * symmetric reverse path exists, so we use the rnss field as a sub-sort
 * (since there can be thousands or millions if we only match on <dist>),
 * and if there STILL too many spans we go past the limit.
 */
Random number sub-sort value to add to SPAN rnss fields on relay.
This allows us to differentiate spans with the same  field
for relaying purposes.  We must normally limit the number of relays
for any given SPAN origination but we must also guarantee that a
symmetric reverse path exists, so we use the rnss field as a sub-sort
(since there can be thousands or millions if we only match on ),
and if there STILL too many spans we go past the limit.
Random number sub - sort value to add to SPAN rnss fields on relay . This allows us to differentiate spans with the same field for relaying purposes . We must normally limit the number of relays for any given SPAN origination but we must also guarantee that a symmetric reverse path exists so we use the rnss field as a sub - sort ( since there can be thousands or millions if we only match on ) and if there STILL too many spans we go past the limit .
static
uint32_t
dmsg_rnss(void)
{
	if (DMsgRNSS == 0) {
		pthread_mutex_lock(&cluster_mtx);
		while (DMsgRNSS == 0) {
			srandomdev();
			DMsgRNSS = random();
		}
		pthread_mutex_unlock(&cluster_mtx);
	}
	return(DMsgRNSS);
}
static uint32_t dmsg_rnss ( void ) { if ( DMsgRNSS == 0 ) { pthread_mutex_lock ( & cluster_mtx ) ; while ( DMsgRNSS == 0 ) { srandomdev ( ) ; DMsgRNSS = random ( ) ; } pthread_mutex_unlock ( & cluster_mtx ) ; } return ( DMsgRNSS ) ; }
Random number sub-sort value to add to SPAN rnss fields on relay.
Random number sub - sort value to add to SPAN rnss fields on relay .