Search code examples
network-programmingkernel-modulevxworks

How to read network interface configuration in VxWorks


I can inspect the address from the vxworks shell using the ifconfig shell command.

I would like to perform the equivalent function programmatically, in a downloadable kernel module (DKM).

How can I determine the IP address of the interface "gem0", in my DKM?

In the VxWorks developer documentation, I see the function ifAddrGet() in ifLib.h, which seems to do exactly what I want. However, this function does not seem to be available to me:

C interp: unknown symbol name 'ifAddrGet'

Is the inclusion of this library kernel dependent?


Solution

  • In a DKM you should be able to use this command. Have you tried to use ifconfig("gem0 something..."); instead, for testing if you can access the networksettings in general? Perhaps make shure that you are able to use this commands (installed packages) in your "Kernel Configuration".