]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Start removing the old one char expansions
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 20 Sep 2012 13:25:47 +0000 (14:25 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 20 Sep 2012 13:25:47 +0000 (14:25 +0100)
doc/variables.rst
src/main/xlat.c

index e128899e3b4e23456c2bc94c5a5be0a287369b5e..c79593183351625d15c3d59be81b6a0169952404 100644 (file)
@@ -76,10 +76,10 @@ file for a complete list of variables.
 One-character variables
 -----------------------
 
-The following one-character variables are also defined.  However, they
-are duplicates of the previous general cases, and are only provided
-for backwards compatibility.  They WILL BE removed in a future
-release.  They also do NOT permit the use of conditional syntax
+The following one-character variables were defined.  They were duplicates of the
+previous general cases, and were only provided for backwards compatibility.
+They are in the process of being removed, this table documents the old variables
+and their new equivalents.
 (i.e. ``:-``, as described above.
 
 +-----------+---------------------------+-----------------------+
index 1df05dd1f104483cbf8de6514efa3b47815df3d8..47e12a14f0b3964901f1c57e029756aff10a3ab5 100644 (file)
@@ -1256,14 +1256,6 @@ int radius_xlat(char *out, int outlen, const char *fmt,
                        case '%':
                                *q++ = *p++;
                                break;
-                       case 'a': /* Protocol: */
-                               q += valuepair2str(q,freespace,pairfind(request->reply->vps,PW_FRAMED_PROTOCOL, 0),PW_TYPE_INTEGER, func);
-                               p++;
-                               break;
-                       case 'c': /* Callback-Number */
-                               q += valuepair2str(q,freespace,pairfind(request->reply->vps,PW_CALLBACK_NUMBER, 0),PW_TYPE_STRING, func);
-                               p++;
-                               break;
                        case 'd': /* request day */
                                TM = localtime_r(&request->timestamp, &s_TM);
                                len = strftime(tmpdt, sizeof(tmpdt), "%d", TM);
@@ -1273,14 +1265,6 @@ int radius_xlat(char *out, int outlen, const char *fmt,
                                }
                                p++;
                                break;
-                       case 'f': /* Framed IP address */
-                               q += valuepair2str(q,freespace,pairfind(request->reply->vps,PW_FRAMED_IP_ADDRESS, 0),PW_TYPE_IPADDR, func);
-                               p++;
-                               break;
-                       case 'i': /* Calling station ID */
-                               q += valuepair2str(q,freespace,pairfind(request->packet->vps,PW_CALLING_STATION_ID, 0),PW_TYPE_STRING, func);
-                               p++;
-                               break;
                        case 'l': /* request timestamp */
                                snprintf(tmpdt, sizeof(tmpdt), "%lu",
                                         (unsigned long) request->timestamp);
@@ -1297,18 +1281,6 @@ int radius_xlat(char *out, int outlen, const char *fmt,
                                }
                                p++;
                                break;
-                       case 'n': /* NAS IP address */
-                               q += valuepair2str(q,freespace,pairfind(request->packet->vps,PW_NAS_IP_ADDRESS, 0),PW_TYPE_IPADDR, func);
-                               p++;
-                               break;
-                       case 'p': /* Port number */
-                               q += valuepair2str(q,freespace,pairfind(request->packet->vps,PW_NAS_PORT, 0),PW_TYPE_INTEGER, func);
-                               p++;
-                               break;
-                       case 's': /* Speed */
-                               q += valuepair2str(q,freespace,pairfind(request->packet->vps,PW_CONNECT_INFO, 0),PW_TYPE_STRING, func);
-                               p++;
-                               break;
                        case 't': /* request timestamp */
                                CTIME_R(&request->timestamp, tmpdt, sizeof(tmpdt));
                                nl = strchr(tmpdt, '\n');
@@ -1317,15 +1289,6 @@ int radius_xlat(char *out, int outlen, const char *fmt,
                                q += strlen(q);
                                p++;
                                break;
-                       case 'u': /* User name */
-                               q += valuepair2str(q,freespace,pairfind(request->packet->vps,PW_USER_NAME, 0),PW_TYPE_STRING, func);
-                               p++;
-                               break;
-                       case 'A': /* radacct_dir */
-                               strlcpy(q,radacct_dir,freespace);
-                               q += strlen(q);
-                               p++;
-                               break;
                        case 'C': /* ClientName */
                                strlcpy(q,request->client->shortname,freespace);
                                q += strlen(q);
@@ -1364,20 +1327,6 @@ int radius_xlat(char *out, int outlen, const char *fmt,
                                q += strlen(q);
                                p++;
                                break;
-                       case 'L': /* radlog_dir */
-                               strlcpy(q,radlog_dir,freespace);
-                               q += strlen(q);
-                               p++;
-                               break;
-                       case 'M': /* MTU */
-                               q += valuepair2str(q,freespace,pairfind(request->reply->vps,PW_FRAMED_MTU, 0),PW_TYPE_INTEGER, func);
-                               p++;
-                               break;
-                       case 'R': /* radius_dir */
-                               strlcpy(q,radius_dir,freespace);
-                               q += strlen(q);
-                               p++;
-                               break;
                        case 'S': /* request timestamp in SQL format*/
                                TM = localtime_r(&request->timestamp, &s_TM);
                                len = strftime(tmpdt, sizeof(tmpdt), "%Y-%m-%d %H:%M:%S", TM);
@@ -1396,10 +1345,6 @@ int radius_xlat(char *out, int outlen, const char *fmt,
                                }
                                p++;
                                break;
-                       case 'U': /* Stripped User name */
-                               q += valuepair2str(q,freespace,pairfind(request->packet->vps,PW_STRIPPED_USER_NAME, 0),PW_TYPE_STRING, func);
-                               p++;
-                               break;
                        case 'V': /* Request-Authenticator */
                                strlcpy(q,"Verified",freespace);
                                q += strlen(q);