ANSC_STATUS BbhmDiagipSetStopTime ( ANSC_HANDLE hThisObject, USHORT SeqNumber, ULONG PktSize, UCHAR TTL, ULONG StopTime ) { ANSC_STATUS returnStatus = ANSC_STATUS_FAILURE; PBBHM_DIAG_IP_PING_OBJECT pMyObject = (PBBHM_DIAG_IP_PING_OBJECT)hThisObject; PBBHM_IP_PING_PROPERTY pProperty = (PBBHM_IP_PING_PROPERTY )&pMyObject->Property; PBBHM_IP_PING_TDO_OBJECT pStateTimer = (PBBHM_IP_PING_TDO_OBJECT )pMyObject->hStateTimer; PBBHM_IP_PING_SINK_OBJECT pSink = (PBBHM_IP_PING_SINK_OBJECT )pMyObject->hSinkObject; PSINGLE_LINK_ENTRY pSLinkEntry = NULL; PBBHM_IP_PING_ECHO_ENTRY pEchoEntry = NULL; PBBHM_IP_PING_ECHO_ENTRY pMEchoEntry = NULL; ULONG ulHashIndex = SeqNumber % MAX_ECHO_TABLE_SIZE; AnscAcquireLock(&pMyObject->EchoTableLock); pSLinkEntry = AnscSListGetFirstEntry(&pMyObject->EchoTable[ulHashIndex]); while ( pSLinkEntry ) { pEchoEntry = (PBBHM_IP_PING_ECHO_ENTRY)ACCESS_BBHM_IP_PING_ECHO_ENTRY(pSLinkEntry); pSLinkEntry = AnscSListGetNextEntry(pSLinkEntry); if ( pEchoEntry->SeqId == SeqNumber ) { if ( (StopTime - pEchoEntry->StartTime <= pProperty->TimeOut) && (pEchoEntry->StopTime == 0) ) { returnStatus = ANSC_STATUS_SUCCESS; pEchoEntry->StopTime = StopTime; pEchoEntry->TTL = TTL; pEchoEntry->PktSize = PktSize; pEchoEntry->ICMPType = 0; pMEchoEntry = (PBBHM_IP_PING_ECHO_ENTRY)AnscAllocateMemory(sizeof(BBHM_IP_PING_ECHO_ENTRY)); if ( pMEchoEntry ) { pMEchoEntry->StartTime = pEchoEntry->StartTime; pMEchoEntry->StopTime = pEchoEntry->StopTime; pMEchoEntry->SeqId = pEchoEntry->SeqId; pMEchoEntry->PktSize = pEchoEntry->PktSize; pMEchoEntry->TTL = pEchoEntry->TTL; pMEchoEntry->ICMPType = pEchoEntry->ICMPType; AnscAcquireLock(&pMyObject->MiddleResultLock); AnscSListPushEntryAtBack(&pMyObject->MiddleResult, &pMEchoEntry->Linkage); AnscReleaseLock(&pMyObject->MiddleResultLock); } } break; } } AnscReleaseLock(&pMyObject->EchoTableLock); return returnStatus; }
ANSC_STATUS HttpSpoDestroyPsoPool ( ANSC_HANDLE hThisObject ) { ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PHTTP_SIMPLE_PROXY_OBJECT pMyObject = (PHTTP_SIMPLE_PROXY_OBJECT )hThisObject; PHTTP_SIMPLE_PROXY_PROPERTY pProperty = (PHTTP_SIMPLE_PROXY_PROPERTY)&pMyObject->Property; PHTTP_PROXY_SESSION_OBJECT pSession = NULL; PSINGLE_LINK_ENTRY pSLinkEntry = NULL; AnscAcquireLock(&pMyObject->PsoSListLock); pSLinkEntry = AnscSListPopEntry(&pMyObject->PsoSList); while ( pSLinkEntry ) { pSession = ACCESS_HTTP_PROXY_SESSION_OBJECT(pSLinkEntry); pSLinkEntry = AnscSListPopEntry(&pMyObject->PsoSList); pSession->Remove((ANSC_HANDLE)pSession); } AnscReleaseLock(&pMyObject->PsoSListLock); return ANSC_STATUS_SUCCESS; }
ANSC_STATUS HttpBmoDelAllHfos ( ANSC_HANDLE hThisObject ) { ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PHTTP_BASIC_MESSAGE_OBJECT pMyObject = (PHTTP_BASIC_MESSAGE_OBJECT)hThisObject; PHTTP_HFP_INTERFACE pHfpIf = (PHTTP_HFP_INTERFACE )pMyObject->hHfpIf; PHTTP_HEADER_FIELD pHttpHfo = NULL; PSINGLE_LINK_ENTRY pSLinkEntry = NULL; ULONG i = 0; AnscAcquireLock(&pMyObject->HfoTableLock); for ( i = 0; i < HTTP_BMO_HFO_TABLE_SIZE; i++ ) { pSLinkEntry = AnscQueuePopEntry(&pMyObject->HfoTable[i]); while ( pSLinkEntry ) { pHttpHfo = ACCESS_HTTP_HEADER_FIELD(pSLinkEntry); pSLinkEntry = AnscQueuePopEntry(&pMyObject->HfoTable[i]); AnscFreeMemory(pHttpHfo); } } AnscReleaseLock(&pMyObject->HfoTableLock); return ANSC_STATUS_SUCCESS; }
ANSC_STATUS DslhWmpdoReset ( ANSC_HANDLE hThisObject ) { ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PDSLH_WMP_DATABASE_OBJECT pMyObject = (PDSLH_WMP_DATABASE_OBJECT )hThisObject; PDSLH_WMP_DATABASE_PROPERTY pProperty = (PDSLH_WMP_DATABASE_PROPERTY)&pMyObject->Property; PDSLH_OBJ_RECORD_OBJECT pRootObjRecord = (PDSLH_OBJ_RECORD_OBJECT )pMyObject->hRootObjRecord; PDSLH_OBJ_ENTITY_OBJECT pRootObjEntity = (PDSLH_OBJ_ENTITY_OBJECT )pMyObject->hRootObjEntity; PDSLH_WMPDO_MONITOR_PARAM pMonitorParam = (PDSLH_WMPDO_MONITOR_PARAM )NULL; PSINGLE_LINK_ENTRY pSLinkEntry = (PSINGLE_LINK_ENTRY )NULL; pMyObject->ResetObjVarArray(hThisObject); if ( pMyObject->LockedEntity ) { AnscFreeMemory(pMyObject->LockedEntity); pMyObject->LockedEntity = NULL; } if ( pMyObject->pRootObjName) { AnscFreeMemory(pMyObject->pRootObjName); pMyObject->pRootObjName = NULL; } if ( pRootObjRecord ) { pRootObjRecord->Remove((ANSC_HANDLE)pRootObjRecord); pMyObject->hRootObjRecord = (ANSC_HANDLE)NULL; } if ( pRootObjEntity ) { pRootObjEntity->Remove((ANSC_HANDLE)pRootObjEntity); pMyObject->hRootObjEntity = (ANSC_HANDLE)NULL; } AnscAcquireLock(&pMyObject->MpoQueueLock); pSLinkEntry = AnscQueuePopEntry(&pMyObject->MpoQueue); while ( pSLinkEntry ) { pMonitorParam = ACCESS_DSLH_WMPDO_MONITOR_PARAM(pSLinkEntry); pSLinkEntry = AnscQueuePopEntry(&pMyObject->MpoQueue); DslhWmpdoFreeMonitorParam(pMonitorParam); } AnscReleaseLock(&pMyObject->MpoQueueLock); return ANSC_STATUS_SUCCESS; }
ANSC_STATUS HttpAuthcoClearAllAuthInfo ( ANSC_HANDLE hThisObject ) { PHTTP_AUTH_CLIENT_OBJECT pMyObject = (PHTTP_AUTH_CLIENT_OBJECT)hThisObject; PHTTP_AUTHO_INFO pAuthInfo = NULL; PSINGLE_LINK_ENTRY pSLinkEntry = NULL; AnscAcquireLock(&pMyObject->AuthInfoListLock); /* remove auth info */ pSLinkEntry = AnscSListPopEntry(&pMyObject->AuthInfoList); while (pSLinkEntry) { pAuthInfo = ACCESS_HTTP_AUTHO_INFO_OBJECT(pSLinkEntry); pSLinkEntry = AnscSListPopEntry(&pMyObject->AuthInfoList); HttpAuthInfoRemove(pAuthInfo); } AnscReleaseLock(&pMyObject->AuthInfoListLock); return ANSC_STATUS_SUCCESS; }
ANSC_STATUS BbhmDiagipAddEchoEntry ( ANSC_HANDLE hThisObject, USHORT SeqNumber, ULONG StartTime ) { ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PBBHM_DIAG_IP_PING_OBJECT pMyObject = (PBBHM_DIAG_IP_PING_OBJECT )hThisObject; PBBHM_IP_PING_PROPERTY pProperty = (PBBHM_IP_PING_PROPERTY )&pMyObject->Property; PBBHM_IP_PING_TDO_OBJECT pStateTimer = (PBBHM_IP_PING_TDO_OBJECT )pMyObject->hStateTimer; PBBHM_IP_PING_SINK_OBJECT pSink = (PBBHM_IP_PING_SINK_OBJECT )pMyObject->hSinkObject; PSINGLE_LINK_ENTRY pSLinkEntry = NULL; PBBHM_IP_PING_ECHO_ENTRY pEchoEntry = NULL; ULONG ulHashIndex = SeqNumber % MAX_ECHO_TABLE_SIZE; pEchoEntry = (PBBHM_IP_PING_ECHO_ENTRY)AnscAllocateMemory(sizeof(BBHM_IP_PING_ECHO_ENTRY)); if ( !pEchoEntry ) { return ANSC_STATUS_FAILURE; } pEchoEntry->SeqId = SeqNumber; pEchoEntry->StartTime = StartTime; pEchoEntry->StopTime = 0; AnscAcquireLock(&pMyObject->EchoTableLock); AnscSListPushEntry(&pMyObject->EchoTable[ulHashIndex], &pEchoEntry->Linkage); AnscReleaseLock(&pMyObject->EchoTableLock); return returnStatus; }
BOOLEAN BbhmDiageoCheckCanStart ( ANSC_HANDLE hThisObject ) { ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PBBHM_DIAG_EXEC_OBJECT pMyObject = (PBBHM_DIAG_EXEC_OBJECT)hThisObject; PDSLH_DIAG_INFO_BASE pDiagInfo = (PDSLH_DIAG_INFO_BASE )pMyObject->hDslhDiagInfo; BOOLEAN bCanStart = FALSE; AnscAcquireLock(&pMyObject->AccessLock); if ( pMyObject->bResultQueryRunning ) { bCanStart = FALSE; } else { bCanStart = TRUE; } AnscReleaseLock(&pMyObject->AccessLock); return bCanStart; }
ANSC_STATUS Bmc2EnvcoDelAllCommandProperties ( ANSC_HANDLE hThisObject ) { ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PBMC2_ENV_CONTROLLER_OBJECT pMyObject = (PBMC2_ENV_CONTROLLER_OBJECT )hThisObject; PBMC2_ENV_CONTROLLER_PROPERTY pProperty = (PBMC2_ENV_CONTROLLER_PROPERTY)&pMyObject->Property; PBMC2_COMMAND_PROPERTY pBmc2CommandProperty = (PBMC2_COMMAND_PROPERTY )NULL; PSINGLE_LINK_ENTRY pSLinkEntry = (PSINGLE_LINK_ENTRY )NULL; ULONG i = 0; AnscAcquireLock(&pMyObject->CompoTableLock); for ( i = 0; i < BMC2_ENVCO_COMPO_TABLE_SIZE; i++ ) { pSLinkEntry = AnscQueuePopEntry(&pMyObject->CompoTable[i]); while ( pSLinkEntry ) { pBmc2CommandProperty = ACCESS_BMC2_COMMAND_PROPERTY(pSLinkEntry); pSLinkEntry = AnscQueuePopEntry(&pMyObject->CompoTable[i]); Bmc2FreeCommandProperty(pBmc2CommandProperty); } } AnscReleaseLock(&pMyObject->CompoTableLock); return ANSC_STATUS_SUCCESS; }
ANSC_STATUS PsmSysroSysRamEnableFileSync ( ANSC_HANDLE hThisObject, BOOL bEnabled ) { ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PPSM_SYS_REGISTRY_OBJECT pMyObject = (PPSM_SYS_REGISTRY_OBJECT )hThisObject; PPSM_SYS_REGISTRY_PROPERTY pProperty = (PPSM_SYS_REGISTRY_PROPERTY)&pMyObject->Property; PSYS_INFO_REPOSITORY_OBJECT pSysInfoRepository = (PSYS_INFO_REPOSITORY_OBJECT)pMyObject->hSysInfoRepository; PSYS_IRA_INTERFACE pIraIf = (PSYS_IRA_INTERFACE )pSysInfoRepository->GetIraIf((ANSC_HANDLE)pSysInfoRepository); AnscAcquireLock(&pMyObject->AccessLock); //CcspTraceInfo(("\n##PsmSysroSysRamEnableFileSync() begins##\n")); if ( bEnabled ) { pMyObject->FileSyncRefCount--; } else { pMyObject->FileSyncRefCount++; } AnscReleaseLock(&pMyObject->AccessLock); //CcspTraceInfo(("\n##PsmSysroSysRamEnableFileSync() ENDs##\n")); return ANSC_STATUS_SUCCESS; }
ANSC_STATUS AnscLpccoDelAllPendingCalls ( ANSC_HANDLE hThisObject ) { ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PANSC_LPC_CONNECTOR_OBJECT pMyObject = (PANSC_LPC_CONNECTOR_OBJECT)hThisObject; PANSC_LPCCO_PENDING_CALL pPendingCall = (PANSC_LPCCO_PENDING_CALL )NULL; PSINGLE_LINK_ENTRY pSLinkEntry = (PSINGLE_LINK_ENTRY )NULL; AnscAcquireLock(&pMyObject->PcallQueueLock); pSLinkEntry = AnscQueuePopEntry(&pMyObject->PcallQueue); while ( pSLinkEntry ) { pPendingCall = ACCESS_ANSC_LPCCO_PENDING_CALL(pSLinkEntry); pSLinkEntry = AnscQueuePopEntry(&pMyObject->PcallQueue); AnscSetEvent (pPendingCall->CallEvent); AnscFreeMemory(pPendingCall); } AnscReleaseLock(&pMyObject->PcallQueueLock); return ANSC_STATUS_SUCCESS; }
ANSC_STATUS AnscLpccoPopAllPendingCalls ( ANSC_HANDLE hThisObject, ULONG error_code ) { ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PANSC_LPC_CONNECTOR_OBJECT pMyObject = (PANSC_LPC_CONNECTOR_OBJECT)hThisObject; PANSC_LPCCO_PENDING_CALL pPendingCall = (PANSC_LPCCO_PENDING_CALL )NULL; PSINGLE_LINK_ENTRY pSLinkEntry = (PSINGLE_LINK_ENTRY )NULL; AnscAcquireLock(&pMyObject->PcallQueueLock); pSLinkEntry = AnscQueuePopEntry(&pMyObject->PcallQueue); while ( pSLinkEntry ) { pPendingCall = ACCESS_ANSC_LPCCO_PENDING_CALL(pSLinkEntry); pSLinkEntry = AnscQueuePopEntry(&pMyObject->PcallQueue); if ( TRUE ) { pPendingCall->CallError = error_code; pPendingCall->CallOutputBdo = (ANSC_HANDLE)NULL; AnscSetEvent(pPendingCall->CallEvent); } } AnscReleaseLock(&pMyObject->PcallQueueLock); return ANSC_STATUS_SUCCESS; }
ANSC_HANDLE AnscLpccoGetPendingCall ( ANSC_HANDLE hThisObject, ULONG msg_type, ULONG seq_number ) { ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PANSC_LPC_CONNECTOR_OBJECT pMyObject = (PANSC_LPC_CONNECTOR_OBJECT)hThisObject; PANSC_LPCCO_PENDING_CALL pPendingCall = (PANSC_LPCCO_PENDING_CALL )NULL; PSINGLE_LINK_ENTRY pSLinkEntry = (PSINGLE_LINK_ENTRY )NULL; AnscAcquireLock(&pMyObject->PcallQueueLock); pSLinkEntry = AnscQueueGetFirstEntry(&pMyObject->PcallQueue); while ( pSLinkEntry ) { pPendingCall = ACCESS_ANSC_LPCCO_PENDING_CALL(pSLinkEntry); pSLinkEntry = AnscQueueGetNextEntry(pSLinkEntry); if ( (pPendingCall->ImcpMsgType == msg_type ) && (pPendingCall->CallSeqNumber == seq_number) ) { AnscReleaseLock(&pMyObject->PcallQueueLock); return (ANSC_HANDLE)pPendingCall; } } AnscReleaseLock(&pMyObject->PcallQueueLock); return (ANSC_HANDLE)NULL; }
ANSC_STATUS AnscLpccoDelAllPartyAddrs ( ANSC_HANDLE hThisObject ) { ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PANSC_LPC_CONNECTOR_OBJECT pMyObject = (PANSC_LPC_CONNECTOR_OBJECT)hThisObject; PANSC_LPC_PARTY_ADDR pPartyAddr = (PANSC_LPC_PARTY_ADDR )NULL; PSINGLE_LINK_ENTRY pSLinkEntry = (PSINGLE_LINK_ENTRY )NULL; ULONG i = 0; AnscAcquireLock(&pMyObject->PartyTableLock); for ( i = 0; i < ANSC_LPCCO_PARTY_TABLE_SIZE; i++ ) { pSLinkEntry = AnscQueuePopEntry(&pMyObject->PartyTable[i]); while ( pSLinkEntry ) { pPartyAddr = ACCESS_ANSC_LPC_PARTY_ADDR(pSLinkEntry); pSLinkEntry = AnscQueuePopEntry(&pMyObject->PartyTable[i]); AnscFreeMemory(pPartyAddr); } } AnscReleaseLock(&pMyObject->PartyTableLock); return ANSC_STATUS_SUCCESS; }
ANSC_STATUS HttpSpoDestroyBmoRepPool ( ANSC_HANDLE hThisObject ) { ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PHTTP_SIMPLE_PROXY_OBJECT pMyObject = (PHTTP_SIMPLE_PROXY_OBJECT )hThisObject; PHTTP_SIMPLE_PROXY_PROPERTY pProperty = (PHTTP_SIMPLE_PROXY_PROPERTY)&pMyObject->Property; PHTTP_BMO_REP_OBJECT pBmoRep = NULL; PSINGLE_LINK_ENTRY pSLinkEntry = NULL; AnscAcquireLock(&pMyObject->BmoRepSListLock); pSLinkEntry = AnscSListPopEntry(&pMyObject->BmoRepSList); while ( pSLinkEntry ) { pBmoRep = ACCESS_HTTP_BMO_REP_OBJECT(pSLinkEntry); pSLinkEntry = AnscSListPopEntry(&pMyObject->BmoRepSList); pBmoRep->Remove((ANSC_HANDLE)pBmoRep); } AnscReleaseLock(&pMyObject->BmoRepSListLock); return ANSC_STATUS_SUCCESS; }
ANSC_STATUS HttpSpoReleaseBmoRep ( ANSC_HANDLE hThisObject, ANSC_HANDLE hBmoRep ) { ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PHTTP_SIMPLE_PROXY_OBJECT pMyObject = (PHTTP_SIMPLE_PROXY_OBJECT )hThisObject; PHTTP_SIMPLE_PROXY_PROPERTY pProperty = (PHTTP_SIMPLE_PROXY_PROPERTY)&pMyObject->Property; PHTTP_BMO_REP_OBJECT pBmoRep = (PHTTP_BMO_REP_OBJECT )hBmoRep; pBmoRep->Reset((ANSC_HANDLE)pBmoRep); if ( pMyObject->ProxyMode & HTTP_SPO_MODE_COMPACT ) { pBmoRep->Remove((ANSC_HANDLE)pBmoRep); } else { AnscAcquireLock (&pMyObject->BmoRepSListLock); AnscSListPushEntry(&pMyObject->BmoRepSList, &pBmoRep->Linkage); AnscReleaseLock (&pMyObject->BmoRepSListLock); } return ANSC_STATUS_SUCCESS; }
ANSC_STATUS Bmc2EnvcoDelAllComTerminals ( ANSC_HANDLE hThisObject ) { ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PBMC2_ENV_CONTROLLER_OBJECT pMyObject = (PBMC2_ENV_CONTROLLER_OBJECT )hThisObject; PBMC2_ENV_CONTROLLER_PROPERTY pProperty = (PBMC2_ENV_CONTROLLER_PROPERTY)&pMyObject->Property; PBMC2_COM_TERMINAL_OBJECT pBmc2ComTerminal = (PBMC2_COM_TERMINAL_OBJECT )NULL; PSINGLE_LINK_ENTRY pSLinkEntry = (PSINGLE_LINK_ENTRY )NULL; AnscAcquireLock(&pMyObject->ComtoQueueLock); pSLinkEntry = AnscQueuePopEntry(&pMyObject->ComtoQueue); while ( pSLinkEntry ) { pBmc2ComTerminal = ACCESS_BMC2_COM_TERMINAL_OBJECT(pSLinkEntry); pSLinkEntry = AnscQueuePopEntry(&pMyObject->ComtoQueue); pBmc2ComTerminal->Cancel((ANSC_HANDLE)pBmc2ComTerminal); pBmc2ComTerminal->Remove((ANSC_HANDLE)pBmc2ComTerminal); } AnscReleaseLock(&pMyObject->ComtoQueueLock); return ANSC_STATUS_SUCCESS; }
ANSC_STATUS Bmc2EnvcoAddCommandProperty ( ANSC_HANDLE hThisObject, ANSC_HANDLE hCommandProperty, ANSC_HANDLE hCommandInsertBefore ) { ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PBMC2_ENV_CONTROLLER_OBJECT pMyObject = (PBMC2_ENV_CONTROLLER_OBJECT )hThisObject; PBMC2_ENV_CONTROLLER_PROPERTY pProperty = (PBMC2_ENV_CONTROLLER_PROPERTY)&pMyObject->Property; PBMC2_COMMAND_PROPERTY pBmc2CommandProperty = (PBMC2_COMMAND_PROPERTY )hCommandProperty; PBMC2_COMMAND_PROPERTY pBmc2CommandPropRef = (PBMC2_COMMAND_PROPERTY )hCommandInsertBefore; ULONG ulHashIndex = AnscHashString(pBmc2CommandProperty->CommandName, AnscSizeOfString(pBmc2CommandProperty->CommandName), BMC2_ENVCO_COMPO_TABLE_SIZE); AnscAcquireLock (&pMyObject->CompoTableLock); if ( !pBmc2CommandPropRef ) { AnscQueuePushEntry(&pMyObject->CompoTable[ulHashIndex], &pBmc2CommandProperty->Linkage); } else { /* This makes sure that the command property with more specific domain pattern name appears before those * with less specific name. So when the command is issued, framework always tries to match domain * with longer domain name, therefore there will be no mismatch. */ AnscQueuePushEntryBefore(&pMyObject->CompoTable[ulHashIndex], &pBmc2CommandProperty->Linkage, &pBmc2CommandPropRef->Linkage); } AnscReleaseLock (&pMyObject->CompoTableLock); return ANSC_STATUS_SUCCESS; }
ANSC_STATUS TlsSmoDelAllSessions ( ANSC_HANDLE hThisObject ) { PTLS_SESSION_MANAGER_OBJECT pMyObject = (PTLS_SESSION_MANAGER_OBJECT )hThisObject; PTLS_SESSION_ENTRY_OBJECT pSessionEntry = (PTLS_SESSION_ENTRY_OBJECT )NULL; PSINGLE_LINK_ENTRY pSLinkEntry = (PSINGLE_LINK_ENTRY )NULL; ULONG i = 0; AnscAcquireLock(&pMyObject->SeoTableLock); for ( i = 0; i < TLS_SMO_SEO_TABLE_SIZE; i++ ) { pSLinkEntry = AnscQueuePopEntry(&pMyObject->SeoTable[i]); while ( pSLinkEntry ) { pSessionEntry = ACCESS_TLS_SESSION_ENTRY_OBJECT(pSLinkEntry); pSLinkEntry = AnscQueuePopEntry(&pMyObject->SeoTable[i]); pSessionEntry->Remove((ANSC_HANDLE)pSessionEntry); } } AnscReleaseLock(&pMyObject->SeoTableLock); return ANSC_STATUS_SUCCESS; }
ANSC_STATUS BbhmDiageoStartDiag ( ANSC_HANDLE hThisObject ) { ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PBBHM_DIAG_EXEC_OBJECT pMyObject = (PBBHM_DIAG_EXEC_OBJECT)hThisObject; PDSLH_DIAG_INFO_BASE pDiagInfo = (PDSLH_DIAG_INFO_BASE )pMyObject->hDslhDiagInfo; AnscAcquireLock(&pMyObject->AccessLock); pDiagInfo->DiagnosticState = DSLH_DIAG_STATE_TYPE_Inprogress; pMyObject->bResultQueryRunning = TRUE; AnscResetEvent(&pMyObject->ResultQueryEvent); AnscReleaseLock(&pMyObject->AccessLock); returnStatus = AnscSpawnTask2 ( pMyObject->ResultQueryTask, (ANSC_HANDLE)pMyObject, "BbhmDiagTask", ANSC_TASK_PRIORITY_NORMAL ); return ANSC_STATUS_SUCCESS; }
ANSC_STATUS HttpFcoAddFormElement ( ANSC_HANDLE hThisObject, ANSC_HANDLE hFeo ) { ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PHTTP_FORM_CONTENT_OBJECT pMyObject = (PHTTP_FORM_CONTENT_OBJECT)hThisObject; PHTTP_HFP_INTERFACE pHfpIf = (PHTTP_HFP_INTERFACE )pMyObject->hHfpIf; PHTTP_FORM_ELEMENT pFormElement = (PHTTP_FORM_ELEMENT )hFeo; ULONG ulHashIndex = 0; ulHashIndex = AnscHashString ( pFormElement->Name, AnscSizeOfString(pFormElement->Name), HTTP_FCO_FEO_TABLE_SIZE ); pFormElement->FormIndex = pMyObject->FormIndex++; pFormElement->HashIndex = ulHashIndex; AnscAcquireLock (&pMyObject->FeoTableLock); AnscQueuePushEntry(&pMyObject->FeoTable[ulHashIndex], &pFormElement->Linkage); AnscReleaseLock (&pMyObject->FeoTableLock); return ANSC_STATUS_SUCCESS; }
ANSC_STATUS HttpFcoDelFormElement ( ANSC_HANDLE hThisObject, char* name ) { ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PHTTP_FORM_CONTENT_OBJECT pMyObject = (PHTTP_FORM_CONTENT_OBJECT)hThisObject; PHTTP_HFP_INTERFACE pHfpIf = (PHTTP_HFP_INTERFACE )pMyObject->hHfpIf; PHTTP_FORM_ELEMENT pFormElement = NULL; ULONG ulHashIndex = 0; pFormElement = (PHTTP_FORM_ELEMENT)pMyObject->GetFormElement ( (ANSC_HANDLE)pMyObject, name ); if ( !pFormElement ) { return ANSC_STATUS_CANT_FIND; } else { ulHashIndex = pFormElement->HashIndex; } AnscAcquireLock (&pMyObject->FeoTableLock); AnscQueuePopEntryByLink(&pMyObject->FeoTable[ulHashIndex], &pFormElement->Linkage); AnscReleaseLock (&pMyObject->FeoTableLock); return ANSC_STATUS_SUCCESS; }
ANSC_HANDLE HttpFcoGetFormElement ( ANSC_HANDLE hThisObject, char* name ) { ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PHTTP_FORM_CONTENT_OBJECT pMyObject = (PHTTP_FORM_CONTENT_OBJECT)hThisObject; PHTTP_HFP_INTERFACE pHfpIf = (PHTTP_HFP_INTERFACE )pMyObject->hHfpIf; PHTTP_FORM_ELEMENT pFormElement = NULL; PSINGLE_LINK_ENTRY pSLinkEntry = NULL; ULONG ulHashIndex = AnscHashString(name, AnscSizeOfString(name), HTTP_FCO_FEO_TABLE_SIZE); AnscAcquireLock(&pMyObject->FeoTableLock); pSLinkEntry = AnscQueueGetFirstEntry(&pMyObject->FeoTable[ulHashIndex]); while ( pSLinkEntry ) { pFormElement = ACCESS_HTTP_FORM_ELEMENT(pSLinkEntry); pSLinkEntry = AnscQueueGetNextEntry(pSLinkEntry); if ( AnscEqualString(pFormElement->Name, name, TRUE) ) { AnscReleaseLock(&pMyObject->FeoTableLock); return (ANSC_HANDLE)pFormElement; } } AnscReleaseLock(&pMyObject->FeoTableLock); return (ANSC_HANDLE)NULL; }
ANSC_STATUS BbhmDiagipCalculateResult ( ANSC_HANDLE hThisObject ) { ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PBBHM_DIAG_IP_PING_OBJECT pMyObject = (PBBHM_DIAG_IP_PING_OBJECT)hThisObject; PBBHM_IP_PING_PROPERTY pProperty = (PBBHM_IP_PING_PROPERTY )&pMyObject->Property; PBBHM_IP_PING_TDO_OBJECT pStateTimer = (PBBHM_IP_PING_TDO_OBJECT )pMyObject->hStateTimer; PBBHM_IP_PING_SINK_OBJECT pSink = (PBBHM_IP_PING_SINK_OBJECT )pMyObject->hSinkObject; PSINGLE_LINK_ENTRY pSLinkEntry = NULL; PBBHM_IP_PING_ECHO_ENTRY pEchoEntry = NULL; PBBHM_IP_PING_ECHO_ENTRY pMEchoEntry = NULL; ULONG i = 0; AnscAcquireLock(&pMyObject->EchoTableLock); for ( i = 0; i < MAX_ECHO_TABLE_SIZE; i++ ) { pSLinkEntry = AnscSListPopEntry(&pMyObject->EchoTable[i]); while ( pSLinkEntry ) { pEchoEntry = (PBBHM_IP_PING_ECHO_ENTRY)ACCESS_BBHM_IP_PING_ECHO_ENTRY(pSLinkEntry); pSLinkEntry = AnscSListPopEntry(&pMyObject->EchoTable[i]); AnscFreeMemory(pEchoEntry); } } AnscReleaseLock(&pMyObject->EchoTableLock); return returnStatus; }
ANSC_HANDLE HttpWcsoGetEndWcto ( ANSC_HANDLE hThisObject ) { ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PHTTP_WEBC_SESSION_OBJECT pMyObject = (PHTTP_WEBC_SESSION_OBJECT)hThisObject; PHTTP_BSP_INTERFACE pBspIf = (PHTTP_BSP_INTERFACE )pMyObject->hBspIf; PHTTP_HFP_INTERFACE pHfpIf = (PHTTP_HFP_INTERFACE )pMyObject->hHfpIf; PHTTP_WEBC_TRANS_OBJECT pWebcTrans = NULL; PSINGLE_LINK_ENTRY pSLinkEntry = NULL; ULONG ulWctoState = HTTP_WCTO_STATE_INITIALIZED; AnscAcquireLock(&pMyObject->WctoSListLock); pSLinkEntry = AnscSListGetFirstEntry(&pMyObject->WctoSList); if ( pSLinkEntry ) { pWebcTrans = ACCESS_HTTP_WEBC_TRANS_OBJECT(pSLinkEntry); pWebcTrans->AcquireAccess((ANSC_HANDLE)pWebcTrans); } else { pWebcTrans = NULL; } AnscReleaseLock(&pMyObject->WctoSListLock); return (ANSC_HANDLE)pWebcTrans; }
ANSC_STATUS AnscDstoStopEngines ( ANSC_HANDLE hThisObject ) { ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PANSC_DAEMON_SERVER_TCP_OBJECT pMyObject = (PANSC_DAEMON_SERVER_TCP_OBJECT)hThisObject; PANSC_DAEMON_ENGINE_TCP_OBJECT pEngine = NULL; PSINGLE_LINK_ENTRY pSLinkEntry = NULL; AnscAcquireLock(&pMyObject->EngineQueueLock); pSLinkEntry = AnscQueueGetFirstEntry(&pMyObject->EngineQueue); while ( pSLinkEntry ) { pEngine = ACCESS_ANSC_DAEMON_ENGINE_TCP_OBJECT(pSLinkEntry); pSLinkEntry = AnscQueueGetNextEntry(pSLinkEntry); pEngine->Stop((ANSC_HANDLE)pEngine); } AnscReleaseLock(&pMyObject->EngineQueueLock); return ANSC_STATUS_SUCCESS; }
ANSC_STATUS HttpWcsoDelAllWctos ( ANSC_HANDLE hThisObject ) { ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PHTTP_WEBC_SESSION_OBJECT pMyObject = (PHTTP_WEBC_SESSION_OBJECT )hThisObject; PHTTP_SIMPLE_CLIENT_OBJECT pSimpleClient = (PHTTP_SIMPLE_CLIENT_OBJECT)pMyObject->hOwnerContext; PHTTP_BSP_INTERFACE pBspIf = (PHTTP_BSP_INTERFACE )pMyObject->hBspIf; PHTTP_HFP_INTERFACE pHfpIf = (PHTTP_HFP_INTERFACE )pMyObject->hHfpIf; PHTTP_WEBC_TRANS_OBJECT pWebcTrans = NULL; PSINGLE_LINK_ENTRY pSLinkEntry = NULL; AnscAcquireLock(&pMyObject->WctoSListLock); pSLinkEntry = AnscSListPopEntry(&pMyObject->WctoSList); while ( pSLinkEntry ) { pWebcTrans = ACCESS_HTTP_WEBC_TRANS_OBJECT(pSLinkEntry); pSLinkEntry = AnscSListPopEntry(&pMyObject->WctoSList); pWebcTrans->AcquireAccess((ANSC_HANDLE)pWebcTrans); pWebcTrans->ReleaseAccess((ANSC_HANDLE)pWebcTrans); pWebcTrans->Close ((ANSC_HANDLE)pWebcTrans); pWebcTrans->Return ((ANSC_HANDLE)pWebcTrans); } AnscReleaseLock(&pMyObject->WctoSListLock); return ANSC_STATUS_SUCCESS; }
ANSC_HANDLE HttpBmoGetHeaderField ( ANSC_HANDLE hThisObject, ULONG ulHeaderId ) { ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PHTTP_BASIC_MESSAGE_OBJECT pMyObject = (PHTTP_BASIC_MESSAGE_OBJECT)hThisObject; PHTTP_HFP_INTERFACE pHfpIf = (PHTTP_HFP_INTERFACE )pMyObject->hHfpIf; PHTTP_HEADER_FIELD pHttpHfo = NULL; PSINGLE_LINK_ENTRY pSLinkEntry = NULL; ULONG ulHashIndex = AnscHashUlong(ulHeaderId, HTTP_BMO_HFO_TABLE_SIZE); AnscAcquireLock(&pMyObject->HfoTableLock); pSLinkEntry = AnscQueueGetFirstEntry(&pMyObject->HfoTable[ulHashIndex]); while ( pSLinkEntry ) { pHttpHfo = ACCESS_HTTP_HEADER_FIELD(pSLinkEntry); pSLinkEntry = AnscQueueGetNextEntry(pSLinkEntry); if ( pHttpHfo->HeaderId == ulHeaderId ) { AnscReleaseLock(&pMyObject->HfoTableLock); return (ANSC_HANDLE)pHttpHfo; } } AnscReleaseLock(&pMyObject->HfoTableLock); return (ANSC_HANDLE)NULL; }
ANSC_STATUS WebSsoRegisterMdhIf ( ANSC_HANDLE hThisObject, PUCHAR pRequestUri, ANSC_HANDLE hMdhIf ) { ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PWEB_SIMPLE_SERVER_OBJECT pMyObject = (PWEB_SIMPLE_SERVER_OBJECT)hThisObject; PHTTP_FUM_INTERFACE pFumIf = (PHTTP_FUM_INTERFACE )pMyObject->hFumIf; PHTTP_FUM_ENTITY pEntity = NULL; if ( (ANSC_HANDLE)NULL == pFumIf->GetMdhIf(pFumIf->hOwnerContext, pRequestUri) ) { HttpFumEntityAlloc(pEntity, pRequestUri, hMdhIf); if ( !pEntity ) { returnStatus = ANSC_STATUS_RESOURCES; } else { AnscAcquireLock(&pMyObject->MdhSListLock); AnscSListPushEntry(&pMyObject->MdhSList, &pEntity->Linkage); AnscReleaseLock(&pMyObject->MdhSListLock); } } return returnStatus; }
ANSC_STATUS HttpScoDelAllWcsos ( ANSC_HANDLE hThisObject ) { ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PHTTP_SIMPLE_CLIENT_OBJECT pMyObject = (PHTTP_SIMPLE_CLIENT_OBJECT )hThisObject; PHTTP_SIMPLE_CLIENT_PROPERTY pProperty = (PHTTP_SIMPLE_CLIENT_PROPERTY)&pMyObject->Property; PHTTP_WEBC_SESSION_OBJECT pWebcSession = NULL; PSINGLE_LINK_ENTRY pSLinkEntry = NULL; ULONG i = 0; AnscAcquireLock(&pMyObject->WcsoTableLock); for ( i = 0; i < HTTP_SCO_WCSO_TABLE_SIZE; i++ ) { pSLinkEntry = AnscSListPopEntry(&pMyObject->WcsoTable[i]); while ( pSLinkEntry ) { pWebcSession = ACCESS_HTTP_WEBC_SESSION_OBJECT(pSLinkEntry); pSLinkEntry = AnscSListPopEntry(&pMyObject->WcsoTable[i]); pWebcSession->AcquireAccess((ANSC_HANDLE)pWebcSession); pWebcSession->ReleaseAccess((ANSC_HANDLE)pWebcSession); pWebcSession->Close ((ANSC_HANDLE)pWebcSession); pWebcSession->Return ((ANSC_HANDLE)pWebcSession); } } AnscReleaseLock(&pMyObject->WcsoTableLock); return ANSC_STATUS_SUCCESS; }
ANSC_STATUS HttpSpoReleasePso ( ANSC_HANDLE hThisObject, ANSC_HANDLE hPso ) { ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PHTTP_SIMPLE_PROXY_OBJECT pMyObject = (PHTTP_SIMPLE_PROXY_OBJECT )hThisObject; PHTTP_SIMPLE_PROXY_PROPERTY pProperty = (PHTTP_SIMPLE_PROXY_PROPERTY)&pMyObject->Property; PHTTP_PROXY_SESSION_OBJECT pSession = (PHTTP_PROXY_SESSION_OBJECT )hPso; pSession->Reset((ANSC_HANDLE)pSession); if ( pMyObject->ProxyMode & HTTP_SPO_MODE_COMPACT ) { pSession->Remove((ANSC_HANDLE)pSession); } else { AnscAcquireLock (&pMyObject->PsoSListLock); AnscSListPushEntry(&pMyObject->PsoSList, &pSession->Linkage); AnscReleaseLock (&pMyObject->PsoSListLock); } return ANSC_STATUS_SUCCESS; }