Am learning on to understand ASN.1 Rectangle encode program.
Currently the program given on the website is printing in XML format and generated ber file. I wanted to print/read the PDU in hex encoded format (hexdump). Initially, I tried opening the test.ber file using an editor. But not opening properly.
I found uper_encoder does the job, and it's parameters are same as ber_encode same parameters. The compilation is also success cc -g -I. -o rencode.x *.c
but on executing. Program fails with error Couldn't encode rectangle
at function uper_encode as it returns -1.
ec = uper_encode (&asn_DEF_Rectangle, rectangle, write_out, fp)
Could I get some help in printing them in hex format.