Accessing REQUEST structure data outside FreeRADIUS module

Nicolas Castel nicolas.castel at
Wed Apr 12 14:17:06 CEST 2006

2006/4/12, Joe Maimon <jmaimon at>:
> Nicolas Castel wrote:
> > Hello and thanks for replies
> >
> > I'm using FreeRADIUS v1.1.0. I'm developping  some modules and I try to
> > access auth_req structure (REQUEST) data from an  external function (out of
> > my module) and it fails. All works fine when  accessing this data from the
> > module itself but when i call an external  function with the address of
> > REQUEST, it doesn't work.
> >
> > and  in anotherfile, lib_com.c
> What happens when your "external" function is in the same file as your
> module function?
> -
> List info/subscribe/unsubscribe? See

Thanks for responding,

When i put the function in the module all works fine too.

I tried to access directly the packet field of the REQUEST structure
in the function in my library and it works in this case.

int lib_com_filter_traffic_bis(RADIUS_PACKET *pt_packet) {

  VALUE_PAIR *lpt_value_pair = NULL;

  if ((lpt_value_pair = pairfind(pt_packet->vps, PW_USER_NAME)) == NULL ) {
    WCP_DEBUG("User-Name not found !");
  } else {
    WCP_DEBUG("RADIUS attribute name %s, value: [%s]",

So, with the RADIUS_PACKET passed in parameter, it works fine, so why
does it not work with the REQUEST parameter ? Have you any idea ? Is
REQUEST address protected or else ??? I think about static function


More information about the Freeradius-Users mailing list