[AGENT++] Size limit of an OctetString inside a MibTable ?

Jacquemin, Jean-Philippe jean-philippe.jacquemin at barco.com
Tue Jun 28 11:04:43 CEST 2011


Dear All,

 

I would like to know what is the size limit of a DisplayString contained
into a MibTable ?

I use to populate my table with security certificates of max size of
3KB. I now have to use 9KB data (in the future maybe up to 64KB) and I
do get a 'SNMP protocol error').

 

Table creation:

 

  if ((pMibTable = new MibTable(*m_poidCertificateEntry)) != NULL)

  {

    /* build up the columns */

    for (dwColCount = 1; enReturnValue == CError::eNoError

                         && dwColCount <= CertificatesTable.Size.eCol;
++dwColCount)

    {

      sprintf (strOidx, "%lu", dwColCount);

      if (dwColCount == CertificatesTable.Cols.eIndex)

      {

        if ((pInt32 = new SnmpInt32((SDWORD) 0)) != NULL

            && (pMibLeaf = new MibLeaf(Oidx(strOidx), READONLY, pInt32))
!= NULL)

        {

          pMibTable->add_col(pMibLeaf);

        }

        else enReturnValue = CError::eMibBuildingError;

      }

      else if (dwColCount == CertificatesTable.Cols.eCertificateName)

      {

        if ( ((pOctetStr = new OctetStr((BYTE*)"None",
MAX_CERTIF_NAME_LENGTH)) != NULL)

        && ((pMibLeaf = new MibLeaf(Oidx(strOidx), READONLY, pOctetStr))
!= NULL) )

        {

          pMibTable->add_col(pMibLeaf);

        }

        else enReturnValue = CError::eMibBuildingError;

      }

      else // certificate !!

      {

        if ( ((pOctetStr = new OctetStr((BYTE*)"None", 3000)) != NULL)

        && ((pMibLeaf = new MibLeaf(Oidx(strOidx), READONLY, pOctetStr))
!= NULL) )

        {

          pMibTable->add_col(pMibLeaf);

        }

        else enReturnValue = CError::eMibBuildingError;

      }

    }

 

Thanks in advance for your help!

 

 

Best regards,

 

Jean-Philippe

 



DISCLAIMER:
Unless indicated otherwise, the information contained in this message is privileged and confidential, and is intended only for the use of the addressee(s) named above and others who have been specifically authorized to receive it. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message and/or attachments is strictly prohibited. The company accepts no liability for any damage caused by any virus transmitted by this email. Furthermore, the company does not warrant a proper and complete transmission of this information, nor does it accept liability for any delays. If you have received this message in error, please contact the sender and delete the message. Thank you.



More information about the AGENTPP mailing list