Constructing imcoming message.
Iandc.Davies at Marconi.com
Wed Aug 24 15:05:02 CEST 2005
I'm trying to construct a simple program that will allow me to take some
information from another source (possibly a pointer to a structure passed
and populate the RADIUS_PACKET template. A separate process will then be
used to send this message over UDP to the radius server.
The information I'm trying to parse is as follows (these are test values
Identifier=1 (can increase due to how many requests)
Length=total length of message
Authenticator=32 octets (random to send to RADIUS but md5 hashed on reply)
NAS-IP-Address=eg. d5 89 45 26 (22.214.171.124)
Digest-Attributes= Realm(1) = "deltathree"
Nonce(2) = "3bada1a0"
Method(3) = "INVITE"
= "sip:96226491335 at 126.96.36.199" PW_DIGEST_URI
Algorithm(5) = "md5"
User-Name(10) = "12345678"
On the right for the Code/Id/length/Authenticator are straight forward, as
they have their own types.
For the attributes, I'm getting a bit stuck as these are VSA AVP's.
I think I've managed to id the functions that I need ( paircreate() and
pairadd() ) but unsure how they are used.
I've stated what I think each AVP is represented by (as these are #define
but the VALUE_PAIR structure has name, attribute and type information
relating to them.
Is the name just a straight car string ? (left hand side of equals above)
Any help gratefully received.
Software Development Engineer
More information about the Freeradius-Users