More functions that have no business being public
authoraland <aland>
Sat, 8 Dec 2007 11:35:16 +0000 (11:35 +0000)
committeraland <aland>
Sat, 8 Dec 2007 11:35:16 +0000 (11:35 +0000)
src/modules/rlm_eap/libeap/eap_sim.h
src/modules/rlm_eap/libeap/eapsimlib.c
src/modules/rlm_eap/radeapclient.c

index 3f577af..ee51dcb 100644 (file)
@@ -103,9 +103,7 @@ enum eapsim_serverstates {
 /*
  * interfaces in eapsimlib.c
  */
-extern int map_eapsim_types(RADIUS_PACKET *r);
 extern int map_eapsim_basictypes(RADIUS_PACKET *r, EAP_PACKET *ep);
-extern int unmap_eapsim_types(RADIUS_PACKET *r);
 extern const char *sim_state2name(enum eapsim_clientstates state, char *buf, int buflen);
 extern const char *sim_subtype2name(enum eapsim_subtype subtype, char *buf, int buflen);
 extern int unmap_eapsim_basictypes(RADIUS_PACKET *r,
index fe715d8..2a35066 100644 (file)
@@ -307,21 +307,6 @@ int map_eapsim_basictypes(RADIUS_PACKET *r, EAP_PACKET *ep)
        return 1;
 }
 
-int map_eapsim_types(RADIUS_PACKET *r)
-{
-       EAP_PACKET ep;
-       int ret;
-
-       memset(&ep, 0, sizeof(ep));
-       ret = map_eapsim_basictypes(r, &ep);
-       if(ret != 1) {
-               return ret;
-       }
-       eap_basic_compose(r, &ep);
-
-       return 1;
-}
-
 /*
  * given a radius request with an EAP-SIM body, decode it into TLV pairs
  *
@@ -395,19 +380,6 @@ int unmap_eapsim_basictypes(RADIUS_PACKET *r,
        return 1;
 }
 
-int unmap_eapsim_types(RADIUS_PACKET *r)
-{
-       VALUE_PAIR             *esvp;
-
-       esvp = pairfind(r->vps, ATTRIBUTE_EAP_BASE+PW_EAP_SIM);
-       if (esvp == NULL) {
-               radlog(L_ERR, "eap: EAP-Sim attribute not found");
-               return 0;
-       }
-
-       return unmap_eapsim_basictypes(r, esvp->vp_octets, esvp->length);
-}
-
 /*
  * calculate the MAC for the EAP message, given the key.
  * The "extra" will be appended to the EAP message and included in the
index 03d3a02..09549d6 100644 (file)
@@ -65,6 +65,8 @@ struct eapsim_keys eapsim_mk;
 
 static void map_eap_types(RADIUS_PACKET *req);
 static void unmap_eap_types(RADIUS_PACKET *rep);
+static int map_eapsim_types(RADIUS_PACKET *r);
+static int unmap_eapsim_types(RADIUS_PACKET *r);
 
 static void NEVER_RETURNS usage(void)
 {
@@ -1287,6 +1289,34 @@ static void unmap_eap_types(RADIUS_PACKET *rep)
        return;
 }
 
+static int map_eapsim_types(RADIUS_PACKET *r)
+{
+       EAP_PACKET ep;
+       int ret;
+
+       memset(&ep, 0, sizeof(ep));
+       ret = map_eapsim_basictypes(r, &ep);
+       if(ret != 1) {
+               return ret;
+       }
+       eap_basic_compose(r, &ep);
+
+       return 1;
+}
+
+static int unmap_eapsim_types(RADIUS_PACKET *r)
+{
+       VALUE_PAIR             *esvp;
+
+       esvp = pairfind(r->vps, ATTRIBUTE_EAP_BASE+PW_EAP_SIM);
+       if (esvp == NULL) {
+               radlog(L_ERR, "eap: EAP-Sim attribute not found");
+               return 0;
+       }
+
+       return unmap_eapsim_basictypes(r, esvp->vp_octets, esvp->length);
+}
+
 #ifdef TEST_CASE
 
 #include <assert.h>
@@ -1403,3 +1433,4 @@ main(int argc, char *argv[])
        }
 }
 #endif
+