Although I do not have the SNMP API that you are using, I will attempt to provide some ideas.
An octet string should simply be referred to as a char* just as any other string. Typically, no matter if the string is of hexadecimal type or decimal type or octet type, it should be referred to in terms of a pointer to a series of characters. In this way, char* should refer to the string in the appropriate manner.
That being said, I have seen some instances of network protocol API's that return structs that contain the data. I know that Winsock works in this manner. Within the libraries, a special struct is defined and used as the return type on many functions.
I was able to find one example of a struct return type using SNMP.
typedef struct {
OSUINT32 numocts;
OSOCTET data[<len>];
} <name>;
This is just one example. Most likely, however, the return type is simply a char*. I would recommend searching on the internet and, more importantly, looking into the API specifications or the documentation for the functions that you are calling as to how the octet string is returned.
Thanks,
Andy McRorie
Applications Engineer
National Instruments
Thanks,
Andy McRorie
NI R&D