Re: Trouble in converting PhysAdress to OctetString

2013-10-04 Thread Rafael Ratacheski
It works very well. thank you 2013/10/4 Magnus Fromreide > On Fri, 2013-10-04 at 18:13 +, Rafael Ratacheski wrote: > > > > Your solution resolve my problem partially, I have success to print > > the value but my real objective is save the value in a buffer, and > > when i try do this, with

Re: Trouble in converting PhysAdress to OctetString

2013-10-04 Thread Magnus Fromreide
On Fri, 2013-10-04 at 18:13 +, Rafael Ratacheski wrote: > > Your solution resolve my problem partially, I have success to print > the value but my real objective is save the value in a buffer, and > when i try do this, with your method, i don't have success. The printf > line is just to verify

Re: Trouble in converting PhysAdress to OctetString

2013-10-04 Thread Rafael Ratacheski
Your solution resolve my problem partially, I have success to print the value but my real objective is save the value in a buffer, and when i try do this, with your method, i don't have success. The printf line is just to verify the saved value. About the memory allocated, i think this resolve siz

Re: Trouble in converting PhysAdress to OctetString

2013-10-03 Thread Magnus Fromreide
On Thu, 2013-10-03 at 18:14 +, Rafael Ratacheski wrote: > Hello, I'm having troubles in request and save the value of the > ipNetToMediaPhysAddress OID. > > My routine get the MAC Adress, but only a half of the value. > > What I'm doing wrong? Can you help me? > > if (vars->type == ASN_OCT

Trouble in converting PhysAdress to OctetString

2013-10-03 Thread Rafael Ratacheski
Hello, I'm having troubles in request and save the value of the ipNetToMediaPhysAddress OID. My routine get the MAC Adress, but only a half of the value. What I'm doing wrong? Can you help me? if (vars->type == ASN_OCTET_STR) { u_long *sp = malloc(1+id_len); memcpy(sp, vars