【富士通】SMB3.0要件开发

SMB3.0対応:
cgi_PgSharedFolderList.csd:
(项目情报)
{CSP_CLITID(smbEncryptionofDataAccess),NULL,    CGI_SHARED_FOLDER_LIST_TABLE_SMB_ENCRYPTIONOF_DATA_ACCESS,cgi_DFmtOptions,&fis.ListData.SmbEncryptionOptions,  NULL,                  NULL,        CGI_SORT_NONE  },
 
cgi_PgCreateSharedFolderInput.csd:(fis表的显示)
        {CSP_CLITID(smbEncryptionofDataAccess),"fis_smb_encrytion_of_data_access","fis_smb_encrytion_of_data_access",cgi_DFmtOptionsRadio, &fis.SmbEncryptionEnabledOptions, NULL, NULL,    CGI_SORT_NONE },
 
cgi_PgCreateSharedFolderInput.csj:(smb_encrytion_of_data_accessがProtocolがCIFSもしくはCIFS/NFSの時有効を追加):
    <%-- 有効/無効連鎖設定--%>
    var chain = new Chain();
    <%-- Shared Folder SettingのProtocolプルダウン変更時処理--%>
    chain.activeWhen('<%=fis.GetSmb_Encryption_of_Data_AccessTagID()     %>','<%= fis.GetProtocolTagID() %>', <%=CGI_NAS_PROTOCOL_CIFS %>);
    chain.activeWhen('<%=fis.GetSmb_Encryption_of_Data_AccessTagID()     %>','<%= fis.GetProtocolTagID() %>', <%=CGI_NAS_PROTOCOL_NFS_CIFS %>);
 
cgi_PgModifySharedFolderInput.csd:(smbEncryptionofDataAccessを追加)      
 {CSP_CLITID(smbEncryptionofDataAccess),"fis_smb_encrytion_of_data_access","fis_smb_encrytion_of_data_access",cgi_DFmtOptionsRadio, &fis.SmbEncryptionEnabledOptions, NULL, NULL,    CGI_SORT_NONE },
cgi_PgModifySharedFolderInput.csj:(smb_encrytion_of_data_accessがProtocolがCIFSもしくはCIFS/NFSの時有効を追加)
    <%-- SMB Encryption of Data Access選択有無取得--%>
    var isSMB_EncryptionChecked =false;
 
    <%-- SMB Encryption of Data Access表示の場合、SMB Encryption ofData Accessのチェック情報を復元する。--%>
    var smb_EncryptionOpts =document.getElementsByName('<%=fis.GetSmb_Encryption_of_Data_AccessTagID() %>');
    for (var i= 0; i < smb_EncryptionOpts.length; i++) {
        if(smb_EncryptionOpts[i].checked) {
            isSMB_EncryptionChecked =true;
            break;
        }
    }
 
    <%-- SMB Encryption of Data Access未選択時は「UNKNOWN値(-1)」をパラメータに追加--%>
    if (!isSMB_EncryptionChecked){
        $page.AddFormData(frm,'<%= fis.GetSmb_Encryption_of_Data_AccessTagID()%>', <%= CGI_SMBENCRYPTION_UNKNOWN %>);
    }
<%--有効条件の判断--%>
functioncheckEnable(){
    if (<%=(fis.Protocol != CGI_NAS_PROTOCOL_CIFS) && (fis.Protocol !=CGI_NAS_PROTOCOL_NFS_CIFS)%>) {
        <%-- smb_encrytion_of_data_accessがProtocolがCIFSもしくはCIFS/NFSの時有効--%>
        var smb_EncryptionArray =document.getElementsByName('fis_smb_encrytion_of_data_access');
 
cgi_SetSharedFolderFISFactory.cpp(Create,CreateOptions,Reflect関数を修正):
create函数(读):opedata->opeacx->fis;
_actionType== FUNC_TYPE_MODIFY :
pOpeAcx->smbEncryptionofDataAccess= data.isSmbEncryptionofDataAccess;
// NFSを選択した場合は、Disable状態となる
if(CGI_NAS_PROTOCOL_NFS == pOpeAcx->protocol) {
             pOpeAcx->smbEncryptionofDataAccess= CGI_SMBENCRYPTION_DISABLE;}
_actionType== FUNC_TYPE_CREATE:
pOpeAcx->smbEncryptionofDataAccess= CGI_SMBENCRYPTION_DISABLE;
fis.Smb_Encryption_of_Data_Access= pOpeAcx->smbEncryptionofDataAccess;
 
reflect函数(写):fis->opeacx->伦理data;
    if(CGI_NAS_PROTOCOL_NFS == pOpeAcx->protocol) {
        // SMBEncryption of Data Access設定状態
        pOpeAcx->smbEncryptionofDataAccess =CGI_SMBENCRYPTION_DISABLE;
    }
    else {
        // SMBEncryption of Data Access設定状態
        pOpeAcx->smbEncryptionofDataAccess =fis.Smb_Encryption_of_Data_Access;
    }
data.sharedFolderData.isSmbEncryptionofDataAccess=pOpeAcx->smbEncryptionofDataAccess;
 
mmi_SharedFolderListTableBuilder.cpp(SetModelDataColumnsを修正, SetModelSmbEncryptionofDataAccessを追加):
追加列时,首先要追加此列相关函数的绑定;
{CGI_SHARED_FOLDER_LIST_TABLE_SMB_ENCRYPTIONOF_DATA_ACCESS,   &mmi_SharedFolderListTableBuilder::SetModelSmbEncryptionofDataAccess}
利用一临时变量_model,实现向列表中添加数据;
Voidmmi_SharedFolderListTableBuilder::SetModelSmbEncryptionofDataAccess()
{   _row.SetSmbEncryptionofDataAccess(_model.isSmbEncryptionofDataAccess);
}
 
cgi_SetNasSharedFolderOpe.cpp(调用CLI命令):
    // SMB暗号化(isSmbEncryptionofDataAccess)を設定
    if((CGI_NAS_PROTOCOL_CIFS == _pData->sharedFolderData.protocol) ||
        (CGI_NAS_PROTOCOL_NFS_CIFS ==_pData->sharedFolderData.protocol)) {
        if(CGI_SMBENCRYPTION_ENABLE ==_pData->sharedFolderData.isSmbEncryptionofDataAccess) {
            CSP_snprintf(pCliCmdParam,cliCmdExceedSize,"%s%s%s%s%s",pCliCmdParam,
                CGI_NAS_PARTS_SPACE,
                CGI_NAS_PARTS_SMB_ENCRYPTION,
                CGI_NAS_PARTS_SPACE,
                CGI_NAS_PARTS_ENABLE);
        }
        elseif (CGI_SMBENCRYPTION_DISABLE ==_pData->sharedFolderData.isSmbEncryptionofDataAccess) {
            CSP_snprintf(pCliCmdParam,cliCmdExceedSize,"%s%s%s%s%s",pCliCmdParam,
                CGI_NAS_PARTS_SPACE,
                CGI_NAS_PARTS_SMB_ENCRYPTION,
                CGI_NAS_PARTS_SPACE,
                CGI_NAS_PARTS_DISABLE);
        }
    }
cgi_Translate4581.cpp (SMB3.0対応:ResponseNasConfigDataSharedを修正)
        // SMB Encryption of Data Access設定状態
        CSP_PCSTR smb_Encryption =_tableShared->getWordAt(0, CGI_SMB_ENCRYPTION);
        //プロトコルがNFSの場合
        if(CGI_NAS_PROTOCOL_NFS == data.protocol) {
            data.isSmbEncryptionofDataAccess =CGI_SMBENCRYPTION_UNKNOWN;
        }
        else {
            if(0 == CSP_strcmpi(smb_Encryption,"1")){
               data.isSmbEncryptionofDataAccess = CGI_SMBENCRYPTION_ENABLE;
            }
            elseif (0 == CSP_strcmpi(smb_Encryption,"0")) {
                data.isSmbEncryptionofDataAccess= CGI_SMBENCRYPTION_DISABLE;
            }
            else{
               data.isSmbEncryptionofDataAccess = CGI_SMBENCRYPTION_UNKNOWN;
            }
        }
 


你可能感兴趣的:(【富士通】SMB3.0要件开发)