Hi Dave, 

>From wmanIfBsSsProvisionedForSfTable_interface.c
void
_wmanIfBsSsProvisionedForSfTable_initialize_interface(wmanIfBsSsProvisionedForSfTable_registration
 * reg_ptr,  u_long flags)
{
    netsnmp_baby_steps_access_methods *access_multiplexer =
        &wmanIfBsSsProvisionedForSfTable_if_ctx.access_multiplexer;
    netsnmp_table_registration_info *tbl_info = 
&wmanIfBsSsProvisionedForSfTable_if_ctx.tbl_info;
    netsnmp_handler_registration *reginfo;
    netsnmp_mib_handler *handler;
    int    mfd_modes = 0;
//netsnmp_table_helper_add_indexes(tbl_info,
    //                              ASN_OCTET_STR, /** index: 
wmanIfBsSsProvMacAddress */
    //                              ASN_UNSIGNED, /** index: wmanIfBsProvSfId */
    //                         0);
    netsnmp_table_helper_add_indexes(tbl_info,
                                  ASN_PRIV_IMPLIED_OCTET_STR, /** index: 
wmanIfBsSsProvMacAddress */
                                  ASN_UNSIGNED, /** index: wmanIfBsProvSfId */
                             0);

    /*  Define the minimum and maximum accessible columns.  This
        optimizes retrival. */
    tbl_info->min_column = WMANIFBSSSPROVISIONEDFORSFTABLE_MIN_COL;
    tbl_info->max_column = WMANIFBSSSPROVISIONEDFORSFTABLE_MAX_COL;

    /*
     * save users context
     */
    wmanIfBsSsProvisionedForSfTable_if_ctx.user_ctx = reg_ptr;
    wmanIfBsSsProvisionedForSfTable_init_data(reg_ptr);

    /*
     * set up the container
     */
    
_wmanIfBsSsProvisionedForSfTable_container_init(&wmanIfBsSsProvisionedForSfTable_if_ctx);
    if (NULL == wmanIfBsSsProvisionedForSfTable_if_ctx.container) {
        snmp_log(LOG_ERR,"could not initialize container for 
wmanIfBsSsProvisionedForSfTable\n");
        return;
    }

    /*
     * access_multiplexer: REQUIRED wrapper for get request handling
     */
    access_multiplexer->object_lookup = 
_mfd_wmanIfBsSsProvisionedForSfTable_object_lookup;
    access_multiplexer->get_values = 
_mfd_wmanIfBsSsProvisionedForSfTable_get_values;
    access_multiplexer->pre_request = 
_mfd_wmanIfBsSsProvisionedForSfTable_pre_request;
    access_multiplexer->post_request = 
_mfd_wmanIfBsSsProvisionedForSfTable_post_request;


    /*
     * REQUIRED wrappers for set request handling
     */
    access_multiplexer->object_syntax_checks = 
_mfd_wmanIfBsSsProvisionedForSfTable_check_objects;
    access_multiplexer->undo_setup = 
_mfd_wmanIfBsSsProvisionedForSfTable_undo_setup;
    access_multiplexer->undo_cleanup = 
_mfd_wmanIfBsSsProvisionedForSfTable_undo_cleanup;
    access_multiplexer->set_values = 
_mfd_wmanIfBsSsProvisionedForSfTable_set_values;
    access_multiplexer->undo_sets = 
_mfd_wmanIfBsSsProvisionedForSfTable_undo_values;

    /*
     * no wrappers yet
     */
    access_multiplexer->commit = _mfd_wmanIfBsSsProvisionedForSfTable_commit;
    access_multiplexer->undo_commit = 
_mfd_wmanIfBsSsProvisionedForSfTable_undo_commit;
    access_multiplexer->irreversible_commit = 
_mfd_wmanIfBsSsProvisionedForSfTable_irreversible_commit;

    /*
     * REQUIRED for tables with dependencies
     */
    access_multiplexer->consistency_checks = 
_mfd_wmanIfBsSsProvisionedForSfTable_check_dependencies;
..................
}
-------------------------------------------------------------------------
In same file,
int
wmanIfBsSsProvisionedForSfTable_index_to_oid(netsnmp_index *oid_idx,
                         wmanIfBsSsProvisionedForSfTable_mib_index *mib_idx)
{
/** START code generated by : generic-table-indexes-varbind-setup.m2i,v $ : 1.3 
$ */
    int err = SNMP_ERR_NOERROR;
   
    netsnmp_variable_list var_wmanIfBsSsProvMacAddress;
    netsnmp_variable_list var_wmanIfBsProvSfId;

    /*
     * set up varbinds
     */
    memset( &var_wmanIfBsSsProvMacAddress, 0x00, 
sizeof(var_wmanIfBsSsProvMacAddress) );
   //var_wmanIfBsSsProvMacAddress.type = ASN_OCTET_STR;
    var_wmanIfBsSsProvMacAddress.type = ASN_PRIV_IMPLIED_OCTET_STR;
    memset( &var_wmanIfBsProvSfId, 0x00, sizeof(var_wmanIfBsProvSfId) );
    var_wmanIfBsProvSfId.type = ASN_UNSIGNED;

    /*
     * chain temp index varbinds together
     */
    var_wmanIfBsSsProvMacAddress.next_variable =  &var_wmanIfBsProvSfId; 
var_wmanIfBsProvSfId.next_variable =  NULL;

 snmp_set_var_value(&var_wmanIfBsSsProvMacAddress, 
(u_char*)&mib_idx->wmanIfBsSsProvMacAddress,
                       mib_idx->wmanIfBsSsProvMacAddress_len * 
sizeof(mib_idx->wmanIfBsSsProvMacAddress[0]));
 snmp_set_var_value(&var_wmanIfBsProvSfId, (u_char*)&mib_idx->wmanIfBsProvSfId,
                       sizeof(mib_idx->wmanIfBsProvSfId));
    err = build_oid_noalloc(oid_idx->oids, oid_idx->len, &oid_idx->len,
                           NULL, 0, &var_wmanIfBsSsProvMacAddress);
    if(err)
       snmp_log(LOG_ERR,"error %d converting index to oid\n", err);
    snmp_reset_var_buffers( &var_wmanIfBsSsProvMacAddress );

    return err;
} /* wmanIfBsSsProvisionedForSfTable_index_to_oid */
---------------------------------------------------------------------------------------------------
int
wmanIfBsSsProvisionedForSfTable_index_from_oid(netsnmp_index *oid_idx,  
wmanIfBsSsProvisionedForSfTable_mib_index *mib_idx)
{
/** START code generated by : generic-table-indexes-varbind-setup.m2i,v $ : 1.3 
$ */
    int err = SNMP_ERR_NOERROR;
    netsnmp_variable_list var_wmanIfBsSsProvMacAddress;
  
    netsnmp_variable_list var_wmanIfBsProvSfId;

    memset( &var_wmanIfBsSsProvMacAddress, 0x00, 
sizeof(var_wmanIfBsSsProvMacAddress) );
    //XXX-praseed macAddr Fix--test
    //var_wmanIfBsSsProvMacAddress.type = ASN_OCTET_STR;
    var_wmanIfBsSsProvMacAddress.type = ASN_PRIV_IMPLIED_OCTET_STR;
    memset( &var_wmanIfBsProvSfId, 0x00, sizeof(var_wmanIfBsProvSfId) );
    var_wmanIfBsProvSfId.type = ASN_UNSIGNED;
    var_wmanIfBsSsProvMacAddress.next_variable =  &var_wmanIfBsProvSfId; 
var_wmanIfBsProvSfId.next_variable =  NULL;

/** END code generated by : generic-table-indexes-varbind-setup.m2i,v $ : 1.3 $ 
*/

    err = parse_oid_indexes( oid_idx->oids, oid_idx->len,
                             &var_wmanIfBsSsProvMacAddress );
  if (err == SNMP_ERR_NOERROR) {
       if(var_wmanIfBsSsProvMacAddress.val_len > 
sizeof(mib_idx->wmanIfBsSsProvMacAddress))
             err = SNMP_ERR_GENERR;
         else {
             memcpy(mib_idx->wmanIfBsSsProvMacAddress, 
var_wmanIfBsSsProvMacAddress.val.string, var_wmanIfBsSsProvMacAddress.val_len);
             mib_idx->wmanIfBsSsProvMacAddress_len = 
var_wmanIfBsSsProvMacAddress.val_len / 
sizeof(mib_idx->wmanIfBsSsProvMacAddress[0]);
         }
    mib_idx->wmanIfBsProvSfId = *((u_long *)var_wmanIfBsProvSfId.val.string);
    }
    snmp_reset_var_buffers( &var_wmanIfBsSsProvMacAddress );

    return err;
} /* wmanIfBsSsProvisionedForSfTable_index_from_oid */
======================================================================

>From WMAN-IF-MIB.txt mib file

wmanIfBsProvisionedSfTable OBJECT-TYPE
        SYNTAX      SEQUENCE OF WmanIfBsProvisionedSfEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "This table contains service flow profiles provisioned by
             NMS. The service flow should be created with SS(s)
             following instruction given by wmanIfBsSfState object.
             1. The QoS parameters of the service flow are provisioned
                in wmanIfBsServiceClassTable and referenced by
                wmanIfBsServiceClassIndex.
             2. The classifier rules of the service flow are provisioned
                in wmanIfBsClassifierRuleTable, where they refer to SF
                via wmanIfBsSfId.

             The MAC addresses of SSs the service flow is created with
             are provisioned in wmanIfBsSsProvisionedForSfTable, where
             they refer to SF via wmanIfBsSfId."
        REFERENCE
            "Subclause 6.3.13 and 6.3.14 in IEEE Std 802.16-2004"
        ::= { wmanIfBsPacketCs 1 }
wmanIfBsSsProvisionedForSfEntry OBJECT-TYPE
        SYNTAX      WmanIfBsSsProvisionedForSfEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "This table is indexed by wmanIfBsSsProvMacAddress and
             wmanIfBsProvSfId."
        INDEX { wmanIfBsSsProvMacAddress, wmanIfBsProvSfId }
        ::= { wmanIfBsSsProvisionedForSfTable 1 }

WmanIfBsSsProvisionedForSfEntry ::= SEQUENCE {
        wmanIfBsSsProvMacAddress                MacAddress,
        wmanIfBsProvSfId                        Unsigned32,
        wmanIfBsSsProvisionedForSfRowStatus     RowStatus}

wmanIfBsSsProvMacAddress OBJECT-TYPE
        SYNTAX      MacAddress
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "The MAC address of the SS, the service flow is created
             with."
        ::= { wmanIfBsSsProvisionedForSfEntry 1 }


wmanIfBsProvSfId OBJECT-TYPE
        SYNTAX      Unsigned32 (1 .. 4294967295)
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "A 32 bit quantity that uniquely identifies a service flow.
             The value of this object can be used by BS to index the
             wmanBsProvisionedSfTable."
        ::= { wmanIfBsSsProvisionedForSfEntry 2 }

wmanIfBsSsProvisionedForSfRowStatus OBJECT-TYPE
        SYNTAX          RowStatus
        MAX-ACCESS      read-create
        STATUS          current
        DESCRIPTION
            "This object is used to ensure that the write, create,
             delete operation to multiple columns is guaranteed to
             be treated as atomic operation by agent."
        ::= { wmanIfBsSsProvisionedForSfEntry 3 }
=========================================================

I'm not very much sure whether I've provided the info you were asking.
Otherwise please ask, I'll provide whatever is needed.

BTW, the code already existing (done earlier by another engineer, whom I can't 
contact now) works with a hack with the length of MacAddress(6).
----
One more update,
With MacAddress type as ASN_OCTET_STR, if we do a snmpwalk (well, from a visual 
MIB browser ) output for wmanIfBsSsProvisionedForSfRowStatus is

Name/OID                                                                    
Value
wmanIfBsSsProvisionedForSfRowStatus.6.0.240.97.0.181.32.1        1

After changing to  ASN_PRIV_IMPLIED_OCTET_STR,

Name/OID                                                                    
Value
 wmanIfBsSsProvisionedForSfRowStatus.0.240.97.0.181.32.1           1

So, the fix of changing the type is working good for snmpwalk, but when I do a 
snmpget the problem still persists.

Command (before changing type ), plz note the length field 6 in the snmpget.
snmpget -c public -m ALL -v2c 172.21.20.220 
wmanIfBsSsProvisionedForSfRowStatus.6.0.240.97.0.181.32.1

Output
WMAN-IF-MIB::wmanIfBsSsProvisionedForSfRowStatus.'...a..'.32.1  = INTEGER: 
active(1)

Output of snmpget, after changing the type ( with length field 6 in snmpget)
WMAN-IF-MIB::wmanIfBsSsProvisionedForSfRowStatus.'...a..'.32.1 = No Such 
Instance currently exists at this OID

 Output of snmpget, after changing the type ( without length field in snmpget)
WMAN-IF-MIB::wmanIfBsSsProvisionedForSfRowStatus.'..a.. '.1 = No Such Instance 
currently exists at this OID

Thanks & Regards
Praseed


Dave Shield <[EMAIL PROTECTED]> wrote: On 08/09/2007, Praseed V Gopal 
 wrote:
> For me, even after changing the  type from ASN_OCTET_STR  to
> ASN_PRIV_IMPLIED_OCTET_STR, the output I get from snmpget
> & snmpset is not proper.....
> However, if I add a length of macAddress (6) after
> wmanIfBsSsProvisionedForSfRowStatus I got the output
> without issues
>
> snmpget -c public -m ALL -v2c 172.21.20.220
> wmanIfBsSsProvisionedForSfRowStatus.6.0.240.97.0.181.32.1
> Output
> WMAN-IF-MIB::wmanIfBsSsProvisionedForSfRowStatus.'...a..'.32.1
> = INTEGER: active(1)
>
> Any clues?

What does the code that implements this table look like?

Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users




       
---------------------------------
 DELETE button is history. Unlimited mail storage is just a click away.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to