int argc, addrs, width;
int argc, addrs, res, width;
radius_Process(struct radius *r, int got){  char *argv[MAXARGS], *nuke;  struct bundle *bundle;  int argc, addrs, width;  size_t len;  struct ncprange dest;  struct ncpaddr gw;  const void *data;  const char *stype;  u_int32_t ipaddr;  struct in_addr ip;  r->cx.fd = -1;		/* Stop select()ing */  stype = r->cx.auth ? "auth" : "acct";  switch (got) {    case RAD_ACCESS_ACCEPT:      log_Printf(LogPHASE, "Radius(%s): ACCEPT received\n", stype);      if (!r->cx.auth) {        rad_close(r->cx.rad);        return;      }      break;    case RAD_ACCESS_REJECT:      log_Printf(LogPHASE, "Radius(%s): REJECT received\n", stype);      if (r->cx.auth)        auth_Failure(r->cx.auth);      rad_close(r->cx.rad);      return;    case RAD_ACCESS_CHALLENGE:      /* we can't deal with this (for now) ! */      log_Printf(LogPHASE, "Radius: CHALLENGE received (can't handle yet)\n");      if (r->cx.auth)        auth_Failure(r->cx.auth);      rad_close(r->cx.rad);      return;    case RAD_ACCOUNTING_RESPONSE:      log_Printf(LogPHASE, "Radius(%s): Accounting response received\n", stype);      if (r->cx.auth)        auth_Failure(r->cx.auth);		/* unexpected !!! */      /* No further processing for accounting requests, please */      rad_close(r->cx.rad);      return;    case -1:      log_Printf(LogPHASE, "radius(%s): %s\n", stype, rad_strerror(r->cx.rad));      if (r->cx.auth)        auth_Failure(r->cx.auth);      rad_close(r->cx.rad);      return;    default:      log_Printf(LogERROR, "rad_send_request(%s): Failed %d: %s\n", stype,                 got, rad_strerror(r->cx.rad));      if (r->cx.auth)        auth_Failure(r->cx.auth);      rad_close(r->cx.rad);      return;  }  /* So we've been accepted !  Let's see what we've got in our reply :-I */  r->ip.s_addr = r->mask.s_addr = INADDR_NONE;  r->mtu = 0;  r->vj = 0;  while ((got = rad_get_attr(r->cx.rad, &data, &len)) > 0) {    switch (got) {      case RAD_FRAMED_IP_ADDRESS:        r->ip = rad_cvt_addr(data);        log_Printf(LogPHASE, "        IP %s\n", inet_ntoa(r->ip));        break;      case RAD_FRAMED_IP_NETMASK:        r->mask = rad_cvt_addr(data);        log_Printf(LogPHASE, "        Netmask %s\n", inet_ntoa(r->mask));        break;      case RAD_FRAMED_MTU:        r->mtu = rad_cvt_int(data);        log_Printf(LogPHASE, "        MTU %lu\n", r->mtu);        break;      case RAD_FRAMED_ROUTING:        /* Disabled for now - should we automatically set up some filters ? */        /* rad_cvt_int(data); */        /* bit 1 = Send routing packets */        /* bit 2 = Receive routing packets */        break;      case RAD_FRAMED_COMPRESSION:        r->vj = rad_cvt_int(data) == 1 ? 1 : 0;        log_Printf(LogPHASE, "        VJ %sabled\n", r->vj ? "en" : "dis");        break;      case RAD_FRAMED_ROUTE:        /*         * We expect a string of the format ``dest[/bits] gw [metrics]''         * Any specified metrics are ignored.  MYADDR and HISADDR are         * understood for ``dest'' and ``gw'' and ``0.0.0.0'' is the same         * as ``HISADDR''.         */        if ((nuke = rad_cvt_string(data, len)) == NULL) {          log_Printf(LogERROR, "rad_cvt_string: %s\n", rad_strerror(r->cx.rad));          rad_close(r->cx.rad);          return;        }        log_Printf(LogPHASE, "        Route: %s\n", nuke);        bundle = r->cx.auth->physical->dl->bundle;        ip.s_addr = INADDR_ANY;        ncprange_setip4host(&dest, ip);        argc = command_Interpret(nuke, strlen(nuke), argv);        if (argc < 0)          log_Printf(LogWARN, "radius: %s: Syntax error\n",                     argc == 1 ? argv[0] : "\"\"");        else if (argc < 2)          log_Printf(LogWARN, "radius: %s: Invalid route\n",                     argc == 1 ? argv[0] : "\"\"");        else if ((strcasecmp(argv[0], "default") != 0 &&                  !ncprange_aton(&dest, &bundle->ncp, argv[0])) ||                 !ncpaddr_aton(&gw, &bundle->ncp, argv[1]))          log_Printf(LogWARN, "radius: %s %s: Invalid route\n",                     argv[0], argv[1]);        else {          ncprange_getwidth(&dest, &width);          if (width == 32 && strchr(argv[0], '/') == NULL) {            /* No mask specified - use the natural mask */            ncprange_getip4addr(&dest, &ip);            ncprange_setip4mask(&dest, addr2mask(ip));          }          addrs = 0;          if (!strncasecmp(argv[0], "HISADDR", 7))            addrs = ROUTE_DSTHISADDR;          else if (!strncasecmp(argv[0], "MYADDR", 6))            addrs = ROUTE_DSTMYADDR;          if (ncpaddr_getip4addr(&gw, &ipaddr) && ipaddr == INADDR_ANY) {            addrs |= ROUTE_GWHISADDR;            ncpaddr_setip4(&gw, bundle->ncp.ipcp.peer_ip);          } else if (strcasecmp(argv[1], "HISADDR") == 0)            addrs |= ROUTE_GWHISADDR;          route_Add(&r->routes, addrs, &dest, &gw);        }        free(nuke);        break;    }  }  if (got == -1) {    log_Printf(LogERROR, "rad_get_attr: %s (failing!)\n",               rad_strerror(r->cx.rad));    auth_Failure(r->cx.auth);    rad_close(r->cx.rad);  } else {    r->valid = 1;    auth_Success(r->cx.auth);    rad_close(r->cx.rad);  }}