getting dhcp parameters - VxWorks

This is a discussion on getting dhcp parameters - VxWorks ; Hi, I am trying to get information from a dhcp server. My board reads it and loads the proper file via dhcp/bootp/tftp Then when my kernel start In the usrAppInit method I do the following: pIf = ifunit("mynic0"); pCookie=dhcpcInit(pIf,0); retval=dhcpcParamsGet(pCookie,&paramList); ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: getting dhcp parameters

  1. getting dhcp parameters

    Hi,

    I am trying to get information from a dhcp server.

    My board reads it and loads the proper file via dhcp/bootp/tftp

    Then when my kernel start In the usrAppInit method I do the following:

    pIf = ifunit("mynic0");

    pCookie=dhcpcInit(pIf,0);


    retval=dhcpcParamsGet(pCookie,&paramList);


    Then I can grab information from the param list to set up routing and nfs shares.

    I get errors on the dhcpcInit errno returns -S_tasklib_NAME_NOT_FOUND

    any ideas of what this may be.

    All I want to do is get a few parameters from the dhcp server. I know that the server is configured properly because I use dhcp to load the board kernel.

    thanks in advance





  2. Re: getting dhcp parameters

    I would just paste the Note given in the API Reference -

    This routine is called automatically during system startup if the DHCP
    client was used to obtain the VxWorks boot parameters. The resulting
    lease will always reconfigure the network boot device. Therefore, any
    further calls to this routine which specify the network boot device for
    use in obtaining additional DHCP leases must set autoConfig to FALSE.
    Otherwise, that device will be unable to maintain a stable
    configuration. The global variable pDhcpcBootCookie provides access to
    the configuration parameters for any DHCP lease created during system
    startup.

    I don't know much if this would help you out.

    Raj


    tiffini wrote:
    > Hi,
    >
    > I am trying to get information from a dhcp server.
    >
    > My board reads it and loads the proper file via dhcp/bootp/tftp
    >
    > Then when my kernel start In the usrAppInit method I do the following:
    >
    > pIf = ifunit("mynic0");
    >
    > pCookie=dhcpcInit(pIf,0);
    >
    >
    > retval=dhcpcParamsGet(pCookie,&paramList);
    >
    >
    > Then I can grab information from the param list to set up routing and nfs shares.
    >
    > I get errors on the dhcpcInit errno returns -S_tasklib_NAME_NOT_FOUND
    >
    > any ideas of what this may be.
    >
    > All I want to do is get a few parameters from the dhcp server. I know that the server is configured properly because I use dhcp to load the board kernel.
    >
    > thanks in advance



  3. Re: getting dhcp parameters

    Hi,

    We got the dhcp params. How do I get the router address out of the paramater returned by dhcpgetparams call? The struct is a pointer to a pointer of a struct, so how is that done, both the memory allocation and the pointer?



+ Reply to Thread