This is a discussion on Re: Regarding Table data Create and Fill within the SNMP Users forums, part of the Networking and Network Related category; --===============1787638839== Content-Type: multipart/alternative; boundary="----=_Part_23656_23912170.1205801162739" ------=_Part_23656_23912170.1205801162739 Content-Type: text/plain; charset=ISO-8859-1 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
--===============1787638839==
Content-Type: multipart/alternative; boundary="----=_Part_23656_23912170.1205801162739" ------=_Part_23656_23912170.1205801162739 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Dave, As u said to generate the code with " mib2c -S cache=1 -c mib2c.table_data.conf ocStbHostAVInterfaceTable " I generated , u can check the code below. 1) while compiling it i faced few errors ,which i modified :: now i able to compile . 2) But now while runing.. i able to get the values if i fill the table in "initialize_table_ocStbHostAVInterfaceTable"( which is similar to as normal table_data.conf model (with out catch) ) 3) But if I keep same code in the "ocStbHostAVInterfaceTable_load() " module ( to fill the table ) it is not getting the values and more over I kept some prints in the "ocStbHostAVInterfaceTable_load() module" , What i noticed is that module itself not called by the rest of the code . So "ocStbHostAVInterfaceTable_load()" is not called rest of the modules, may be because of that i am unable to get values. " Please can u tell when the Table_load is called ". ** more over if u have any examples please sent it or if any site have examples please fwd to me*** /* * Note: this file originally auto-generated by mib2c using * : mib2c.table_data.conf 15999 2007-03-25 22:32:02Z dts12 $ */ #include <net-snmp/net-snmp-config.h> #include <net-snmp/net-snmp-includes.h> #include <net-snmp/agent/net-snmp-agent-includes.h> #include "ocStbHostAVInterfaceTable.h" #include "vl_ocStbHost_GetData.h" #include "vlochd_OC_STB_HOST_MIB_Data.h" #define CHRMAX2 256 #define MAX_IOD_LENGTH2 128 /** Initializes the ocStbHostAVInterfaceTable module */ void init_ocStbHostAVInterfaceTable(void) { /* * here we initialize all the tables we're planning on supporting */ printf("init_ocStbHostAVInterfaceTable \n."); initialize_table_ocStbHostAVInterfaceTable(); } //# Determine the first/last column names /** Initialize the ocStbHostAVInterfaceTable table by defining its contents and how it's structured */ netsnmp_tdata *table_data; void initialize_table_ocStbHostAVInterfaceTable(void) { static oid ocStbHostAVInterfaceTable_oid[] = { 1, 3, 6, 1, 4, 1, 4491, 2, 3, 1, 1, 1, 2, 2 }; size_t ocStbHostAVInterfaceTable_oid_len = OID_LENGTH(ocStbHostAVInterfaceTable_oid); netsnmp_handler_registration *reg; // netsnmp_tdata *table_data; netsnmp_table_registration_info *table_info; netsnmp_cache *cache; printf("initialize_table_ocStbHostAVInterfaceTable table_data ....1......\n"); reg = netsnmp_create_handler_registration("ocStbHostAVIn terfaceTable", ocStbHostAVInterfaceTable_handler, ocStbHostAVInterfaceTable_oid, ocStbHostAVInterfaceTable_oid_len, HANDLER_CAN_RONLY); printf("initialize_table_ocStbHostAVInterfaceTable table_data ....2.....\n"); table_data = netsnmp_tdata_create_table("ocStbHostAVInterfaceTa ble", 0); table_info = SNMP_MALLOC_TYPEDEF(netsnmp_table_registration_inf o); netsnmp_table_helper_add_indexes(table_info, ASN_UNSIGNED, /* index: ocStbHostAVInterfaceIndex */ 0); table_info->min_column = COLUMN_OCSTBHOSTAVINTERFACETYPE; table_info->max_column = COLUMN_OCSTBHOSTAVINTERFACESTATUS; printf("initialize_table_ocStbHostAVInterfaceTable Catch ...3......\n"); netsnmp_tdata_register(reg, table_data, table_info); printf("Before Catch .....2...."); cache = netsnmp_cache_create(OCSTBHOSTAVINTERFACETABLE_TIM EOUT, ocStbHostAVInterfaceTable_load, ocStbHostAVInterfaceTable_free, ocStbHostAVInterfaceTable_oid, ocStbHostAVInterfaceTable_oid_len); printf("Before Catch ....4.....\n"); cache->magic = (void *) table_data; netsnmp_inject_handler_before(reg, netsnmp_cache_handler_get(cache), TABLE_DATA_NAME); /* * Initialise the contents of the table here */ #if 0 //Check 1:: (Normal with out cathc) method i will fill here ****************** if i uncommet this code i am able to get the values which are filled bye the this vl_ocStbHostAVInterfaceTable_getdata(table_data)) ********************** if(0 == vl_ocStbHostAVInterfaceTable_getdata(table_data)) { //vl_ocStbHostAVInterfaceTable_getdata" printf(" ERROR:: Not yet table initialise here \n"); } #endif//if 0 } /* * Typical data structure for a row entry */ struct ocStbHostAVInterfaceTable_entry { /* * Index values */ u_long ocStbHostAVInterfaceIndex; /* * Column values */ oid ocStbHostAVInterfaceType[MAX_IOD_LENGTH2]; size_t ocStbHostAVInterfaceType_len; char ocStbHostAVInterfaceDesc[CHRMAX2]; size_t ocStbHostAVInterfaceDesc_len; long ocStbHostAVInterfaceStatus; int valid; }; /* * create a new row in the table */ netsnmp_tdata_row *ocStbHostAVInterfaceTable_createEntry(netsnmp_tda ta * table_data, u_long ocStbHostAVInterfaceIndex) { struct ocStbHostAVInterfaceTable_entry *entry; netsnmp_tdata_row *row; entry = SNMP_MALLOC_TYPEDEF(struct ocStbHostAVInterfaceTable_entry); if (!entry) return NULL; row = netsnmp_tdata_create_row(); if (!row) { SNMP_FREE(entry); return NULL; } row->data = entry; entry->ocStbHostAVInterfaceIndex = ocStbHostAVInterfaceIndex; netsnmp_tdata_row_add_index(row, ASN_UNSIGNED, &(entry->ocStbHostAVInterfaceIndex), sizeof(entry->ocStbHostAVInterfaceIndex)); netsnmp_tdata_add_row(table_data, row); return row; } /* * remove a row from the table */ void ocStbHostAVInterfaceTable_removeEntry(netsnmp_tdat a * table_data, netsnmp_tdata_row * row) { struct ocStbHostAVInterfaceTable_entry *entry; if (!row) return; /* Nothing to remove */ entry = (struct ocStbHostAVInterfaceTable_entry *) netsnmp_tdata_remove_and_delete_row(table_data, row); if (entry) SNMP_FREE(entry); /* XXX - release any other internal resources */ } /* * Example cache handling - set up table_data list from a suitable file */ int ocStbHostAVInterfaceTable_load(netsnmp_cache * cache, void *vmagic) { netsnmp_tdata *table = (netsnmp_tdata *) vmagic; netsnmp_tdata_row *row; //struct ocStbHostAVInterfaceTable_entry *this //cache->magic /** *vl_ocStbHostAVInterfaceTable_getdata module will Initialise the contents of the table here */ printf(".................table initialise here ............\n"); if(0 == vl_ocStbHostAVInterfaceTable_getdata(table)) { //vl_ocStbHostAVInterfaceTable_getdata" printf(" ERROR:: Not yet table initialise here \n"); } #if 0 FILE * fp; char buf[STRMAX]; ; fp = fopen("/data/for/ocStbHostAVInterfaceTable", "r"); while (fgets(buf, STRMAX, fp)) { /* * Unpick 'buf' to extract the index values... */ this = ocStbHostAVInterfaceTable_createEntry(table, ocStbHostAVInterfaceIndex); /* * ... and then populate 'this' with the column values */ } fclose (fp); #endif } void ocStbHostAVInterfaceTable_free(netsnmp_cache * cache, void *vmagic) { netsnmp_tdata * table = (netsnmp_tdata *) vmagic; netsnmp_tdata_row *this; netsnmp_tdata_delete_table(table); // while ((this = netsnmp_tdata_get_first_row(table))) { // netsnmp_tdata_remove_and_delete_row(table, this); // } } /** handles requests for the ocStbHostAVInterfaceTable table */ int ocStbHostAVInterfaceTable_handler(netsnmp_mib_hand ler *handler, netsnmp_handler_registration *reginfo, netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests) { netsnmp_request_info *request; netsnmp_table_request_info *table_info; netsnmp_tdata * table_data; netsnmp_tdata_row *table_row; struct ocStbHostAVInterfaceTable_entry *table_entry; int ret; switch (reqinfo->mode) { /* * Read-support (also covers GetNext requests) */ case MODE_GET: for (request = requests; request; request = request->next) { table_entry = (struct ocStbHostAVInterfaceTable_entry *) netsnmp_tdata_extract_entry(request); table_info = netsnmp_extract_table_info(request); printf("....ocStbHostAVInterfaceTable_handler:: ..MODE_GET: .............\n"); switch (table_info->colnum) { case COLUMN_OCSTBHOSTAVINTERFACETYPE: if (!table_entry) { netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE); continue; } snmp_set_var_typed_value(request->requestvb, ASN_OBJECT_ID, (u_char *) table_entry-> ocStbHostAVInterfaceType, table_entry-> ocStbHostAVInterfaceType_len); printf("....COLUMN_OCSTBHOSTAVINTERFACETYPE:: ..MODE_GET: .............\n"); break; case COLUMN_OCSTBHOSTAVINTERFACEDESC: if (!table_entry) { netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE); continue; } snmp_set_var_typed_value(request->requestvb, ASN_OCTET_STR, (u_char *) table_entry-> ocStbHostAVInterfaceDesc, table_entry-> ocStbHostAVInterfaceDesc_len); printf("....COLUMN_OCSTBHOSTAVINTERFACEDESC:: ..MODE_GET: .............\n"); break; case COLUMN_OCSTBHOSTAVINTERFACESTATUS: if (!table_entry) { netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHINSTANCE); continue; } snmp_set_var_typed_integer(request->requestvb, ASN_INTEGER, table_entry-> ocStbHostAVInterfaceStatus); break; default: netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHOBJECT); break; } } break; } return SNMP_ERR_NOERROR; } ------=_Part_23656_23912170.1205801162739 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Dave,<br> As u said to generate the code with &= quot; mib2c -S cache=3D1 -c mib2c.table_data.conf ocStbHostAVInterfaceTable= "<br>I generated , u can check the code below. <br> = 1) while compiling it i faced few errors ,which i modified :: now i = able to compile .<br> 2) But now while runing.. i able to get the values= if i fill the table in "initialize_table_ocStbHostAVInterfaceTable&q u= ot;( which is similar to as normal table_data.conf model (with out catch) )= <br>3) But if I keep same code in the "ocStbHostAVInterfaceTable_load(= ) " module ( to fill the table ) it is not getting the values and more= over I kept some prints in the "ocStbHostAVInterfaceTable_load() modu= le" , What i noticed is that module itself not called by t= he rest of the code .<br> <br>So "ocStbHostAVInterfaceTable_load()" is not called rest of t= he modules, may be because of that i am unable to get values. " Please= can u tell when the Table_load is called ". <br><br>** more over if u= have any examples please sent it or if any site have examples please fwd t= o me***<br> <br>/*<br> * Note: this file originally auto-generated by mib2c using<= br> * : mib2c.table_data.conf 15999 2007-03-25 22:32:02Z dts12 $= <br> */<br><br>#include <net-snmp/net-snmp-config.h><br>#include= <net-snmp/net-snmp-includes.h><br> #include <net-snmp/agent/net-snmp-agent-includes.h><br>#include "= ;ocStbHostAVInterfaceTable.h"<br><br>#include "vl_ocStbHost_GetDa= ta.h"<br>#include "vlochd_OC_STB_HOST_MIB_Data.h"<br><b r> #define CHRMAX2 256<br>#define MAX_IOD_LENGTH2 128<br>/** Initializes the o= cStbHostAVInterfaceTable module */<br>void<br>init_ocStbHostAVInterfaceTabl= e(void)<br>{<br> /*<br> * here we= initialize all the tables we're planning on supporting <br> */<br> printf("init_o= cStbHostAVInterfaceTable \n.");<br> initialize_table= _ocStbHostAVInterfaceTable();<br>}<br><br>//# Determine the first/last colu= mn names<br><br>/** Initialize the ocStbHostAVInterfaceTable table by defin= ing its contents and how it's structured */<br> netsnmp_tdata *table_data;<br>void<br>initialize_table_ocStbHo= stAVInterfaceTable(void)<br>{<br><br> <br> st= atic oid ocStbHostAVInterfaceTable_oid[] =3D<= br> { 1, 3, 6, 1, 4, 1, 4491, 2, = 3, 1, 1, 1, 2, 2 };<br> size_t &n bsp;&n= bsp; ocStbHostAVInterfaceTable_oid_len =3D<br>  = ; OID_LENGTH(ocStbHostAVInterfaceTable_oid);<br>&nbs p; &nb= sp; netsnmp_handler_registration *reg;<br>// netsnm= p_tdata *table_data;<br> netsnmp_table_registration= _info *table_info;<br> netsnmp_cache *cache;<br> printf= ("initialize_table_ocStbHostAVInterfaceTabl e table_data ...1......\n&q= uot;);<br> reg =3D<br>  = ; netsnmp_create_handler_registration("ocStbHos tAVInterfaceTable= ",<br> &n bsp; &nb= sp;   ; = &n bsp; &nb= sp; ocStbHostAVInterfaceTable_handler,<br>&nb= sp;   ; = &n bsp; &nb= sp;   ; = ocStbHostAVInterfaceTable_oid,<br> &nbs= p; &= nbsp; &nb sp; &nbs= p; &= nbsp; ocStbHostAVInterfaceTable_oid_len,<br> &n bsp; &nb= sp;   ; = &n bsp; &nb= sp; HANDLER_CAN_RONLY);<br><br> p= rintf("initialize_table_ocStbHostAVInterfaceT able table_data ...2.....= \n");<br> table_data =3D<br> = netsnmp_tdata_create_table("ocStbHostAVInterf aceTab= le", 0);<br> table_info =3D SNMP_MALLOC_TYPEDEF(netsnmp_table_registr= ation_info);<br> netsnmp_table_helper_add_indexes(table_i= nfo, ASN_UNSIGNED, /* index: ocStbHostAVInterfaceIndex */<br> &n= bsp; &nbs p;  = ; & nbsp; &n= bsp; &nbs p; 0);<br> <br> table_info->min_column =3D COLUMN_OCSTBHOSTAVINTE= RFACETYPE;<br> table_info->max_column =3D COLUMN_OCSTB= HOSTAVINTERFACESTATUS;<br> <br><br> printf("in= itialize_table_ocStbHostAVInterfaceTable Catch ...3......\n");<br> netsnmp_tdata_register(reg, table_data, table_info);<br>= printf("Before Catch .....2....");<br> &n= bsp; cache =3D netsnmp_cache_create(OCSTBHOSTAVINTERFACETABLE_TIM EOUT= ,<br> &nb sp; &nbs= p; &= nbsp; ocStbHostAVInterfaceTable_l= oad,<br> &n bsp; &nb= sp;   ; = ocStbHostAVInterfaceTable_free,<= br>   ; = &n bsp; &nb= sp; ocStbHostAVInterfaceTable_oid= ,<br> &nb sp; &nbs= p; &= nbsp; ocStbHostAVInterfaceTable_o= id_len);<br> printf("Before Catch ....4.....\n");<br> cache->magic =3D (void *) tab= le_data;<br> netsnmp_inject_handler_before(reg, netsnmp_c= ache_handler_get(cache),<br> &nbs p;  = ; & nbsp; &n= bsp; &nbs p;  = ; TABLE_DATA_NAME);<br> <br>  = ; <br> /*<br> &n= bsp; * Initialise the contents of the table h= ere <br>   ; */<br><br> #if = 0 <br>//Check 1:: (Normal with out cathc) method i will fill here ***= *************** if i uncommet this code i am able to get the values which a= re filled bye the this vl_ocStbHostAVInterfaceTable_getdata(table_data)) **= ********************<br> <br> if(0 =3D=3D vl_ocStbHostAVInterfaceTable_getd= ata(table_data))<br> {<br> = //vl_ocStbHostAVInterfaceTable_getdata" = ; <br> printf(" ERROR:: Not yet table initial= ise here \n");<br> }<br> #endif//if 0 <br>}<br><br> /*<b= r> * Typical data structure for a row entry <br>&nb= sp; */<br>struct ocStbHostAVInterfaceTable_entry {<br>&nb= sp; /*<br> * Index values <br> &nb= sp; */<br> u_long &nbs= p; ocStbHostAVInterfaceIndex;<br> <br> /*<br> * Column values <br>&= nbsp; */<br> oid  = ;   ; ocStbHostAVInterfaceType[= MAX_IOD_LENGTH2];<br> size_t  = ; ocStbHostAVInterfaceType_len;<br> &nbs= p; char &nbs p; o= cStbHostAVInterfaceDesc[CHRMAX2];<br> size_t &n bsp;&n= bsp; ocStbHostAVInterfaceDesc_len;<br>   ; long &n= bsp; &nbs p; ocStbHostAVInterfaceSt= atus;<br><br> int &nbs= p; valid;<br>};<br><br>/*<br> * create a= new row in the table <br> */<br>netsnmp_tdata_row *ocStbHostAVInterfa= ceTable_createEntry(netsnmp_tdata *<br> &n bsp; &nb= sp;   ; = &n bsp; &nb= sp;   ; = table_data,<br>  = ; & nbsp; &n= bsp; &nbs p;  = ; & nbsp; &n= bsp; &nbs p;  = ; u_long<br> &nbs p; &nb= sp;   ; = &n bsp; &nb= sp;   ; = &n bsp; ocStbHostAVInt= erfaceIndex)<br> {<br> struct ocStbHostAVInterfaceTable_entry *entry;<br>&= nbsp; netsnmp_tdata_row *row;<br><br> entry = =3D SNMP_MALLOC_TYPEDEF(struct ocStbHostAVInterfaceTable_entry);<br> &= nbsp; if (!entry)<br> &n bsp; retur= n NULL;<br><br> row =3D netsnmp_tdata_create_row();<br> if (!row) {<br>  = ; SNMP_FREE(entry);<br>   ; return NU= LL;<br> }<br> row->data =3D entry;<b= r> entry->ocStbHostAVInterfaceIndex =3D ocStbHostAVInt= erfaceIndex;<br> netsnmp_tdata_row_add_index(row, ASN_UNS= IGNED,<br> &n bsp; &nb= sp;   ; = &(entry->ocStbHostAVInterfaceIn= dex),<br>   ; = &n bsp; &nb= sp; sizeof(entry->ocStbHostAVI= nterfaceIndex));<br> netsnmp_tdata_add_row(table_data, ro= w);<br> return row;<br> }<br><br>/*<br> * remove a row from the table <br> */<br>void<br>= ocStbHostAVInterfaceTable_removeEntry(netsnmp_tdat a * table_data,<br> = &n bsp; &nb= sp;   ; = &n bsp; &nb= sp; netsnmp_tdata_row * row) {<br> struct ocS= tbHostAVInterfaceTable_entry *entry;<br> <br> if (!row)<br> &nb= sp; return; & nbsp; &nbs= p; /* Nothing to remove */<br> &nb= sp; entry =3D (struct ocStbHostAVInterfaceTable_entry *)<br> &nb= sp; netsnmp_tdata_remove_and_delete_row(table_data,= row);<br> if (entry)<br> SNMP_FREE(entry); &nb= sp; /* XXX - release any other internal resources */<br>}= <br><br>/*<br> * Example cache handling - set up table_data list from = a suitable file <br> */<br>int<br>ocStbHostAVInterfaceTable_load(netsn= mp_cache * cache, void *vmagic) {<br> netsnmp_tdata *table =3D (netsnmp_tdata *) vmagic;<br>&n= bsp; netsnmp_tdata_row *row;<br> //struct ocS= tbHostAVInterfaceTable_entry *this <br> //cac= he->magic<br> /**<br> *vl_ocSt= bHostAVInterfaceTable_getdata module will Initialise the contents of = the table here <br> */<br> printf(= ".................table initialise here ............\n");<br>&nbs= p; if(0 =3D=3D vl_ocStbHostAVInterfaceTable_getdata= (table))<br> {<br> &= nbsp; //vl_ocStbHostAVInterfaceTable_getdata" <br> printf(" ERROR:: Not yet table initialise he= re \n");<br> }<br>#if 0<br><br><br>  = ; FILE * & nbsp; fp;<br> = ; char &nbs p; &nb= sp; buf[STRMAX];<br> &nb sp;&= nbsp; &nb sp; ;<br><br> = &n bsp; &nb= sp; fp =3D fopen("/data/for/ocStbHostAVI= nterfaceTable", "r");<br> while &nb sp;&nb= sp; (fgets(buf, STRMAX, fp)) {<br>  = ; /*<br> &nb sp; * Unpick = 9;buf' to extract the index values... <br>  = ; */<br> &nbs p; = <br> this =3D<br> &nbs= p;   ; ocStbHostAVInterfaceTabl= e_createEntry(table,<br> &n bsp; &nb= sp;   ; = &n bsp; &nb= sp;   ; ocStb= HostAVInterfaceIndex);<br> /*<br>=   ; * ... and then populate &#= 39;this' with the column values <br>  = ; */<br> } fclose &nbs= p; (fp);<br>#endif<br> }<br><br>void<br>ocStbHostAVInterfaceTable_free(ne tsnmp_cache * cache, void= *vmagic) {<br> netsnmp_tdata * table =3D (netsnmp_tdata = *) vmagic;<br> netsnmp_tdata_row *this;<br><br> &nbs= p; netsnmp_tdata_delete_table(table); <br> <br>// while &nb= sp; ((this =3D netsnmp_tdata_get_first_row(table))) {<br>= //   ; netsnmp_tdata_remove_and= _delete_row(table, this);<br>// &n= bsp; }<br><br>}<br><br>/** handles requ= ests for the ocStbHostAVInterfaceTable table */ <br> int<br>ocStbHostAVInterfaceTable_handler(netsnmp_m ib_handler *handler,<br>&= nbsp; &nb sp; &nbs= p; &= nbsp; &nb sp; net= snmp_handler_registration<br> &nb sp; &nbs= p; &= nbsp; &nb sp; &nbs= p; *reginfo,<br>  = ; & nbsp; &n= bsp; &nbs p;  = ; netsnmp_agent_request_info *reqinfo,<= br> &n bsp; &nb= sp;   ; = &n bsp; ne= tsnmp_request_info *requests) {<br><br> netsnmp_request_i= nfo *request;<br> netsnmp_table_request_info *table_info;= <br> netsnmp_tdata * table_data;<br> ne= tsnmp_tdata_row *table_row;<br> struct ocStbHostAVInterfaceTable_entry *table_entry;<br>= int   ; = ; ret;<br> <br> <br>&= nbsp; <br> switch (reqinfo->mo= de) {<br> /*<br>  = ; * Read-support (also covers GetNext request= s)<br>   ; */<br> c= ase MODE_GET:<br> & nbsp; for (request = =3D requests; request; request =3D request->next) {<br>  = ;   ; table_entry =3D (struct o= cStbHostAVInterfaceTable_entry *)<br> &n= bsp; &nbs p; netsnmp_tdata_extract_= entry(request);<br> &n bsp; table_in= fo =3D netsnmp_extract_table_info(request);<br> &nbs p; &nbs= p; printf("....ocStbHostAVInterfac= eTable_handler:: ..MODE_GET: ............\n");<br> &n= bsp; switch (table_info->colnu= m) {<br> &nb sp; = case COLUMN_OCSTBHOSTAVINTERFACETYPE:<br> &n bsp; &nb= sp; if (!table_entry) {<br> = &n bsp; &nb= sp; netsnmp_set_request_error(reqinfo, request,<br> = &n bsp; &nb= sp;   ; = &n bsp; &nb= sp; SNMP_NOSUCHINSTANCE);<br> & nbs= p; &= nbsp; continue;<br> & nbsp; &n= bsp; }<br> &n bsp; &nb= sp; snmp_set_var_typed_value(request->requestvb, ASN_OBJECT_= ID,<br> & nbsp; &n= bsp; &nbs p;  = ; & nbsp; &n= bsp; (u_char *) table_entry-><br> &nb= sp;   ; = &n bsp; &nb= sp;   ; ocStb= HostAVInterfaceType,<br> &n bsp; &nb= sp;   ; = &n bsp; &nb= sp; table_entry-><br> &nb = sp;   ; = &n bsp; &nb= sp;   ; ocStbHostAVInterfaceTyp= e_len);<br> &nb sp; &nbs= p; printf("....COLUMN_OCSTBHOSTAVINTERFA= CETYPE:: ..MODE_GET: ............\n"); <br> &n bsp; &nb= sp; break;<br> &nbs p; &= nbsp; case COLUMN_OCSTBHOSTAVINTERFACEDESC:<br> &n bs= p; = if (!table_entry) {<br> &nb sp;&nbs= p; netsnmp_set_= request_error(reqinfo, request,<br> &n bs= p; &= nbsp; &nb sp; &nbs= p; &= nbsp; SNMP_NOSUCHINSTANCE);<br> &n bsp; &nb= sp; continue;<br> &nbs= p; }<br>&= nbsp; &nb sp; &nbs= p; snmp_set_var_typed_value(request->requestvb, ASN_OCTET_ST= R,<br> &n bsp; &nb= sp;   ; = &n bsp; &nb= sp; (u_char *) table_entry-><br> &nbs= p; &= nbsp; &nb sp; &nbs= p; ocStbH= ostAVInterfaceDesc,<br> &n bsp; &nb= sp;   ; = &n bsp; &nb= sp; table_entry-><br> &nb = sp;   ; = &n bsp; &nb= sp;   ; ocStbHostAVInterfaceDes= c_len);<br> printf("....COLUMN_OC= STBHOSTAVINTERFACEDESC:: ..MODE_GET: ............\n"); <br> &n bsp; &nb= sp; break;<br> &nbs p; &= nbsp; case COLUMN_OCSTBHOSTAVINTERFACESTATUS:<br> &n= bsp; &nbs p;  = ; if (!table_entry) {<br> &nb sp;&n= bsp; &nbs p; netsnmp_se= t_request_error(reqinfo, request,<br> &n = bsp; &nbs p;  = ; & nbsp; &n= bsp; &nbs p;  = ; SNMP_NOSUCHINSTANCE);<br> &n bsp; &nb= sp; continue;<br> &nbs= p; }<br>&= nbsp; &nb sp; &nbs= p; snmp_set_var_typed_integer(request->requestvb, ASN_INTEGE= R,<br> &n bsp; &nb= sp;   ; = &n bsp; &nb= sp; table_entry-><br> &nb= sp;   ; = &n bsp; &nb= sp;   ; = ocStbHostAVInterfaceStatus);<br> &n bsp; &nb= sp; break;<br> &nbs p; &= nbsp; default:<br> &n bsp;&nb= sp; netsnmp_set_request_error(req= info, request,<br> &n bsp; &nb= sp;   ; = &n bsp; &nb= sp; SNMP_NOSUCHOBJECT);<br> = &n bsp; &nb= sp; break;<br> &nbs p; &= nbsp; }<br> }<br> &nb= sp; break;<br><br> }<br> re= turn SNMP_ERR_NOERROR;<br>}<br><br> ------=_Part_23656_23912170.1205801162739-- --===============1787638839== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ --===============1787638839== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/...net-snmp-users --===============1787638839==-- |