Hi .. .i am trying to pass oid as a parameter to a
function..

int main(int argc,char **argv){
oid myoid[]={1.3.6.8.9....};
myfunction(myoid);
}

myfunction(oid *myoid){
  size_t length_myoid= sizeof(myoid)/sizeof(oid)
//seems to work//
  printf("%d" \n",myoid[1]); //prints correctly the
second value
  ... skipped a bunch of lines...
  snmp_add_null_var(pdu,myoid,length_myoid);
  //this returns oid does not exist
  snmp_add_null_var(pdu,myoid[0],length_myoid);
  //this returns segmentation fault
}

What else shoud i do? Thx a lot



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to