[Serdev] tcp_send_recv in auth_diameter module

Bogdan-Andrei IANCU iancu at fokus.fraunhofer.de
Sat Aug 28 18:25:58 UTC 2004


Hi Chen,

AVP_SIP_MSGID is added by the module when a DIAMETER request is sent out 
  (any kind of request) - please see modules/auth_diameter/authorize.c ~ 
line 485.
My guess (I'm not 199% sure is that the DIAMETER server must mirror this 
  avp in all the sequential replies.

there is a clinet&server implementation for DISC (DIameter Server 
Client) for doing SIP acc and auth with SER. It's not yet on cvs, but it 
will be soon.

bogdan


Chen Youcheng wrote:
> 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
> 
> _______________________________________________
> Serdev mailing list
> serdev at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serdev




More information about the Serdev mailing list