There are three types of calls to use when using the NI-488.2 API: board-level calls, device-level calls, and 488.2 style calls. It appears that you are trying to use device-level calls. ibcmd is a function used primarily to address the GPIB, and is a board-level call. When using device-level calls, the driver will address the bus for you, and you may simply use ibwrt and ibrd.
I believe what you're looking to do in this scenario is use ibwrt(ud, "*idn?");
You may then follow that with ibrd(ud, buf, bufsize);
I hope that this helps clarify the situation for you.