How to get EndPoint number from MOUNT command


Is there any way to know the endpoint number assignmed by the mount command using either

  • system(“mount …”); - As system call
  • mount(…); - As function call.

In summary, I want to know the endpoint to which my device has been mounted in a function. Means, once I mount my device, let’s assume /dev/io-net/en. So the mounting to io-net will create the device /dev/io-net/en0, /dev/io-net/en1…
I want to know these numbers appended at last in my other application calling.

I will appreciate any pointer in this regards…

thanks in advance,