Bluehost.com Web Hosting $6.95

Re: Regarding Table data Create and Fill

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 ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-18-2008
kumar undurthi
 
Posts: n/a
Default Re: Regarding Table data Create and Fill

--===============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>&nbsp; &nbsp;&nbsp; As u said to generate the code with&nbsp; &=
quot; mib2c -S cache=3D1 -c mib2c.table_data.conf ocStbHostAVInterfaceTable=
&quot;<br>I generated , u can check the code below. <br>&nbsp;&nbsp;&nbsp;=
&nbsp; 1) while compiling it i faced few errors ,which i modified :: now i =
able to compile .<br>
&nbsp;&nbsp;&nbsp;&nbsp; 2) But now while runing.. i able to get the values=
if i fill the table in &quot;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 &quot;ocStbHostAVInterfaceTable_load(=
) &quot; module ( to fill the table ) it is not getting the values and more=
over I kept some prints in the &quot;ocStbHostAVInterfaceTable_load() modu=
le&quot; ,&nbsp; What i noticed is that module itself&nbsp; not called by t=
he rest of the code .<br>
<br>So &quot;ocStbHostAVInterfaceTable_load()&quot; is not called rest of t=
he modules, may be because of that i am unable to get values. &quot; Please=
can u tell when the Table_load is called &quot;. <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>&nbsp;* Note: this file originally auto-generated by mib2c using<=
br>&nbsp;*&nbsp; : mib2c.table_data.conf 15999 2007-03-25 22:32:02Z dts12 $=
<br>&nbsp;*/<br><br>#include &lt;net-snmp/net-snmp-config.h&gt;<br>#include=
&lt;net-snmp/net-snmp-includes.h&gt;<br>
#include &lt;net-snmp/agent/net-snmp-agent-includes.h&gt;<br>#include &quot=
;ocStbHostAVInterfaceTable.h&quot;<br><br>#include &quot;vl_ocStbHost_GetDa=
ta.h&quot;<br>#include &quot;vlochd_OC_STB_HOST_MIB_Data.h&quot;<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>&nbsp;&nbsp;&nbsp; /*<br>&nbsp;&nbsp;&nbsp;&nbsp; * here we=
initialize all the tables we're planning on supporting <br>
&nbsp;&nbsp;&nbsp;&nbsp; */<br>&nbsp;&nbsp;&nbsp;&nbsp; printf(&quot;init_o=
cStbHostAVInterfaceTable \n.&quot;);<br>&nbsp;&nbsp;&nbsp; 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>
&nbsp; netsnmp_tdata&nbsp; *table_data;<br>void<br>initialize_table_ocStbHo=
stAVInterfaceTable(void)<br>{<br><br>&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; st=
atic oid&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ocStbHostAVInterfaceTable_oid[] =3D<=
br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { 1, 3, 6, 1, 4, 1, 4491, 2, =
3, 1, 1, 1, 2, 2 };<br>
&nbsp;&nbsp;&nbsp; size_t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&n=
bsp; ocStbHostAVInterfaceTable_oid_len =3D<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; OID_LENGTH(ocStbHostAVInterfaceTable_oid);<br>&nbs p;&nbsp;&nb=
sp; netsnmp_handler_registration *reg;<br>//&nbsp;&nbsp;&nbsp;&nbsp; netsnm=
p_tdata&nbsp; *table_data;<br>&nbsp;&nbsp;&nbsp; netsnmp_table_registration=
_info *table_info;<br>
&nbsp;&nbsp;&nbsp; netsnmp_cache&nbsp; *cache;<br>&nbsp;&nbsp;&nbsp; printf=
(&quot;initialize_table_ocStbHostAVInterfaceTabl e table_data ...1......\n&q=
uot;);<br>&nbsp;&nbsp;&nbsp; reg =3D<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; netsnmp_create_handler_registration(&quot;ocStbHos tAVInterfaceTable=
&quot;,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ocStbHostAVInterfaceTable_handler,<br>&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ocStbHostAVInterfaceTable_oid,<br>&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp; ocStbHostAVInterfaceTable_oid_len,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HANDLER_CAN_RONLY);<br><br>&nbsp;&nbsp; p=
rintf(&quot;initialize_table_ocStbHostAVInterfaceT able table_data ...2.....=
\n&quot;);<br>&nbsp;&nbsp;&nbsp; table_data =3D<br>&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp; netsnmp_tdata_create_table(&quot;ocStbHostAVInterf aceTab=
le&quot;, 0);<br>
&nbsp;&nbsp;&nbsp; table_info =3D SNMP_MALLOC_TYPEDEF(netsnmp_table_registr=
ation_info);<br>&nbsp;&nbsp;&nbsp; netsnmp_table_helper_add_indexes(table_i=
nfo, ASN_UNSIGNED,&nbsp; /* index: ocStbHostAVInterfaceIndex */<br>&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp; 0);<br>
<br>&nbsp;&nbsp;&nbsp; table_info-&gt;min_column =3D COLUMN_OCSTBHOSTAVINTE=
RFACETYPE;<br>&nbsp;&nbsp;&nbsp; table_info-&gt;max_column =3D COLUMN_OCSTB=
HOSTAVINTERFACESTATUS;<br>&nbsp; <br><br>&nbsp;&nbsp;&nbsp; printf(&quot;in=
itialize_table_ocStbHostAVInterfaceTable Catch ...3......\n&quot;);<br>
&nbsp;&nbsp;&nbsp; netsnmp_tdata_register(reg, table_data, table_info);<br>=
&nbsp;&nbsp;&nbsp; printf(&quot;Before Catch .....2....&quot;);<br>&nbsp;&n=
bsp;&nbsp; cache =3D netsnmp_cache_create(OCSTBHOSTAVINTERFACETABLE_TIM EOUT=
,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ocStbHostAVInterfaceTable_l=
oad,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ocStbHostAVInterfaceTable_free,<=
br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ocStbHostAVInterfaceTable_oid=
,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ocStbHostAVInterfaceTable_o=
id_len);<br>&nbsp;&nbsp; printf(&quot;Before Catch ....4.....\n&quot;);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cache-&gt;magic =3D (void *) tab=
le_data;<br>&nbsp;&nbsp;&nbsp; netsnmp_inject_handler_before(reg, netsnmp_c=
ache_handler_get(cache),<br>&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp=
; TABLE_DATA_NAME);<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*<br>&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * Initialise the contents of the table h=
ere <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ; */<br><br>&nbsp;#if&nbsp; =
0 <br>//Check 1:: (Normal with out cathc) method i will fill here&nbsp; ***=
*************** 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>
&nbsp; <br>&nbsp;&nbsp;&nbsp; if(0 =3D=3D vl_ocStbHostAVInterfaceTable_getd=
ata(table_data))<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;=
&nbsp; &nbsp;&nbsp;&nbsp; //vl_ocStbHostAVInterfaceTable_getdata&quot;&nbsp=
; <br>&nbsp;&nbsp;&nbsp; &nbsp; printf(&quot; ERROR:: Not yet table initial=
ise here \n&quot;);<br>&nbsp;&nbsp;&nbsp; }<br>
&nbsp;#endif//if 0 &nbsp;&nbsp;&nbsp; <br>}<br><br>&nbsp;&nbsp;&nbsp; /*<b=
r>&nbsp;&nbsp;&nbsp;&nbsp; * Typical data structure for a row entry <br>&nb=
sp;&nbsp;&nbsp;&nbsp; */<br>struct ocStbHostAVInterfaceTable_entry {<br>&nb=
sp;&nbsp;&nbsp; /*<br>&nbsp;&nbsp;&nbsp;&nbsp; * Index values <br>&nbsp;&nb=
sp;&nbsp;&nbsp; */<br>&nbsp;&nbsp;&nbsp; u_long&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp; ocStbHostAVInterfaceIndex;<br>
<br>&nbsp;&nbsp;&nbsp; /*<br>&nbsp;&nbsp;&nbsp;&nbsp; * Column values <br>&=
nbsp;&nbsp;&nbsp;&nbsp; */<br>&nbsp;&nbsp;&nbsp; oid&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ; ocStbHostAVInterfaceType[=
MAX_IOD_LENGTH2];<br>&nbsp;&nbsp;&nbsp; size_t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp; ocStbHostAVInterfaceType_len;<br>&nbsp;&nbsp;&nbs=
p; char&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp; o=
cStbHostAVInterfaceDesc[CHRMAX2];<br>
&nbsp;&nbsp;&nbsp; size_t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&n=
bsp; ocStbHostAVInterfaceDesc_len;<br>&nbsp;&nbsp;&nbsp ; long&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p; ocStbHostAVInterfaceSt=
atus;<br><br>&nbsp;&nbsp;&nbsp; int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; valid;<br>};<br><br>/*<br>&nbsp;* create a=
new row in the table <br>&nbsp;*/<br>netsnmp_tdata_row *ocStbHostAVInterfa=
ceTable_createEntry(netsnmp_tdata *<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; table_data,<br>&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; u_long<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp; ocStbHostAVInt=
erfaceIndex)<br>
{<br>&nbsp;&nbsp;&nbsp; struct ocStbHostAVInterfaceTable_entry *entry;<br>&=
nbsp;&nbsp;&nbsp; netsnmp_tdata_row *row;<br><br>&nbsp;&nbsp;&nbsp; entry =
=3D SNMP_MALLOC_TYPEDEF(struct ocStbHostAVInterfaceTable_entry);<br>&nbsp;&=
nbsp;&nbsp; if (!entry)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp; retur=
n NULL;<br><br>&nbsp;&nbsp;&nbsp; row =3D netsnmp_tdata_create_row();<br>
&nbsp;&nbsp;&nbsp; if (!row) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
; SNMP_FREE(entry);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp; return NU=
LL;<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; row-&gt;data =3D entry;<b=
r>&nbsp;&nbsp;&nbsp; entry-&gt;ocStbHostAVInterfaceIndex =3D ocStbHostAVInt=
erfaceIndex;<br>&nbsp;&nbsp;&nbsp; netsnmp_tdata_row_add_index(row, ASN_UNS=
IGNED,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;(entry-&gt;ocStbHostAVInterfaceIn=
dex),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sizeof(entry-&gt;ocStbHostAVI=
nterfaceIndex));<br>&nbsp;&nbsp;&nbsp; netsnmp_tdata_add_row(table_data, ro=
w);<br>&nbsp;&nbsp;&nbsp; return row;<br>
}<br><br>/*<br>&nbsp;* remove a row from the table <br>&nbsp;*/<br>void<br>=
ocStbHostAVInterfaceTable_removeEntry(netsnmp_tdat a * table_data,<br>&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp; netsnmp_tdata_row * row) {<br>&nbsp;&nbsp;&nbsp; struct ocS=
tbHostAVInterfaceTable_entry *entry;<br>
<br>&nbsp;&nbsp;&nbsp; if (!row)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; return;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* Nothing to remove */<br>&nbsp;&nbsp;&nb=
sp; entry =3D (struct ocStbHostAVInterfaceTable_entry *)<br>&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp; netsnmp_tdata_remove_and_delete_row(table_data,=
row);<br>&nbsp;&nbsp;&nbsp; if (entry)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SNMP_FREE(entry);&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp; /* XXX - release any other internal resources */<br>}=
<br><br>/*<br>&nbsp;* Example cache handling - set up table_data list from =
a suitable file <br>&nbsp;*/<br>int<br>ocStbHostAVInterfaceTable_load(netsn=
mp_cache * cache, void *vmagic) {<br>
&nbsp;&nbsp;&nbsp; netsnmp_tdata *table =3D (netsnmp_tdata *) vmagic;<br>&n=
bsp;&nbsp;&nbsp; netsnmp_tdata_row *row;<br>&nbsp;&nbsp;&nbsp; //struct ocS=
tbHostAVInterfaceTable_entry *this&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; //cac=
he-&gt;magic<br>&nbsp;&nbsp;&nbsp; /**<br>&nbsp;&nbsp;&nbsp;&nbsp; *vl_ocSt=
bHostAVInterfaceTable_getdata module will&nbsp; Initialise the contents of =
the table here <br>
&nbsp;&nbsp;&nbsp;&nbsp; */<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf(=
&quot;.................table initialise here ............\n&quot;);<br>&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp; if(0 =3D=3D vl_ocStbHostAVInterfaceTable_getdata=
(table))<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &=
nbsp;&nbsp;&nbsp; //vl_ocStbHostAVInterfaceTable_getdata&quot;&nbsp; <br>
&nbsp;&nbsp;&nbsp; &nbsp; printf(&quot; ERROR:: Not yet table initialise he=
re \n&quot;);<br>&nbsp;&nbsp;&nbsp; }<br>#if 0<br><br><br>&nbsp;&nbsp;&nbsp=
; FILE *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp; fp;<br>&nbsp=
;&nbsp;&nbsp; char&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nb=
sp;&nbsp; buf[STRMAX];<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp; ;<br><br>&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fp =3D fopen(&quot;/data/for/ocStbHostAVI=
nterfaceTable&quot;, &quot;r&quot;);<br>
&nbsp;&nbsp;&nbsp; while&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nb=
sp;&nbsp; (fgets(buf, STRMAX, fp)) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; /*<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp; * Unpick &#3=
9;buf' to extract the index values... <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; */<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p; =
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this =3D<br>&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ; ocStbHostAVInterfaceTabl=
e_createEntry(table,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp; ocStb=
HostAVInterfaceIndex);<br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; /*<br>=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ; * ... and then populate &#=
39;this' with the column values <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; */<br>&nbsp;&nbsp;&nbsp; } fclose&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp; (fp);<br>#endif<br>
}<br><br>void<br>ocStbHostAVInterfaceTable_free(ne tsnmp_cache * cache, void=
*vmagic) {<br>&nbsp;&nbsp;&nbsp; netsnmp_tdata * table =3D (netsnmp_tdata =
*) vmagic;<br>&nbsp;&nbsp;&nbsp; netsnmp_tdata_row *this;<br><br>&nbsp;&nbs=
p;&nbsp; netsnmp_tdata_delete_table(table); <br>
<br>//&nbsp;&nbsp;&nbsp;&nbsp; while&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp; ((this =3D netsnmp_tdata_get_first_row(table))) {<br>=
//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ; netsnmp_tdata_remove_and=
_delete_row(table, this);<br>//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>}<br><br>/** handles requ=
ests for the ocStbHostAVInterfaceTable table */ <br>
int<br>ocStbHostAVInterfaceTable_handler(netsnmp_m ib_handler *handler,<br>&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp; net=
snmp_handler_registration<br>&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp; *reginfo,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; netsnmp_agent_request_info *reqinfo,<=
br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp; ne=
tsnmp_request_info *requests) {<br><br>&nbsp;&nbsp;&nbsp; netsnmp_request_i=
nfo *request;<br>&nbsp;&nbsp;&nbsp; netsnmp_table_request_info *table_info;=
<br>&nbsp;&nbsp;&nbsp; netsnmp_tdata * table_data;<br>&nbsp;&nbsp;&nbsp; ne=
tsnmp_tdata_row *table_row;<br>
&nbsp;&nbsp;&nbsp; struct ocStbHostAVInterfaceTable_entry *table_entry;<br>=
&nbsp;&nbsp;&nbsp; int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp=
;&nbsp;&nbsp;&nbsp; ret;<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; <br>&=
nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp; switch (reqinfo-&gt;mo=
de) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /*<br>&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * Read-support (also covers GetNext request=
s)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ; */<br>&nbsp;&nbsp;&nbsp; c=
ase MODE_GET:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp; for (request =
=3D requests; request; request =3D request-&gt;next) {<br>&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ; table_entry =3D (struct o=
cStbHostAVInterfaceTable_entry *)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p; netsnmp_tdata_extract_=
entry(request);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp; table_in=
fo =3D netsnmp_extract_table_info(request);<br>&nbsp;&nbs p;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf(&quot;....ocStbHostAVInterfac=
eTable_handler:: ..MODE_GET: ............\n&quot;);<br>&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; switch (table_info-&gt;colnu=
m) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp; =
case COLUMN_OCSTBHOSTAVINTERFACETYPE:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp; if (!table_entry) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp; netsnmp_set_request_error(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nbsp; printf(&quot;....COLUMN_OC=
STBHOSTAVINTERFACEDESC:: ..MODE_GET: ............\n&quot;);&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp; break;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&=
nbsp;&nbsp;&nbsp; case COLUMN_OCSTBHOSTAVINTERFACESTATUS:<br>&nbsp;&nbsp; &n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp=
; if (!table_entry) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp; netsnmp_se=
t_request_error(reqinfo, request,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n =
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; SNMP_NOSUCHINSTANCE);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; continue;<br>&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&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&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SNMP_NOSUCHOBJECT);<br>&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nb=
sp; break;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs p;&nbsp;&nbsp;&nbsp;&=
nbsp; }<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp; break;<br><br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; 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==--

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 07:54 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0