]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/netapi.git/blobdiff - ti/runtime/netapi/applications/ipsec_offload/ipsecmgr/src/netapilib_interface.c
SDOCM00102718: Offload support for AEX_XCBC
[keystone-rtos/netapi.git] / ti / runtime / netapi / applications / ipsec_offload / ipsecmgr / src / netapilib_interface.c
index 5191500a58acf3b09c73fa58d1ae6ef4af750b49..bf1b8d6715fa9af2094f1e9f54bedc94f92b6dcf 100755 (executable)
@@ -198,16 +198,11 @@ int netapilib_ifAddSA
                               &saInfo.dst.ipv4[0],
                               saInfo.ipType))
             {
-                printf("netapiplib_ifAddSA: match found, interface: %s\n",
-                    ipConfigList[i].name);
-                
                 pTok = strtok(ipConfigList[i].name, ":.");
                 /* now we have the interface name, is this eth0 or eth1 */
                 if (pTok)
-                printf("netapiplib_ifAddSA: match found,after strtok interface: %s\n",
-                    pTok);
                 /* now we have eth0 or eth1, now find the i/f number */
-                sscanf(pTok,"eth%d", &iface);
+                    sscanf(pTok,"eth%d", &iface);
                 
                 globalDB.rx_sa[slot].iface = iface;
                 flow.dma_engine= 1;
@@ -269,6 +264,8 @@ int netapilib_ifAddSA
         saInfo.authMode = NWAL_SA_AALG_HMAC_SHA1;
     else if (sa_info->auth.algo == SA_AALG_HMAC_MD5)
         saInfo.authMode = NWAL_SA_AALG_HMAC_MD5;
+    else if (sa_info->auth.algo == SA_AALG_AES_XCBC)
+        saInfo.authMode = NWAL_SA_AALG_AES_XCBC;
     else if (sa_info->auth.algo == SA_AALG_NONE || sa_info->auth.algo == SA_AALG_NULL)  
         saInfo.authMode = NWAL_SA_AALG_NULL;
     else
@@ -353,12 +350,6 @@ int netapilib_ifAddSA
         if (error == NETAPI_ERR_OK)
         {
             *sa_handle = globalDB.tx_sa[slot].saAppId;
-#if 0
-             netapi_secGetChanCtxInfo(netapi_handle,
-                          saAppIdOut,
-                          NULL,
-                          &pSaHandle);
-#endif
         }
         else
         {
@@ -543,14 +534,6 @@ int32_t netapilib_ifAddSP
         ipsecmgr_syslog_msg (SYSLOG_LEVEL_INFO,
     "netapilib_ifAddSA: Translation of SP successful, app_id: 0x%x\n", *sp_handle);
 
-#if 0
-    netapi_secGetChanCtxInfo(netapi_handle,
-                          (NETCP_CFG_SA_T)sa_handle,
-                          globalDB.rx_sa[slot].spAppId,
-                          &pPaHandleOuterIP,
-                          &pPaHandleInnerIP,
-                          &pSaHandle);
-#endif
 #endif
     return 0;
 }