Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - BOOTP & IP address asignemnt: (4 Items)
   
BOOTP & IP address asignemnt  
We needed a BOOTP client for our product, so I am writing one.  I have the process complete up until I assign the 
information (IP address & etc) to the interface.  

I am wondering if there is a graceful way to accomplish this assignment?  

Looking at the DHCP client it looks like it prepares a script file and passes it off to some other app.  
Would I be able to create a similar script file and pass it off to the same application?  
If so, what is the app and what parameters could I have it set for me?  
Or could you tell me where to find the code to look through to figure that out for myself?

Thanks,
Jared
Re: BOOTP & IP address asignemnt  


On 15/02/10 08:47 AM, Jared Roundy wrote:
> We needed a BOOTP client for our product, so I am writing one.
I would have thought that the shipped DHCP client is backwards 
compatible with BOOTP but maybe I'm misunderstanding what you're 
attempting to do...

>    I have the process complete up until I assign the information (IP address&  etc) to the interface.
>
> I am wondering if there is a graceful way to accomplish this assignment?
>
> Looking at the DHCP client it looks like it prepares a script file and passes it off to some other app.
>    
You're looking at the right spot for example how to configure IP address 
etc. However, you may have missed the code that configures the IP 
address. The DHCP client does have code for directly configuring the IP 
address by itself (configure.c:ifconfig()), but it also passes 
parameters to a script (dhcp-up, qnx_client.c:run_script()). Please see 
the docs for the list of environment variables passed to this script:
http://www.qnx.com/developers/docs/6.4.1/neutrino/utilities/d/dhcp.client.html
> Would I be able to create a similar script file and pass it off to the same application?
>    
Yes, you can create your own script. Not sure what you refer to as "same 
application" though.
> If so, what is the app and what parameters could I have it set for me?
> Or could you tell me where to find the code to look through to figure that out for myself?
>    

The idea is that you'd write your own script which implements your local 
configuration policy.

HTH
/P
Re: BOOTP & IP address asignemnt  
We actually need BOOTP & DHCP to run at the same time.  I also don't know if you can strip out the DHCP flag from the 
options to get it to work with BOOTP servers.

Thank you for pointing out the location of the ip address assignment code and other options.  That is what I was looking
 for.

Jared
Re: BOOTP & IP address asignemnt  
On 16/02/10 09:01 PM, Jared Roundy wrote:
> We actually need BOOTP&  DHCP to run at the same time.
That's odd. Maybe you can teach me about why and when that is necessary?
>    I also don't know if you can strip out the DHCP flag from the options to get it to work 
with BOOTP servers.
>    
Don't the servers that don't recognize the option simply ignore it?
> Thank you for pointing out the location of the ip address assignment code and other options.  That is what I was 
looking for.
>    
Ok, great, glad I got something right :-)
/P