src/Cedar/Listener.c
// Comparison function of UDP entry list

Comparison function of UDP entry list
Comparison function of UDP entry list
int CompareUDPEntry(void *p1, void *p2)
{
	UDP_ENTRY *e1, *e2;
	if (p1 == NULL || p2 == NULL)
	{
		return 0;
	}
	e1 = *(UDP_ENTRY **)p1;
	e2 = *(UDP_ENTRY **)p2;
	if (e1 == NULL || e2 == NULL)
	{
		return 0;
	}
	if (e1->SessionKey32 > e2->SessionKey32)
	{
		return 1;
	}
	else if (e1->SessionKey32 == e2->SessionKey32)
	{
		return 0;
	}
	else
	{
		return -1;
	}
}
int CompareUDPEntry ( void * p1 , void * p2 ) { UDP_ENTRY * e1 , * e2 ; if ( p1 == NULL || p2 == NULL ) { return 0 ; } e1 = * ( UDP_ENTRY * * ) p1 ; e2 = * ( UDP_ENTRY * * ) p2 ; if ( e1 == NULL || e2 == NULL ) { return 0 ; } if ( e1 -> SessionKey32 > e2 -> SessionKey32 ) { return 1 ; } else if ( e1 -> SessionKey32 == e2 -> SessionKey32 ) { return 0 ; } else { return -1 ; } }
Comparison function of UDP entry list
Comparison function of UDP entry list