[Serdev] tcp_send_recv in auth_diameter module

Chen Youcheng dayong1973 at yahoo.com
Fri Aug 27 16:16:48 UTC 2004


hello,

i have a question to following code.
Please see the function "tcp_send_recv" (in ser/modules/auth_diameter/tcp_comm.c).

question:
It looks tha AVP_SIP_MSGID is needed to filter old message.But i am implementing a Diameter
application, which is specified as Cx in 3GPP TS 29.229. I can not expect from Diameter
Answer a AVP_SIP_MSGID. How can i this "filter" function realize? 

Regards

Yongcheng   


/* obtain the structure corresponding to the message */
		msg = AAATranslateMessage(rb->buf, rb->buf_len, 0);	
		if(!msg)
		{
			LOG(L_ERR, M_NAME": message structure not obtained\n");	
			return AAA_ERROR;
		}
		avp = AAAFindMatchingAVP(msg, NULL, AVP_SIP_MSGID,
								vendorID, AAA_FORWARD_SEARCH);
		if(!avp)
		{
			LOG(L_ERR, M_NAME": AVP_SIP_MSGID not found\n");
			return AAA_ERROR;
		}
		m_id = *((unsigned int*)(avp->data.s));
		DBG("######## m_id=%d\n", m_id);
		if(m_id!=waited_id)
		{
			number_of_tries ++;
			LOG(L_NOTICE, M_NAME": old message received\n");
			continue;
		}
		goto next;





		
_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush




More information about the Serdev mailing list