summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (from parent 1: a8f5026)
raw | patch | inline | side by side (from parent 1: a8f5026)
author | Tinku Mannan <tmannan@ti.com> | |
Mon, 22 Jul 2013 21:55:42 +0000 (17:55 -0400) | ||
committer | Tinku Mannan <tmannan@ti.com> | |
Mon, 22 Jul 2013 22:15:36 +0000 (18:15 -0400) |
1. Changing API name from netapi_secGetChanHandles to netapi_secGetChanCtxInfo.
2. Enabling netapi ipsecmgr to run in daemon mode.
3. Update version to 1.0.0.8
2. Enabling netapi ipsecmgr to run in daemon mode.
3. Update version to 1.0.0.8
diff --git a/ti/runtime/netapi/applications/ipsec_offload/ipsecmgr/src/netapi_ipsecmgr.c b/ti/runtime/netapi/applications/ipsec_offload/ipsecmgr/src/netapi_ipsecmgr.c
index c6995d53da2bd44fb8e4ae5a20858bd3d4319e10..6d6a3ae09e06e66c09e21ee786aeadd48043edb8 100755 (executable)
printf("main: calling daemonize\n");
/* Create the proxy daemon. */
- //daemonize (LOCK_FILE);
+ daemonize (LOCK_FILE);
if (getifaddrs(&ifaddr) == -1)
{
diff --git a/ti/runtime/netapi/applications/ipsec_offload/ipsecmgr/src/netapilib_interface.c b/ti/runtime/netapi/applications/ipsec_offload/ipsecmgr/src/netapilib_interface.c
index c2ffbcedd181191eb66eb54623cc93fe1e0062a3..5191500a58acf3b09c73fa58d1ae6ef4af750b49 100755 (executable)
{
*sa_handle = globalDB.tx_sa[slot].saAppId;
#if 0
- netapi_secGetChanHandles(netapi_handle,
+ netapi_secGetChanCtxInfo(netapi_handle,
saAppIdOut,
NULL,
&pSaHandle);
"netapilib_ifAddSA: Translation of SP successful, app_id: 0x%x\n", *sp_handle);
#if 0
- netapi_secGetChanHandles(netapi_handle,
+ netapi_secGetChanCtxInfo(netapi_handle,
(NETCP_CFG_SA_T)sa_handle,
globalDB.rx_sa[slot].spAppId,
&pPaHandleOuterIP,
index 0c7557c344bdeacad36d35c28224d060d1cf753d..1b1de57ca2b24bb234b4d32f0b88a4857cce64fa 100755 (executable)
/**
* @ingroup cfg_security_functions
- * @brief netapi_secGetChanHandles API to get PA handle for security context
+ * @brief netapi_secGetChanCtxInfo API to retrieve SA and PA channel handles for security
+ * context if already configured
*
- * @details API to get PA handle for security context
+ * @details API to retrieve SA and PA channel handles for security
+ * context if already configured
* @param[in] h The NETAPI handle, @ref NETAPI_T
* @param[in] sa_app_id Application id returned from call to @ref netapi_secAddSA
* @param[in] policy_app_id Application id returned from call to @ref netapi_secAddPolicy
* @retval none
* @pre @ref netapi_init, @ref netapi_secAddSA
*/
-void netapi_secGetChanHandles(NETAPI_T h,
+void netapi_secGetChanCtxInfo(NETAPI_T h,
NETCP_CFG_SA_T sa_app_id,
NETCP_CFG_IPSEC_POLICY_T policy_app_id,
NETCP_CFG_PA_HANDLE_T* pPaHandleOuterIP,
index 023edbbfcb51efcf2ffc2024c584a9b01a15a4a3..cf27bd6bbea56f552e65b67ac19273161062f49b 100755 (executable)
* format:
* 0xAABBCCDD -> Arch (AA); API Changes (BB); Major (CC); Minor (DD)
*/
-#define NETAPI_VERSION_ID (0x01000007)
+#define NETAPI_VERSION_ID (0x01000008)
/**
* @def NETAPI_VERSION_STR
* This is the version string which describes the NETAPI along with the
* date and build information.
*/
-#define NETAPI_VERSION_STR "NETAPI Revision: 01.00.00.07"
+#define NETAPI_VERSION_STR "NETAPI Revision: 01.00.00.08"
/**
* @ingroup netapi_gen_functions
index 8840ac348c1e8f48f24efe3cdd903acf4b7864dc..48ccd95ccb79e7f32dd312367989aa806784345f 100755 (executable)
bases[nwal_BUF_INDEX_SA_CONTEXT] = (uint32_t *)Osal_nwalLocToGlobAddr((uint32_t)netapi_VM_SaContextVaddr);
/* also save this here for easy access to sa_start */
- nwalGlobCfg.instPoolSaBaseAddr = bases[nwal_BUF_INDEX_SA_CONTEXT];
+ nwalGlobCfg.scPoolBaseAddr = bases[nwal_BUF_INDEX_SA_CONTEXT];
count++;
bases[nwal_BUF_INDEX_SA_LLD_CHAN_HANDLE] =
index 437de2ab82536bc779080ce55598e9d5d57ca785..f80b94e006be501e599e042a809b983c55e57dbb 100755 (executable)
/**********************************************************************************
- * FUNCTION PURPOSE: API to retrieve SA and PA channel handles for security context if already configured
+ * FUNCTION PURPOSE: API to retrieve SA and PA channel handles for security context
+ * if already configured
**********************************************************************************
- * DESCRIPTION: API to retrieve SA and PA channel handles for security context if already configured
+ * DESCRIPTION: API to retrieve SA and PA channel handles for security context if already
+ * configured
*********************************************************************************/
-void netapi_secGetChanHandles(NETAPI_T h,
+void netapi_secGetChanCtxInfo(NETAPI_T h,
NETCP_CFG_SA_T sa_app_id,
NETCP_CFG_IPSEC_POLICY_T policy_app_id,
NETCP_CFG_PA_HANDLE_T* pPaHandleOuterIP,
void * handle_inflow;
void * handle_sideband = NULL;
void * handle_policy=NULL;
+ nwalChanCxtInfo_t info;
+
+ memset(&info, 0, sizeof(nwalChanCxtInfo_t));
int tunnelId = netapi_cfgGetMatchId(sa_app_id);
int policyId = netapi_cfgGetMatchId(policy_app_id);
if(handle_inflow)
{
handle_policy = netapip_netcpCfgGetPolicy(&netapi_get_global()->nwal_context,policyId);
+ nwal_getChanCxtInfo(&netapi_get_global()->nwal_context,
+ handle_policy,
+ &info);
+
+ if (pPaHandleInnerIP)
+ *pPaHandleInnerIP = info.paInnerIpHandle;
+
+ nwal_getChanCxtInfo(&netapi_get_global()->nwal_context,
+ handle_policy,
+ &info);
+
+ if (pPaHandleInnerIP)
+ *pPaHandleInnerIP = info.paInnerIpHandle;
+
+ nwal_getChanCxtInfo(&netapi_get_global()->nwal_context,
+ handle_inflow,
+ &info);
- nwal_secGetChanHandles(((NETAPI_GLOBAL_T*) (n->global))->nwal_context.nwalInstHandle,
- handle_inflow,
- handle_policy,
- pPaHandleOuterIP,
- pPaHandleInnerIP,
- pSaHandle);
if (pPaHandleOuterIP)
- printf("netapi_secGetChanHandles: *pa_handle outer IP: 0x%x\n",
+ *pPaHandleOuterIP = info.paOuterIpHandle;
+
+ if(pSaHandle)
+ *pSaHandle = info.saChanHandle;
+
+ if (pPaHandleOuterIP)
+ netapi_Log("netapi_secGetChanCtxInfo: *pa_handle outer IP: 0x%x\n",
(paHandleL2L3_t)*pPaHandleOuterIP);
if (pPaHandleInnerIP)
- printf("netapi_secGetChanHandles: *pa_handle inner IP: 0x%x\n",
+ netapi_Log("netapi_secGetChanCtxInfo: *pa_handle inner IP: 0x%x\n",
(paHandleL2L3_t)*pPaHandleInnerIP);
if (pSaHandle)
- printf("netapi_secGetChanHandles: *sa_handle: 0x%x\n",
+ netapi_Log("netapi_secGetChanCtxInfo: *sa_handle: 0x%x\n",
(Sa_ChanHandle)*pSaHandle);
+
}
else
{