Subject: Re: [diameter] RE: [AAA-WG]: Re: questions and comments regarding the Diameter A PI draft

From: Pat Calhoun <[email-masked]>
Date: Wed, 2 May 2001 13:23:19 -0700

On Wed, May 02, 2001 at 04:02:48PM -0400, Yiwen Jiang wrote:
> > > > That is assumed to be handled internally. -- In other words, 
> > > > when you do
> > > > an AAARespondToMessage(), it massages the current message 
> > > > from incoming
> > > > to outgoing, and allows you to modify fields.
> > > Okay, but how does one modify the fields, since upon return of this
> > > function, the message is already sent? For example, what 
> > happens if the
> > > server decides to add more AVPs onto the response message? The
> > > AAAResponseMessage() does not provide a mean for the server 
> > to add or delete
> > > AVPs from itself before sending the modified message. I 
> > thought the response
> > > message is created by AAANewMessage, with the request 
> > message as the last
> > > parameter?  If the AAAResponseToMessage() is to be kept 
> > this way, can we
> > > have some detailed description of what it does in the ID then?
> > > 
> > 
> > Ahhh, now I see your confusion.  AAARespondToMessage does NOT send the
> > message, but sets all the flags to mart it as a response, and 
> > sets the 
> > internal destination/etc so that it will be routed back to the sender.
> > 
> > So, you would call AAARespondToMessage(), manipulate the 
> > AVPs, then do an
> > AAASendMessage() to send the message.  
> > 
> > Clearer?
> Definitely.. :) 
> 
> Now, my question is, wouldn't this be the same functionality as
> AAANewMessage with the request message (last parameter in its signature)
> provided at the time of call?

Sure but they have different functinality. AAANewMessage will allocate a 
new AAAMessage, while AAARespondToMessage will prep a received AAAMessage
to be used as a response message.

If AAAMessage is to be used instead, you would have to allocate a new 
AAAMessage, copy all of the AVPs over, and delete the request AAAMessage.

Hope this helps,

PatC

---

From: David Frascone <[email-masked]>
Date: Wed, 2 May 2001 15:45:25 -0500

> AAAMessage, copy all of the AVPs over, and delete the request AAAMessage.

And set all the flags, which is not currently possible with the API, since
AAARespondToMessage is there.

---

From: Yiwen Jiang <[email-masked]>
Date: Wed, 2 May 2001 16:02:48 -0400

Definitely.. :) 

Thanks!